| 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 b398e70c10d922a5d580e57890fb54a6e511300c..228dd33eb02d6ae25ff08fa47cc8d296638f110b 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.h
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.h
|
| @@ -15,7 +15,7 @@
|
| #include "components/ui/zoom/zoom_controller.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| -#include "extensions/browser/api/capture_web_contents_function.h"
|
| +#include "extensions/browser/api/capture_web_contents.h"
|
| #include "extensions/browser/api/execute_code_function.h"
|
| #include "extensions/common/extension_resource.h"
|
| #include "extensions/common/user_script.h"
|
| @@ -195,21 +195,28 @@ class TabsDetectLanguageFunction : public ChromeAsyncExtensionFunction,
|
| content::NotificationRegistrar registrar_;
|
| DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE)
|
| };
|
| -class TabsCaptureVisibleTabFunction
|
| - : public extensions::CaptureWebContentsFunction {
|
| +
|
| +class TabsCaptureVisibleTabFunction : public extensions::CaptureWebContents,
|
| + public AsyncExtensionFunction {
|
| public:
|
| TabsCaptureVisibleTabFunction();
|
| static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
|
|
| + // ExtensionFunction implementation.
|
| + bool HasPermission() override;
|
| + bool RunAsync() override;
|
| +
|
| protected:
|
| ~TabsCaptureVisibleTabFunction() override {}
|
|
|
| private:
|
| ChromeExtensionFunctionDetails chrome_details_;
|
|
|
| - // extensions::CaptureWebContentsFunction:
|
| + content::WebContents* GetWebContentsForID(int window_id);
|
| +
|
| + // extensions::CaptureWebContents:
|
| bool IsScreenshotEnabled() override;
|
| - content::WebContents* GetWebContentsForID(int id) override;
|
| + void OnCaptureSuccess(const SkBitmap& bitmap) override;
|
| void OnCaptureFailure(FailureReason reason) override;
|
|
|
| DECLARE_EXTENSION_FUNCTION("tabs.captureVisibleTab", TABS_CAPTUREVISIBLETAB)
|
|
|