| Index: chrome/browser/ui/bookmarks/bookmark_tab_helper.h
|
| diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
|
| index e2a9b2bdd6209fecd2cdbf93c1f0a65597a2bf5f..b4321b724509c0f5c372ce248bf9dc0b0f7d7300 100644
|
| --- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
|
| +++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
|
| @@ -5,17 +5,22 @@
|
| #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_TAB_HELPER_H_
|
| #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_TAB_HELPER_H_
|
|
|
| +#include "chrome/browser/tab_contents/web_contents_user_data.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
|
|
| -class BookmarkTabHelperDelegate;
|
| -class TabContents;
|
| struct BookmarkNodeData;
|
| +class BookmarkTabHelperDelegate;
|
| +
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
|
|
| // Per-tab class to manage bookmarks.
|
| class BookmarkTabHelper : public content::NotificationObserver,
|
| - public content::WebContentsObserver {
|
| + public content::WebContentsObserver,
|
| + public WebContentsUserData<BookmarkTabHelper> {
|
| public:
|
| // BookmarkDrag --------------------------------------------------------------
|
| // Interface for forwarding bookmark drag and drop to extenstions.
|
| @@ -30,7 +35,6 @@ class BookmarkTabHelper : public content::NotificationObserver,
|
| virtual ~BookmarkDrag() {}
|
| };
|
|
|
| - explicit BookmarkTabHelper(TabContents* tab_contents);
|
| virtual ~BookmarkTabHelper();
|
|
|
| bool is_starred() const { return is_starred_; }
|
| @@ -61,6 +65,10 @@ class BookmarkTabHelper : public content::NotificationObserver,
|
| BookmarkTabHelper::BookmarkDrag* GetBookmarkDragDelegate();
|
|
|
| private:
|
| + explicit BookmarkTabHelper(content::WebContents* web_contents);
|
| + static int kUserDataKey;
|
| + friend class WebContentsUserData<BookmarkTabHelper>;
|
| +
|
| // Updates the starred state from the bookmark bar model. If the state has
|
| // changed, the delegate is notified.
|
| void UpdateStarredStateForCurrentURL();
|
| @@ -71,9 +79,6 @@ class BookmarkTabHelper : public content::NotificationObserver,
|
| // Registers and unregisters us for notifications.
|
| content::NotificationRegistrar registrar_;
|
|
|
| - // Owning TabContents.
|
| - TabContents* tab_contents_;
|
| -
|
| // Delegate for notifying our owner (usually Browser) about stuff. Not owned
|
| // by us.
|
| BookmarkTabHelperDelegate* delegate_;
|
|
|