| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/extension_tab_helper.h" | 5 #include "chrome/browser/extensions/extension_tab_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/webstore_inline_installer.h" | 8 #include "chrome/browser/extensions/webstore_inline_installer.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/sessions/restore_tab_helper.h" | 10 #include "chrome/browser/sessions/restore_tab_helper.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_list.h" | 12 #include "chrome/browser/ui/browser_list.h" |
| 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 14 #include "chrome/common/chrome_notification_types.h" | 14 #include "chrome/common/chrome_notification_types.h" |
| 15 #include "chrome/common/extensions/extension_action.h" | 15 #include "chrome/common/extensions/extension_action.h" |
| 16 #include "chrome/common/extensions/extension_constants.h" | 16 #include "chrome/common/extensions/extension_constants.h" |
| 17 #include "chrome/common/extensions/extension_icon_set.h" | 17 #include "chrome/common/extensions/extension_icon_set.h" |
| 18 #include "chrome/common/extensions/extension_messages.h" | 18 #include "chrome/common/extensions/extension_messages.h" |
| 19 #include "chrome/common/extensions/extension_resource.h" | 19 #include "chrome/common/extensions/extension_resource.h" |
| 20 #include "content/browser/renderer_host/render_view_host.h" | 20 #include "content/browser/renderer_host/render_view_host.h" |
| 21 #include "content/browser/renderer_host/render_widget_host_view.h" | 21 #include "content/browser/renderer_host/render_widget_host_view.h" |
| 22 #include "content/public/browser/invalidate_type.h" | 22 #include "content/public/browser/invalidate_type.h" |
| 23 #include "content/public/browser/navigation_details.h" | 23 #include "content/public/browser/navigation_details.h" |
| 24 #include "content/public/browser/notification_service.h" | 24 #include "content/public/browser/notification_service.h" |
| 25 #include "content/public/browser/render_process_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
| 26 | 27 |
| 27 using content::WebContents; | 28 using content::WebContents; |
| 28 | 29 |
| 29 ExtensionTabHelper::ExtensionTabHelper(TabContentsWrapper* wrapper) | 30 ExtensionTabHelper::ExtensionTabHelper(TabContentsWrapper* wrapper) |
| 30 : content::WebContentsObserver(wrapper->web_contents()), | 31 : content::WebContentsObserver(wrapper->web_contents()), |
| 31 delegate_(NULL), | 32 delegate_(NULL), |
| 32 extension_app_(NULL), | 33 extension_app_(NULL), |
| 33 ALLOW_THIS_IN_INITIALIZER_LIST( | 34 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 34 extension_function_dispatcher_(wrapper->profile(), this)), | 35 extension_function_dispatcher_(wrapper->profile(), this)), |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 283 } |
| 283 | 284 |
| 284 WebContents* ExtensionTabHelper::GetAssociatedWebContents() const { | 285 WebContents* ExtensionTabHelper::GetAssociatedWebContents() const { |
| 285 return web_contents(); | 286 return web_contents(); |
| 286 } | 287 } |
| 287 | 288 |
| 288 gfx::NativeView ExtensionTabHelper::GetNativeViewOfHost() { | 289 gfx::NativeView ExtensionTabHelper::GetNativeViewOfHost() { |
| 289 RenderWidgetHostView* rwhv = web_contents()->GetRenderWidgetHostView(); | 290 RenderWidgetHostView* rwhv = web_contents()->GetRenderWidgetHostView(); |
| 290 return rwhv ? rwhv->GetNativeView() : NULL; | 291 return rwhv ? rwhv->GetNativeView() : NULL; |
| 291 } | 292 } |
| OLD | NEW |