| Index: chrome/browser/extensions/extension_tab_util.cc
|
| diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
|
| index c22806a407507bcf19179492e270684ccf551860..58fc3b70de4117408bfc241bea5680a626da2cdc 100644
|
| --- a/chrome/browser/extensions/extension_tab_util.cc
|
| +++ b/chrome/browser/extensions/extension_tab_util.cc
|
| @@ -115,6 +115,8 @@ int GetTabIdForExtensions(const WebContents* web_contents) {
|
| return SessionTabHelper::IdForTab(web_contents);
|
| }
|
|
|
| +ExtensionTabUtil::Delegate* g_delegate = nullptr;
|
| +
|
| } // namespace
|
|
|
| ExtensionTabUtil::OpenTabParams::OpenTabParams()
|
| @@ -449,6 +451,14 @@ std::unique_ptr<api::tabs::MutedInfo> ExtensionTabUtil::CreateMutedInfo(
|
| }
|
|
|
| // static
|
| +void ExtensionTabUtil::SetPlatformDelegate(Delegate* delegate) {
|
| + // Allow setting it only once (also allow reset to nullptr, but then take
|
| + // special care to free it).
|
| + CHECK(!g_delegate || !delegate);
|
| + g_delegate = delegate;
|
| +}
|
| +
|
| +// static
|
| void ExtensionTabUtil::ScrubTabForExtension(const Extension* extension,
|
| content::WebContents* contents,
|
| api::tabs::Tab* tab) {
|
| @@ -475,6 +485,8 @@ void ExtensionTabUtil::ScrubTabForExtension(const Extension* extension,
|
| tab->title.reset();
|
| tab->fav_icon_url.reset();
|
| }
|
| + if (g_delegate)
|
| + g_delegate->ScrubTabForExtension(extension, contents, tab);
|
| }
|
|
|
| bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents,
|
|
|