Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Side by Side Diff: chrome/browser/extensions/tab_helper.h

Issue 10993064: Make using WebContentsUserData simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
6 #define CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 ActiveTabPermissionGranter* active_tab_permission_granter() { 138 ActiveTabPermissionGranter* active_tab_permission_granter() {
139 return active_tab_permission_granter_.get(); 139 return active_tab_permission_granter_.get();
140 } 140 }
141 141
142 // Sets a non-extension app icon associated with WebContents and fires an 142 // Sets a non-extension app icon associated with WebContents and fires an
143 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title. 143 // INVALIDATE_TYPE_TITLE navigation state change to trigger repaint of title.
144 void SetAppIcon(const SkBitmap& app_icon); 144 void SetAppIcon(const SkBitmap& app_icon);
145 145
146 private: 146 private:
147 explicit TabHelper(content::WebContents* web_contents); 147 explicit TabHelper(content::WebContents* web_contents);
148 static int kUserDataKey;
149 friend class WebContentsUserData<TabHelper>; 148 friend class WebContentsUserData<TabHelper>;
150 149
151 // content::WebContentsObserver overrides. 150 // content::WebContentsObserver overrides.
152 virtual void RenderViewCreated( 151 virtual void RenderViewCreated(
153 content::RenderViewHost* render_view_host) OVERRIDE; 152 content::RenderViewHost* render_view_host) OVERRIDE;
154 virtual void DidNavigateMainFrame( 153 virtual void DidNavigateMainFrame(
155 const content::LoadCommittedDetails& details, 154 const content::LoadCommittedDetails& details,
156 const content::FrameNavigateParams& params) OVERRIDE; 155 const content::FrameNavigateParams& params) OVERRIDE;
157 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 156 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
158 virtual void DidCloneToNewWebContents( 157 virtual void DidCloneToNewWebContents(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 scoped_ptr<LocationBarController> location_bar_controller_; 253 scoped_ptr<LocationBarController> location_bar_controller_;
255 254
256 scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_; 255 scoped_ptr<ActiveTabPermissionGranter> active_tab_permission_granter_;
257 256
258 DISALLOW_COPY_AND_ASSIGN(TabHelper); 257 DISALLOW_COPY_AND_ASSIGN(TabHelper);
259 }; 258 };
260 259
261 } // namespace extensions 260 } // namespace extensions
262 261
263 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_ 262 #endif // CHROME_BROWSER_EXTENSIONS_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698