| Index: chrome/browser/extensions/tab_helper.h
|
| diff --git a/chrome/browser/extensions/tab_helper.h b/chrome/browser/extensions/tab_helper.h
|
| index 170312289213b02951094566123c88406a484ac8..cad235ee095fac477542369794527e8591245d05 100644
|
| --- a/chrome/browser/extensions/tab_helper.h
|
| +++ b/chrome/browser/extensions/tab_helper.h
|
| @@ -14,13 +14,13 @@
|
| #include "chrome/browser/extensions/image_loading_tracker.h"
|
| #include "chrome/browser/extensions/script_executor.h"
|
| #include "chrome/browser/extensions/webstore_inline_installer.h"
|
| +#include "chrome/browser/tab_contents/web_contents_user_data.h"
|
| #include "chrome/common/web_apps.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
|
|
| -class TabContents;
|
| struct WebApplicationInfo;
|
|
|
| namespace content {
|
| @@ -40,7 +40,8 @@ class TabHelper : public content::WebContentsObserver,
|
| public WebstoreInlineInstaller::Delegate,
|
| public AppNotifyChannelSetup::Delegate,
|
| public base::SupportsWeakPtr<TabHelper>,
|
| - public content::NotificationObserver {
|
| + public content::NotificationObserver,
|
| + public WebContentsUserData<TabHelper> {
|
| public:
|
| // Different types of action when web app info is available.
|
| // OnDidGetApplicationInfo uses this to dispatch calls.
|
| @@ -50,11 +51,9 @@ class TabHelper : public content::WebContentsObserver,
|
| UPDATE_SHORTCUT // Update icon for app shortcut.
|
| };
|
|
|
| - explicit TabHelper(TabContents* tab_contents);
|
| + explicit TabHelper(content::WebContents* web_contents);
|
| virtual ~TabHelper();
|
| -
|
| - // Copies the internal state from another TabHelper.
|
| - void CopyStateFrom(const TabHelper& source);
|
| + static int kUserDataKey;
|
|
|
| void CreateApplicationShortcuts();
|
| bool CanCreateApplicationShortcuts() const;
|
| @@ -95,10 +94,6 @@ class TabHelper : public content::WebContentsObserver,
|
| // Extension::EXTENSION_ICON_SMALLISH).
|
| SkBitmap* GetExtensionAppIcon();
|
|
|
| - TabContents* tab_contents() {
|
| - return tab_contents_;
|
| - }
|
| -
|
| content::WebContents* web_contents() const {
|
| return content::WebContentsObserver::web_contents();
|
| }
|
| @@ -112,7 +107,7 @@ class TabHelper : public content::WebContentsObserver,
|
| }
|
|
|
| ActiveTabPermissionManager* active_tab_permission_manager() {
|
| - return &active_tab_permission_manager_;
|
| + return active_tab_permission_manager_.get();
|
| }
|
|
|
| // Sets a non-extension app icon associated with WebContents and fires an
|
| @@ -127,6 +122,9 @@ class TabHelper : public content::WebContentsObserver,
|
| const content::LoadCommittedDetails& details,
|
| const content::FrameNavigateParams& params) OVERRIDE;
|
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
| + virtual void DidCloneToNewWebContents(
|
| + content::WebContents* old_web_contents,
|
| + content::WebContents* new_web_contents) OVERRIDE;
|
|
|
| // ExtensionFunctionDispatcher::Delegate overrides.
|
| virtual extensions::WindowController* GetExtensionWindowController()
|
| @@ -215,13 +213,11 @@ class TabHelper : public content::WebContentsObserver,
|
|
|
| content::NotificationRegistrar registrar_;
|
|
|
| - TabContents* tab_contents_;
|
| -
|
| ScriptExecutor script_executor_;
|
|
|
| scoped_ptr<LocationBarController> location_bar_controller_;
|
|
|
| - ActiveTabPermissionManager active_tab_permission_manager_;
|
| + scoped_ptr<ActiveTabPermissionManager> active_tab_permission_manager_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TabHelper);
|
| };
|
|
|