summaryrefslogtreecommitdiffstats
path: root/content/browser/clipboard_dispatcher.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 15:48:12 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 15:48:12 +0000
commit763ec4ca15b4a013b0317b6d83605a265a23de88 (patch)
tree5b7adfd13a5900845f60defed544be0e1a2c1069 /content/browser/clipboard_dispatcher.h
parent3bf507190c888faded38122a5f138347bdd6e617 (diff)
downloadchromium_src-763ec4ca15b4a013b0317b6d83605a265a23de88.zip
chromium_src-763ec4ca15b4a013b0317b6d83605a265a23de88.tar.gz
chromium_src-763ec4ca15b4a013b0317b6d83605a265a23de88.tar.bz2
Pick off the lowest hanging fruits in removing the chrome includes from content\browser. I moved clipboard_dispatcher.* and content_restriction.h which should have moved originally.
Review URL: http://codereview.chromium.org/6893122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/clipboard_dispatcher.h')
-rw-r--r--content/browser/clipboard_dispatcher.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/content/browser/clipboard_dispatcher.h b/content/browser/clipboard_dispatcher.h
new file mode 100644
index 0000000..7b62d0c
--- /dev/null
+++ b/content/browser/clipboard_dispatcher.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_CLIPBOARD_DISPATCHER_H_
+#define CONTENT_BROWSER_CLIPBOARD_DISPATCHER_H_
+#pragma once
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/string16.h"
+#include "ui/base/clipboard/clipboard.h"
+
+// This class backs IPC requests from the renderer for clipboard data. In this
+// context, clipboard does not only refer to the usual concept of a clipboard
+// for copy/paste, which is why it's not in app/clipboard/clipboard.h. It can
+// refer to one of three different types of clipboards:
+// - The copy/paste clipboard, which contains data that has been copied/cut.
+// - The dragging clipboard, which contains data that is currently being
+// dragged.
+// - On X, the selection clipboard, which contains data for the current
+// selection.
+class ClipboardDispatcher {
+ public:
+ static bool ReadAvailableTypes(ui::Clipboard::Buffer buffer,
+ std::vector<string16>* types,
+ bool* contains_filenames);
+ static bool ReadData(ui::Clipboard::Buffer buffer, const string16& type,
+ string16* data, string16* metadata);
+ static bool ReadFilenames(ui::Clipboard::Buffer buffer,
+ std::vector<string16>* filenames);
+
+ private:
+ // This class is not meant to be instantiated. All public members are static.
+ ClipboardDispatcher();
+
+ DISALLOW_COPY_AND_ASSIGN(ClipboardDispatcher);
+};
+
+#endif // CONTENT_BROWSER_CLIPBOARD_DISPATCHER_H_