Chromium Code Reviews| Index: extensions/browser/api/capture_web_contents_function.h |
| diff --git a/chrome/browser/extensions/api/capture_web_contents_function.h b/extensions/browser/api/capture_web_contents_function.h |
| similarity index 87% |
| rename from chrome/browser/extensions/api/capture_web_contents_function.h |
| rename to extensions/browser/api/capture_web_contents_function.h |
| index 0f3b9dbaf67139a668df60db86fad262dae220d2..b77c3d69772e480053e78b3ff2a7c33803852277 100644 |
| --- a/chrome/browser/extensions/api/capture_web_contents_function.h |
| +++ b/extensions/browser/api/capture_web_contents_function.h |
| @@ -5,7 +5,6 @@ |
| #ifndef CHROME_BROWSER_EXTENSIONS_API_CAPTURE_WEB_CONTENTS_FUNCTION_H_ |
| #define CHROME_BROWSER_EXTENSIONS_API_CAPTURE_WEB_CONTENTS_FUNCTION_H_ |
| -#include "chrome/browser/extensions/chrome_extension_function.h" |
| #include "extensions/common/api/extension_types.h" |
| class SkBitmap; |
| @@ -18,12 +17,13 @@ namespace extensions { |
| // Base class for capturing visibile area of a WebContents. |
| // This is used by both webview.captureVisibleRegion and tabs.captureVisibleTab. |
|
Ken Rockot(use gerrit already)
2014/09/04 01:27:50
Please document T here, as it is not obvious at fi
|
| -class CaptureWebContentsFunction : public ChromeAsyncExtensionFunction { |
| +template <typename T> |
| +class CaptureWebContentsFunction : public T { |
| public: |
| - CaptureWebContentsFunction(); |
| + CaptureWebContentsFunction() {} |
| protected: |
| - virtual ~CaptureWebContentsFunction(); |
| + virtual ~CaptureWebContentsFunction() {} |
| // ExtensionFunction implementation. |
| virtual bool HasPermission() OVERRIDE; |
| @@ -39,6 +39,9 @@ class CaptureWebContentsFunction : public ChromeAsyncExtensionFunction { |
| }; |
| virtual void OnCaptureFailure(FailureReason reason) = 0; |
| + // ValidationFailure override to match RunAsync(). |
| + static bool ValidationFailure(CaptureWebContentsFunction* function); |
| + |
| private: |
| typedef core_api::extension_types::ImageDetails ImageDetails; |