summaryrefslogtreecommitdiffstats
path: root/ui/base/clipboard
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 00:01:39 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-16 00:01:39 +0000
commit46c39f3ba687831eb0bdee81d7b893af50235110 (patch)
tree5299bb6ed1c065cf4035e38b493040d85ea26cc9 /ui/base/clipboard
parent93dcf3daff5c052873091f7ed33b3a21b15a184f (diff)
downloadchromium_src-46c39f3ba687831eb0bdee81d7b893af50235110.zip
chromium_src-46c39f3ba687831eb0bdee81d7b893af50235110.tar.gz
chromium_src-46c39f3ba687831eb0bdee81d7b893af50235110.tar.bz2
Fix glue for ClipboardHostMsg_ReadAvailableTypes.
Since we no longer plan on using this message to service both drags and pasteboard requests, update the glue to call ui::base::Clipboard directly. Eventually, the remaining functions in ClipboardDispatcher will also be moved and/or deleted and the empty class removed. BUG=75237 TEST=none Review URL: http://codereview.chromium.org/6685063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/clipboard')
-rw-r--r--ui/base/clipboard/clipboard.h3
-rw-r--r--ui/base/clipboard/clipboard_linux.cc14
-rw-r--r--ui/base/clipboard/clipboard_mac.mm13
-rw-r--r--ui/base/clipboard/clipboard_win.cc13
4 files changed, 43 insertions, 0 deletions
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index bb3bc29..2d040c8 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -139,6 +139,9 @@ class Clipboard {
bool IsFormatAvailableByString(const std::string& format,
Buffer buffer) const;
+ void ReadAvailableTypes(Buffer buffer, std::vector<string16>* types,
+ bool* contains_filenames) const;
+
// Reads UNICODE text from the clipboard, if available.
void ReadText(Buffer buffer, string16* result) const;
diff --git a/ui/base/clipboard/clipboard_linux.cc b/ui/base/clipboard/clipboard_linux.cc
index 3bb1e88..07ea6b7 100644
--- a/ui/base/clipboard/clipboard_linux.cc
+++ b/ui/base/clipboard/clipboard_linux.cc
@@ -292,6 +292,20 @@ bool Clipboard::IsFormatAvailableByString(const std::string& format,
return IsFormatAvailable(format, buffer);
}
+void Clipboard::ReadAvailableTypes(Clipboard::Buffer buffer,
+ std::vector<string16>* types,
+ bool* contains_filenames) const {
+ if (!types || !contains_filenames) {
+ NOTREACHED();
+ return;
+ }
+
+ // TODO(dcheng): Implement me.
+ types->clear();
+ *contains_filenames = false;
+}
+
+
void Clipboard::ReadText(Clipboard::Buffer buffer, string16* result) const {
GtkClipboard* clipboard = LookupBackingClipboard(buffer);
if (clipboard == NULL)
diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm
index 77f5952..be1908b 100644
--- a/ui/base/clipboard/clipboard_mac.mm
+++ b/ui/base/clipboard/clipboard_mac.mm
@@ -177,6 +177,19 @@ bool Clipboard::IsFormatAvailable(const Clipboard::FormatType& format,
return [types containsObject:format_ns];
}
+void Clipboard::ReadAvailableTypes(Clipboard::Buffer buffer,
+ std::vector<string16>* types,
+ bool* contains_filenames) const {
+ if (!types || !contains_filenames) {
+ NOTREACHED();
+ return;
+ }
+
+ // TODO(dcheng): Implement me.
+ types->clear();
+ *contains_filenames = false;
+}
+
void Clipboard::ReadText(Clipboard::Buffer buffer, string16* result) const {
DCHECK_EQ(buffer, BUFFER_STANDARD);
NSPasteboard* pb = GetPasteboard();
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 603779b..4380b00 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -331,6 +331,19 @@ bool Clipboard::IsFormatAvailableByString(
return ::IsClipboardFormatAvailable(format) != FALSE;
}
+void Clipboard::ReadAvailableTypes(Clipboard::Buffer buffer,
+ std::vector<string16>* types,
+ bool* contains_filenames) const {
+ if (!types || !contains_filenames) {
+ NOTREACHED();
+ return;
+ }
+
+ // TODO(dcheng): Implement me.
+ types->clear();
+ *contains_filenames = false;
+}
+
void Clipboard::ReadText(Clipboard::Buffer buffer, string16* result) const {
DCHECK_EQ(buffer, BUFFER_STANDARD);
if (!result) {