From 97c2c0304fcda75890b4490ca5e6d569db30ca6d Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Wed, 7 Jul 2010 22:43:41 +0000 Subject: Implement new Chromium IPCs for copying/dragging. A new ClipboardDispatcher interface has been added to handle the IPC calls. The new methods don't really belong on the existing Clipboard class, since that class deals with only copy and paste. On Windows and Mac, ClipboardDispatcher will share logic for copy/paste and drag/drop. GTK will have to use two separate code paths. BUG=31037 TEST=none Review URL: http://codereview.chromium.org/2842016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51790 0039d316-1c4b-4281-b951-d872f2087c98 --- app/clipboard/clipboard.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/clipboard/clipboard.h b/app/clipboard/clipboard.h index b149d8d..0c0e5b7 100644 --- a/app/clipboard/clipboard.h +++ b/app/clipboard/clipboard.h @@ -79,9 +79,8 @@ class Clipboard { // functions accept a buffer parameter. enum Buffer { BUFFER_STANDARD, -#if defined(USE_X11) BUFFER_SELECTION, -#endif + BUFFER_DRAG, }; static bool IsValidBuffer(int32 buffer) { @@ -92,6 +91,8 @@ class Clipboard { case BUFFER_SELECTION: return true; #endif + case BUFFER_DRAG: + return true; } return false; } @@ -150,6 +151,8 @@ class Clipboard { // Reads raw data from the clipboard with the given format type. Stores result // as a byte vector. + // TODO(dcheng): Due to platform limitations on Windows, we should make sure + // format is never controlled by the user. void ReadData(const std::string& format, std::string* result); // Get format Identifiers for various types. -- cgit v1.1