| Index: chrome/browser/extensions/api/tabs/tabs_api.h
|
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h
|
| index d60abfe4a26617c5e37a590d3f9493639c56bfeb..9077284ab2b0ea46f33e506906f7545cbb94647c 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.h
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.h
|
| @@ -174,8 +174,7 @@ class TabsDetectLanguageFunction : public AsyncExtensionFunction,
|
| content::NotificationRegistrar registrar_;
|
| DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE)
|
| };
|
| -class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction,
|
| - public content::NotificationObserver {
|
| +class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction {
|
| public:
|
| static void RegisterUserPrefs(PrefRegistrySyncable* registry);
|
|
|
| @@ -191,16 +190,18 @@ class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction,
|
| 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);
|
|
|
| - content::NotificationRegistrar registrar_;
|
| + // 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();
|
|
|
| // The format (JPEG vs PNG) of the resulting image. Set in RunImpl().
|
| ImageFormat image_format_;
|
|
|