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

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

Issue 8865004: Create CoreTabHelper, move remaining core TCW functionality into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lots of helpers now Created 9 years 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
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
new file mode 100644
index 0000000000000000000000000000000000000000..2e343e561c94c94c7433e35439fc7c4ce86db66b
--- /dev/null
+++ b/chrome/browser/ui/snapshot_tab_helper.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_SNAPSHOT_TAB_HELPER_H_
+#define CHROME_BROWSER_UI_SNAPSHOT_TAB_HELPER_H_
+#pragma once
+
+#include "content/browser/tab_contents/tab_contents_observer.h"
+
+class SkBitmap;
+class TabContentsWrapper;
+
+// Per-tab class to handle snapshot functionality.
+class SnapshotTabHelper : public TabContentsObserver {
+ public:
+ explicit SnapshotTabHelper(TabContentsWrapper* wrapper);
+ virtual ~SnapshotTabHelper();
+
+ // Captures a snapshot of the page.
+ void CaptureSnapshot();
+
+ private:
+ // TabContentsObserver overrides:
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // Internal helpers ----------------------------------------------------------
+
+ // Message handler.
+ void OnSnapshot(const SkBitmap& bitmap);
+
+ // Our owning TabContentsWrapper.
+ TabContentsWrapper* wrapper_;
+
+ DISALLOW_COPY_AND_ASSIGN(SnapshotTabHelper);
+};
+
+#endif // CHROME_BROWSER_UI_SNAPSHOT_TAB_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698