diff options
| author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-10 22:01:15 +0000 |
|---|---|---|
| committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-10 22:01:15 +0000 |
| commit | c033cbe94c504d2346c5e99c1ac12fda41f3f46a (patch) | |
| tree | 85e1dae7db66e8cf0cc56edb64d15d4a59a70010 /chrome/browser | |
| parent | 75d52ac5b9e0c0531b17095a5750918c281a7f0d (diff) | |
| download | chromium_src-c033cbe94c504d2346c5e99c1ac12fda41f3f46a.zip chromium_src-c033cbe94c504d2346c5e99c1ac12fda41f3f46a.tar.gz chromium_src-c033cbe94c504d2346c5e99c1ac12fda41f3f46a.tar.bz2 | |
This changes the base clipboard class, as accomplishing paste requires that Clipboard::FormatType be IPC-able. The lowest-common denominator of unsigned int, NSString*, and GdkAtom is string, so string it is. (Linux changes by estade.)
Review URL: http://codereview.chromium.org/41012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
3 files changed, 4 insertions, 9 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index 6df7ff4..a25845d 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -2017,7 +2017,7 @@ void AutocompleteEditViewWin::TextChanged() { std::wstring AutocompleteEditViewWin::GetClipboardText() const { // Try text format. ClipboardService* clipboard = g_browser_process->clipboard_service(); - if (clipboard->IsFormatAvailable(CF_UNICODETEXT)) { + if (clipboard->IsFormatAvailable(Clipboard::GetPlainTextWFormatType())) { std::wstring text; clipboard->ReadText(&text); diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 4fce635..8492cc6 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -540,15 +540,10 @@ void ResourceMessageFilter::OnClipboardWriteObjects( new WriteClipboardTask(long_living_objects)); } -void ResourceMessageFilter::OnClipboardIsFormatAvailable(unsigned int format, - bool* result) { -#if defined(OS_WIN) +void ResourceMessageFilter::OnClipboardIsFormatAvailable( + Clipboard::FormatType format, bool* result) { DCHECK(result); *result = GetClipboardService()->IsFormatAvailable(format); -#else - NOTIMPLEMENTED(); // TODO(port) this function should take a - // Clipboard::FormatType instead of an int. -#endif } void ResourceMessageFilter::OnClipboardReadText(string16* result) { diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 823685a..55ce1be 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -155,7 +155,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, void OnReceiveContextMenuMsg(const IPC::Message& msg); // Clipboard messages void OnClipboardWriteObjects(const Clipboard::ObjectMap& objects); - void OnClipboardIsFormatAvailable(unsigned int format, bool* result); + void OnClipboardIsFormatAvailable(Clipboard::FormatType format, bool* result); void OnClipboardReadText(string16* result); void OnClipboardReadAsciiText(std::string* result); void OnClipboardReadHTML(string16* markup, GURL* src_url); |
