| Index: extensions/browser/extension_function_dispatcher.cc
|
| diff --git a/extensions/browser/extension_function_dispatcher.cc b/extensions/browser/extension_function_dispatcher.cc
|
| index 917ce65c8cf4e4746467c8a593123a816dfe594a..9a30d2e503aa6e40c10a8558a180e5283b6a4eea 100644
|
| --- a/extensions/browser/extension_function_dispatcher.cc
|
| +++ b/extensions/browser/extension_function_dispatcher.cc
|
| @@ -205,12 +205,12 @@ class ExtensionFunctionDispatcher::UIThreadResponseCallbackWrapper
|
|
|
| WindowController*
|
| ExtensionFunctionDispatcher::Delegate::GetExtensionWindowController() const {
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| content::WebContents*
|
| ExtensionFunctionDispatcher::Delegate::GetAssociatedWebContents() const {
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| content::WebContents*
|
| @@ -301,10 +301,8 @@ void ExtensionFunctionDispatcher::DispatchOnIOThread(
|
| }
|
|
|
| ExtensionFunctionDispatcher::ExtensionFunctionDispatcher(
|
| - content::BrowserContext* browser_context,
|
| - Delegate* delegate)
|
| - : browser_context_(browser_context),
|
| - delegate_(delegate) {
|
| + content::BrowserContext* browser_context)
|
| + : browser_context_(browser_context) {
|
| }
|
|
|
| ExtensionFunctionDispatcher::~ExtensionFunctionDispatcher() {
|
| @@ -440,6 +438,22 @@ void ExtensionFunctionDispatcher::OnExtensionFunctionCompleted(
|
| }
|
| }
|
|
|
| +WindowController*
|
| +ExtensionFunctionDispatcher::GetExtensionWindowController() const {
|
| + return delegate_ ? delegate_->GetExtensionWindowController() : nullptr;
|
| +}
|
| +
|
| +content::WebContents*
|
| +ExtensionFunctionDispatcher::GetAssociatedWebContents() const {
|
| + return delegate_ ? delegate_->GetAssociatedWebContents() : nullptr;
|
| +}
|
| +
|
| +content::WebContents*
|
| +ExtensionFunctionDispatcher::GetVisibleWebContents() const {
|
| + return delegate_ ? delegate_->GetVisibleWebContents() :
|
| + GetAssociatedWebContents();
|
| +}
|
| +
|
| // static
|
| bool ExtensionFunctionDispatcher::CheckPermissions(
|
| ExtensionFunction* function,
|
|
|