summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 20:56:19 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 20:56:19 +0000
commit3d4a691b9495479f49eaac0b2ff9411e34208b3a (patch)
tree46b193a3855ca14bacc14d57408d283d75abfd81 /ui
parent78600f488d65bd1e5c64e590a4e20c1bceebbe59 (diff)
downloadchromium_src-3d4a691b9495479f49eaac0b2ff9411e34208b3a.zip
chromium_src-3d4a691b9495479f49eaac0b2ff9411e34208b3a.tar.gz
chromium_src-3d4a691b9495479f49eaac0b2ff9411e34208b3a.tar.bz2
Add stubs and glue for routing a request for an image from the clipboard.
BUG=75237 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78134 Review URL: http://codereview.chromium.org/6625075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/clipboard/clipboard.h4
-rw-r--r--ui/base/clipboard/clipboard_linux.cc9
-rw-r--r--ui/base/clipboard/clipboard_mac.mm8
-rw-r--r--ui/base/clipboard/clipboard_win.cc8
4 files changed, 29 insertions, 0 deletions
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index 715e6ea..bb3bc29 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -148,6 +148,10 @@ class Clipboard {
// Reads HTML from the clipboard, if available.
void ReadHTML(Buffer buffer, string16* markup, std::string* src_url) const;
+ // Reads an image from the clipboard, if available. The returned data will be
+ // encoded in PNG format.
+ void ReadImage(Buffer buffer, std::string* data) const;
+
// Reads a bookmark from the clipboard, if available.
void ReadBookmark(string16* title, std::string* url) const;
diff --git a/ui/base/clipboard/clipboard_linux.cc b/ui/base/clipboard/clipboard_linux.cc
index f9ec174..3bb1e88 100644
--- a/ui/base/clipboard/clipboard_linux.cc
+++ b/ui/base/clipboard/clipboard_linux.cc
@@ -360,6 +360,15 @@ void Clipboard::ReadHTML(Clipboard::Buffer buffer, string16* markup,
gtk_selection_data_free(data);
}
+void Clipboard::ReadImage(Buffer buffer, std::string* data) const {
+ // TODO(dcheng): implement this.
+ NOTIMPLEMENTED();
+ if (!data) {
+ NOTREACHED();
+ return;
+ }
+}
+
void Clipboard::ReadBookmark(string16* title, std::string* url) const {
// TODO(estade): implement this.
NOTIMPLEMENTED();
diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm
index 89ad97d..2761eba 100644
--- a/ui/base/clipboard/clipboard_mac.mm
+++ b/ui/base/clipboard/clipboard_mac.mm
@@ -222,6 +222,14 @@ void Clipboard::ReadHTML(Clipboard::Buffer buffer, string16* markup,
src_url->clear();
}
+void Clipboard::ReadImage(Buffer buffer, std::string* data) const {
+ DCHECK_EQ(buffer, BUFFER_STANDARD);
+ if (!data) {
+ NOTREACHED();
+ return;
+ }
+}
+
void Clipboard::ReadBookmark(string16* title, std::string* url) const {
NSPasteboard* pb = GetPasteboard();
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 88a1ff5..603779b 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -404,6 +404,14 @@ void Clipboard::ReadHTML(Clipboard::Buffer buffer, string16* markup,
markup->assign(UTF8ToWide(markup_utf8));
}
+void Clipboard::ReadImage(Buffer buffer, std::string* data) const {
+ DCHECK_EQ(buffer, BUFFER_STANDARD);
+ if (!data) {
+ NOTREACHED();
+ return;
+ }
+}
+
void Clipboard::ReadBookmark(string16* title, std::string* url) const {
if (title)
title->clear();