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

Unified Diff: extensions/browser/extensions_browser_client.h

Issue 2379573008: Add SetImageData api to chrome.clipboard. (Closed)
Patch Set: Address code review comments and add test cases. Created 4 years 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
Index: extensions/browser/extensions_browser_client.h
diff --git a/extensions/browser/extensions_browser_client.h b/extensions/browser/extensions_browser_client.h
index 5ddbde70f6bb7e88071e2e6b119ebeed6427e785..c1c3630fd640cbcf8a4249d2f5d313df8dc1e716 100644
--- a/extensions/browser/extensions_browser_client.h
+++ b/extensions/browser/extensions_browser_client.h
@@ -14,6 +14,7 @@
#include "content/public/browser/bluetooth_chooser.h"
#include "extensions/browser/extension_event_histogram_value.h"
#include "extensions/browser/extension_prefs_observer.h"
+#include "extensions/common/api/clipboard.h"
#include "extensions/common/view_type.h"
class ExtensionFunctionRegistry;
@@ -44,6 +45,8 @@ class UpdateClient;
namespace extensions {
+namespace clipboard = api::clipboard;
Devlin 2016/12/09 15:23:54 ditto (https://codereview.chromium.org/2379573008/
jennyz 2016/12/14 01:15:36 Done.
+
class ComponentExtensionResourceManager;
class Extension;
class ExtensionCache;
@@ -223,6 +226,13 @@ class ExtensionsBrowserClient {
// is left up to the embedder.
virtual bool IsMinBrowserVersionSupported(const std::string& min_version) = 0;
+ // Saves image data on clipboard.
+ virtual void SaveImageDataToClipboard(
+ const std::vector<char>& image_data,
+ clipboard::ImageType type,
+ const base::Closure& success_callback,
+ const base::Closure& error_callback) = 0;
+
// Embedders can override this function to handle extension errors.
virtual void ReportError(content::BrowserContext* context,
std::unique_ptr<ExtensionError> error);

Powered by Google App Engine
This is Rietveld 408576698