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

Unified Diff: chrome/common/render_messages.h

Issue 174367: Change the ChromiumPasteboard to have a notion of an alternate clipboard... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
Index: chrome/common/render_messages.h
===================================================================
--- chrome/common/render_messages.h (revision 25640)
+++ chrome/common/render_messages.h (working copy)
@@ -10,6 +10,7 @@
#include <map>
#include "base/basictypes.h"
+#include "base/clipboard.h"
#include "base/gfx/native_widget_types.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
@@ -2186,6 +2187,39 @@
}
};
+template <>
+struct ParamTraits<Clipboard::Buffer> {
+ typedef Clipboard::Buffer param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteInt(p);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ int buffer;
+ if (!m->ReadInt(iter, &buffer) || !Clipboard::IsValidBuffer(buffer))
+ return false;
+ *p = Clipboard::FromInt(buffer);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ std::wstring type;
+ switch (p) {
+ case Clipboard::BUFFER_STANDARD:
+ type = L"BUFFER_STANDARD";
+ break;
+#if defined(OS_LINUX)
+ case Clipboard::BUFFER_SELECTION:
+ type = L"BUFFER_SELECTION";
+ break;
+#endif
+ default:
+ type = L"UNKNOWN";
+ break;
+ }
+
+ LogParam(type, l);
+ }
+};
+
} // namespace IPC
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter_gtk.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698