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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.h

Issue 12746009: Revert 189969 "Add RenderWidgetHost::GetSnapshotFromRenderer met..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1450/src/
Patch Set: Created 7 years, 9 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 | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/tabs/tabs_api.h
===================================================================
--- chrome/browser/extensions/api/tabs/tabs_api.h (revision 190011)
+++ chrome/browser/extensions/api/tabs/tabs_api.h (working copy)
@@ -174,7 +174,8 @@
content::NotificationRegistrar registrar_;
DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE)
};
-class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction {
+class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction,
+ public content::NotificationObserver {
public:
static void RegisterUserPrefs(PrefRegistrySyncable* registry);
@@ -190,18 +191,16 @@
virtual ~TabsCaptureVisibleTabFunction() {}
virtual bool RunImpl() OVERRIDE;
virtual bool GetTabToCapture(content::WebContents** web_contents);
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
void SendResultFromBitmap(const SkBitmap& screen_capture);
private:
- // Callback for the RWH::CopyFromBackingStore call.
void CopyFromBackingStoreComplete(bool succeeded,
const SkBitmap& bitmap);
- // Callback for the RWH::GetSnapshotFromRenderer call. This path is used if
- // CopyFromBackingStore fails for some reason.
- void GetSnapshotFromRendererComplete(bool succeeded,
- const SkBitmap& bitmap);
- void SendInternalError();
+ content::NotificationRegistrar registrar_;
// The format (JPEG vs PNG) of the resulting image. Set in RunImpl().
ImageFormat image_format_;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698