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

Unified Diff: extensions/browser/api/capture_web_contents_function.h

Issue 522763002: Moving capture_web_contents_function to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Explicitly instantiate the template. Created 6 years, 3 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 | « chrome/chrome_browser_extensions.gypi ('k') | extensions/browser/api/capture_web_contents_function_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | extensions/browser/api/capture_web_contents_function_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698