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

Unified Diff: extensions/browser/api/clipboard/clipboard_api.h

Issue 2379573008: Add SetImageData api to chrome.clipboard. (Closed)
Patch Set: Fix nits. Created 3 years, 11 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 | « extensions/browser/api/BUILD.gn ('k') | extensions/browser/api/clipboard/clipboard_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/clipboard/clipboard_api.h
diff --git a/extensions/browser/api/clipboard/clipboard_api.h b/extensions/browser/api/clipboard/clipboard_api.h
index 57d2a4c8cbb05209ab1498464d2bc468ad422d54..00be111d57453fe3e868f8e426d471bd97d4c702 100644
--- a/extensions/browser/api/clipboard/clipboard_api.h
+++ b/extensions/browser/api/clipboard/clipboard_api.h
@@ -7,6 +7,7 @@
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_function.h"
+#include "extensions/common/api/clipboard.h"
#include "ui/base/clipboard/clipboard_observer.h"
namespace extensions {
@@ -32,6 +33,18 @@ class ClipboardAPI : public BrowserContextKeyedAPI,
content::BrowserContext* const browser_context_;
};
+class ClipboardSetImageDataFunction : public UIThreadExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("clipboard.setImageData", CLIPBOARD_SETIMAGEDATA);
+
+ protected:
+ ~ClipboardSetImageDataFunction() override;
+ ResponseAction Run() override;
+
+ void OnSaveImageDataSuccess();
+ void OnSaveImageDataError(const std::string& error);
+};
+
} // namespace extensions
#endif // EXTENSIONS_BROWSER_API_CLIPBOARD_CLIPBOARD_API_H_
« no previous file with comments | « extensions/browser/api/BUILD.gn ('k') | extensions/browser/api/clipboard/clipboard_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698