diff options
Diffstat (limited to 'chrome/browser/extensions/extension_function_dispatcher.cc')
-rw-r--r-- | chrome/browser/extensions/extension_function_dispatcher.cc | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index 29f0129..f86d997 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -22,8 +22,6 @@ #include "chrome/browser/external_protocol/external_protocol_handler.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/chrome_render_message_filter.h" -#include "chrome/browser/ui/browser_list.h" -#include "chrome/browser/ui/browser_window.h" #include "chrome/common/extensions/api/extension_api.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/extension_set.h" @@ -165,32 +163,6 @@ ExtensionFunctionDispatcher::ExtensionFunctionDispatcher(Profile* profile, ExtensionFunctionDispatcher::~ExtensionFunctionDispatcher() { } -Browser* ExtensionFunctionDispatcher::GetCurrentBrowser( - RenderViewHost* render_view_host, bool include_incognito) { - Browser* browser = delegate_->GetBrowser(); - - // If the delegate has an associated browser, that is always the right answer. - if (browser) - return browser; - - // Otherwise, try to default to a reasonable browser. If |include_incognito| - // is true, we will also search browsers in the incognito version of this - // profile. Note that the profile may already be incognito, in which case - // we will search the incognito version only, regardless of the value of - // |include_incognito|. - Profile* profile = Profile::FromBrowserContext( - render_view_host->GetProcess()->GetBrowserContext()); - browser = BrowserList::FindAnyBrowser(profile, include_incognito); - - // NOTE(rafaelw): This can return NULL in some circumstances. In particular, - // a background_page onload chrome.tabs api call can make it into here - // before the browser is sufficiently initialized to return here. - // A similar situation may arise during shutdown. - // TODO(rafaelw): Delay creation of background_page until the browser - // is available. http://code.google.com/p/chromium/issues/detail?id=13284 - return browser; -} - void ExtensionFunctionDispatcher::Dispatch( const ExtensionHostMsg_Request_Params& params, RenderViewHost* render_view_host) { |