#include "components/omnibox/browser/actions/omnibox_action.h"
#include "base/strings/utf_string_conversions.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "build/build_config.h"
#include "components/omnibox/browser/omnibox_client.h"
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "ui/base/l10n/l10n_util.h"
#if defined(SUPPORT_PEDALS_VECTOR_ICONS)
#include "components/omnibox/browser/vector_icons.h"
#endif
#if BUILDFLAG(IS_ANDROID)
#include "base/android/jni_android.h"
#include "components/omnibox/browser/jni_headers/OmniboxAction_jni.h"
#endif
OmniboxAction::LabelStrings::LabelStrings(int id_hint,
int id_suggestion_contents,
int id_accessibility_suffix,
int id_accessibility_hint)
: … { … }
OmniboxAction::LabelStrings::LabelStrings(std::u16string hint,
std::u16string suggestion_contents,
std::u16string accessibility_suffix,
std::u16string accessibility_hint)
: … { … }
OmniboxAction::LabelStrings::LabelStrings() = default;
OmniboxAction::LabelStrings::LabelStrings(const LabelStrings&) = default;
OmniboxAction::LabelStrings::~LabelStrings() = default;
namespace base::trace_event {
size_t EstimateMemoryUsage(const OmniboxAction::LabelStrings& self) { … }
}
bool OmniboxAction::Client::OpenJourneys(const std::string& query) { … }
OmniboxAction::ExecutionContext::ExecutionContext(
Client& client,
OpenUrlCallback callback,
base::TimeTicks match_selection_timestamp,
WindowOpenDisposition disposition)
: … { … }
OmniboxAction::ExecutionContext::~ExecutionContext() = default;
OmniboxAction::OmniboxAction(LabelStrings strings, GURL url)
: … { … }
OmniboxAction::~OmniboxAction() { … }
const OmniboxAction::LabelStrings& OmniboxAction::GetLabelStrings() const { … }
void OmniboxAction::Execute(OmniboxAction::ExecutionContext& context) const { … }
bool OmniboxAction::IsReadyToTrigger(
const AutocompleteInput& input,
const AutocompleteProviderClient& client) const { … }
#if defined(SUPPORT_PEDALS_VECTOR_ICONS)
const gfx::VectorIcon& OmniboxAction::GetVectorIcon() const { … }
#endif
size_t OmniboxAction::EstimateMemoryUsage() const { … }
OmniboxActionId OmniboxAction::ActionId() const { … }
#if BUILDFLAG(IS_ANDROID)
base::android::ScopedJavaLocalRef<jobject> OmniboxAction::GetOrCreateJavaObject(
JNIEnv* env) const {
NOTREACHED_IN_MIGRATION()
<< "This implementation does not have a java counterpart";
return {};
}
#endif
void OmniboxAction::OpenURL(OmniboxAction::ExecutionContext& context,
const GURL& url) const { … }