diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-20 13:40:20 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-22 12:41:23 +0000 |
commit | 7961cea6d1041e3e454dae6a1da660b453efd238 (patch) | |
tree | c0eeb4a9ff9ba32986289c1653d9608e53ccb444 /chromium/chrome/browser/extensions/api/tabs/tabs_event_router.cc | |
parent | b7034d0803538058e5c9d904ef03cf5eab34f6ef (diff) |
BASELINE: Update Chromium to 78.0.3904.130
Change-Id: If185e0c0061b3437531c97c9c8c78f239352a68b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/extensions/api/tabs/tabs_event_router.cc')
-rw-r--r-- | chromium/chrome/browser/extensions/api/tabs/tabs_event_router.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chromium/chrome/browser/extensions/api/tabs/tabs_event_router.cc b/chromium/chrome/browser/extensions/api/tabs/tabs_event_router.cc index ead6f0a7144..f86ebb9b063 100644 --- a/chromium/chrome/browser/extensions/api/tabs/tabs_event_router.cc +++ b/chromium/chrome/browser/extensions/api/tabs/tabs_event_router.cc @@ -27,6 +27,7 @@ #include "content/public/browser/favicon_status.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/web_contents.h" +#include "extensions/common/features/feature.h" using base::DictionaryValue; using base::ListValue; @@ -41,12 +42,16 @@ namespace { bool WillDispatchTabUpdatedEvent( WebContents* contents, const std::set<std::string> changed_property_names, - content::BrowserContext* context, + content::BrowserContext* browser_context, + Feature::Context target_context, const Extension* extension, Event* event, const base::DictionaryValue* listener_filter) { + ExtensionTabUtil::ScrubTabBehavior scrub_tab_behavior = + ExtensionTabUtil::GetScrubTabBehavior(extension, target_context, + contents); std::unique_ptr<api::tabs::Tab> tab_object = - ExtensionTabUtil::CreateTabObject(contents, ExtensionTabUtil::kScrubTab, + ExtensionTabUtil::CreateTabObject(contents, scrub_tab_behavior, extension); std::unique_ptr<base::DictionaryValue> tab_value = tab_object->ToValue(); @@ -66,14 +71,17 @@ bool WillDispatchTabUpdatedEvent( bool WillDispatchTabCreatedEvent(WebContents* contents, bool active, - content::BrowserContext* context, + content::BrowserContext* browser_context, + Feature::Context target_context, const Extension* extension, Event* event, const base::DictionaryValue* listener_filter) { event->event_args->Clear(); + ExtensionTabUtil::ScrubTabBehavior scrub_tab_behavior = + ExtensionTabUtil::GetScrubTabBehavior(extension, target_context, + contents); std::unique_ptr<base::DictionaryValue> tab_value = - ExtensionTabUtil::CreateTabObject(contents, ExtensionTabUtil::kScrubTab, - extension) + ExtensionTabUtil::CreateTabObject(contents, scrub_tab_behavior, extension) ->ToValue(); tab_value->SetBoolean(tabs_constants::kSelectedKey, active); tab_value->SetBoolean(tabs_constants::kActiveKey, active); |