diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 22:07:08 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 22:07:08 +0000 |
commit | 41999c790950781a3598bad03b6179d685e9d82a (patch) | |
tree | ae629d8bb881848b3c71eed3f5d458780d655085 /chrome/browser/extensions/extension_tab_helper.cc | |
parent | 85d85890e689af734e46660b561fcfc2b69f993f (diff) | |
download | chromium_src-41999c790950781a3598bad03b6179d685e9d82a.zip chromium_src-41999c790950781a3598bad03b6179d685e9d82a.tar.gz chromium_src-41999c790950781a3598bad03b6179d685e9d82a.tar.bz2 |
Revert "Revert "Looks like this introduced leaks in sync ui tests. Sigh.""
This reverts commit cb8e078c2e7bebf0604871ec0bda69ceac3734d2.
TBR=mpcomplete@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85058 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tab_helper.cc')
-rw-r--r-- | chrome/browser/extensions/extension_tab_helper.cc | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc index 8a1caa5..6f44f6c 100644 --- a/chrome/browser/extensions/extension_tab_helper.cc +++ b/chrome/browser/extensions/extension_tab_helper.cc @@ -6,15 +6,12 @@ #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" #include "chrome/common/extensions/extension_action.h" #include "chrome/common/extensions/extension_icon_set.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/extension_resource.h" -#include "content/browser/renderer_host/render_widget_host_view.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/navigation_controller.h" #include "content/common/notification_service.h" @@ -22,8 +19,6 @@ ExtensionTabHelper::ExtensionTabHelper(TabContentsWrapper* wrapper) : TabContentsObserver(wrapper->tab_contents()), extension_app_(NULL), - ALLOW_THIS_IN_INITIALIZER_LIST( - extension_function_dispatcher_(wrapper->profile(), this)), wrapper_(wrapper) { } @@ -118,7 +113,6 @@ bool ExtensionTabHelper::OnMessageReceived(const IPC::Message& message) { OnDidGetApplicationInfo) IPC_MESSAGE_HANDLER(ExtensionHostMsg_InstallApplication, OnInstallApplication) - IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -137,12 +131,6 @@ void ExtensionTabHelper::OnInstallApplication(const WebApplicationInfo& info) { wrapper_->delegate()->OnInstallApplication(wrapper_, info); } -void ExtensionTabHelper::OnRequest( - const ExtensionHostMsg_Request_Params& request) { - extension_function_dispatcher_.Dispatch(request, - tab_contents()->render_view_host()); -} - void ExtensionTabHelper::UpdateExtensionAppIcon(const Extension* extension) { extension_app_icon_.reset(); @@ -173,37 +161,3 @@ void ExtensionTabHelper::OnImageLoaded(SkBitmap* image, tab_contents()->NotifyNavigationStateChanged(TabContents::INVALIDATE_TAB); } } - -Browser* ExtensionTabHelper::GetBrowser() { - TabContents* contents = tab_contents(); - TabContentsIterator tab_iterator; - for (; !tab_iterator.done(); ++tab_iterator) { - if (contents == (*tab_iterator)->tab_contents()) - return tab_iterator.browser(); - } - - return NULL; -} - -TabContents* ExtensionTabHelper::GetAssociatedTabContents() const { - return tab_contents(); -} - -gfx::NativeWindow ExtensionTabHelper::GetCustomFrameNativeWindow() { - if (GetBrowser()) - return NULL; - - // If there was no browser associated with the function dispatcher delegate, - // then this WebUI may be hosted in an ExternalTabContainer, and a framing - // window will be accessible through the tab_contents. - TabContentsDelegate* tab_contents_delegate = tab_contents()->delegate(); - if (tab_contents_delegate) - return tab_contents_delegate->GetFrameNativeWindow(); - else - return NULL; -} - -gfx::NativeView ExtensionTabHelper::GetNativeViewOfHost() { - RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView(); - return rwhv ? rwhv->GetNativeView() : NULL; -} |