| 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_;
|
|
|