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

Unified Diff: chrome/browser/ui/snapshot_tab_helper.h

Issue 10909282: Switch SnapshotTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/pdf/pdf_browsertest.cc ('k') | chrome/browser/ui/snapshot_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/snapshot_tab_helper.h
diff --git a/chrome/browser/ui/snapshot_tab_helper.h b/chrome/browser/ui/snapshot_tab_helper.h
index 2664db0c468a01516fdd1b4231db0e13bd7cb083..ca3ba699d834b530d17f574afd12ac9c9dc776fd 100644
--- a/chrome/browser/ui/snapshot_tab_helper.h
+++ b/chrome/browser/ui/snapshot_tab_helper.h
@@ -5,21 +5,25 @@
#ifndef CHROME_BROWSER_UI_SNAPSHOT_TAB_HELPER_H_
#define CHROME_BROWSER_UI_SNAPSHOT_TAB_HELPER_H_
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/web_contents_observer.h"
class SkBitmap;
-class TabContents;
// Per-tab class to handle snapshot functionality.
-class SnapshotTabHelper : public content::WebContentsObserver {
+class SnapshotTabHelper : public content::WebContentsObserver,
+ public WebContentsUserData<SnapshotTabHelper> {
public:
- explicit SnapshotTabHelper(content::WebContents* tab);
virtual ~SnapshotTabHelper();
// Captures a snapshot of the page.
void CaptureSnapshot();
private:
+ explicit SnapshotTabHelper(content::WebContents* web_contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<SnapshotTabHelper>;
+
// content::WebContentsObserver overrides:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
« no previous file with comments | « chrome/browser/ui/pdf/pdf_browsertest.cc ('k') | chrome/browser/ui/snapshot_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698