diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-09-29 16:16:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-09 10:04:06 +0000 |
commit | a95a7417ad456115a1ef2da4bb8320531c0821f1 (patch) | |
tree | edcd59279e486d2fd4a8f88a7ed025bcf925c6e6 /chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc | |
parent | 33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (diff) |
BASELINE: Update Chromium to 106.0.5249.126
Change-Id: Ib0bb21c437a7d1686e21c33f2d329f2ac425b7ab
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438936
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc')
-rw-r--r-- | chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc index 746cc75b889..39df08f5e0f 100644 --- a/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc +++ b/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc @@ -96,7 +96,7 @@ void ExtensionOmniboxEventRouter::OnInputStarted( Profile* profile, const std::string& extension_id) { auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_STARTED, omnibox::OnInputStarted::kEventName, - std::vector<base::Value>(), profile); + base::Value::List(), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); } @@ -110,13 +110,13 @@ bool ExtensionOmniboxEventRouter::OnInputChanged( extension_id, omnibox::OnInputChanged::kEventName)) return false; - auto args(std::make_unique<base::ListValue>()); - args->Append(input); - args->Append(suggest_id); + base::Value::List args; + args.Append(input); + args.Append(suggest_id); - auto event = std::make_unique<Event>( - events::OMNIBOX_ON_INPUT_CHANGED, omnibox::OnInputChanged::kEventName, - std::move(*args).TakeListDeprecated(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_CHANGED, + omnibox::OnInputChanged::kEventName, + std::move(args), profile); event_router->DispatchEventToExtension(extension_id, std::move(event)); return true; } @@ -137,18 +137,18 @@ void ExtensionOmniboxEventRouter::OnInputEntered( extensions::TabHelper::FromWebContents(web_contents)-> active_tab_permission_granter()->GrantIfRequested(extension); - auto args(std::make_unique<base::ListValue>()); - args->Append(input); + base::Value::List args; + args.Append(input); if (disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB) - args->Append(kForegroundTabDisposition); + args.Append(kForegroundTabDisposition); else if (disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB) - args->Append(kBackgroundTabDisposition); + args.Append(kBackgroundTabDisposition); else - args->Append(kCurrentTabDisposition); + args.Append(kCurrentTabDisposition); - auto event = std::make_unique<Event>( - events::OMNIBOX_ON_INPUT_ENTERED, omnibox::OnInputEntered::kEventName, - std::move(*args).TakeListDeprecated(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_ENTERED, + omnibox::OnInputEntered::kEventName, + std::move(args), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); @@ -160,7 +160,7 @@ void ExtensionOmniboxEventRouter::OnInputCancelled( Profile* profile, const std::string& extension_id) { auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_CANCELLED, omnibox::OnInputCancelled::kEventName, - std::vector<base::Value>(), profile); + base::Value::List(), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); } @@ -169,13 +169,12 @@ void ExtensionOmniboxEventRouter::OnDeleteSuggestion( Profile* profile, const std::string& extension_id, const std::string& suggestion_text) { - auto args(std::make_unique<base::ListValue>()); - args->Append(suggestion_text); + base::Value::List args; + args.Append(suggestion_text); - auto event = - std::make_unique<Event>(events::OMNIBOX_ON_DELETE_SUGGESTION, - omnibox::OnDeleteSuggestion::kEventName, - std::move(*args).TakeListDeprecated(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_DELETE_SUGGESTION, + omnibox::OnDeleteSuggestion::kEventName, + std::move(args), profile); EventRouter::Get(profile)->DispatchEventToExtension(extension_id, std::move(event)); |