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

Unified Diff: ui/base/clipboard/clipboard.h

Issue 12298037: Revert 183123 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1417/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « content/public/browser/browser_context.h ('k') | ui/base/clipboard/clipboard.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard.h
===================================================================
--- ui/base/clipboard/clipboard.h (revision 183210)
+++ ui/base/clipboard/clipboard.h (working copy)
@@ -9,7 +9,6 @@
#include <string>
#include <vector>
-#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/process.h"
@@ -170,12 +169,6 @@
typedef std::vector<ObjectMapParam> ObjectMapParams;
typedef std::map<int /* ObjectType */, ObjectMapParams> ObjectMap;
- // WriteObject() caller can use the SourceTag that will be stored in the
- // clipboard. NULL value means "no tag".
- typedef void* SourceTag;
- static ObjectMapParam SourceTag2Binary(SourceTag tag);
- static SourceTag Binary2SourceTag(const std::string& serialization);
-
// Buffer designates which clipboard the action should be applied to.
// Only platforms that use the X Window System support the selection
// buffer.
@@ -184,13 +177,6 @@
BUFFER_SELECTION,
};
- // The callback is called after Clipboard::WriteObjects().
- // Don't use it for notification about changed OS clipboard.
- void set_write_objects_callback_for_testing(
- const base::Callback<void(Buffer)>& cb) {
- write_objects_callback_ = cb;
- }
-
static bool IsValidBuffer(int32 buffer) {
switch (buffer) {
case BUFFER_STANDARD:
@@ -228,9 +214,7 @@
// contents of |objects|. On Windows they are copied to the system clipboard.
// On linux they are copied into a structure owned by the Clipboard object and
// kept until the system clipboard is set again.
- // SourceTag is optional value to be stored in the clipboard, NULL won't be
- // stored.
- void WriteObjects(Buffer buffer, const ObjectMap& objects, SourceTag tag);
+ void WriteObjects(Buffer buffer, const ObjectMap& objects);
// Returns a sequence number which uniquely identifies clipboard state.
// This can be used to version the data on the clipboard and determine
@@ -277,9 +261,6 @@
// as a byte vector.
void ReadData(const FormatType& format, std::string* result) const;
- // Reads Source tag from the clipboard, if available.
- SourceTag ReadSourceTag(Buffer buffer) const;
-
// Gets the FormatType corresponding to an arbitrary format string,
// registering it with the system if needed. Due to Windows/Linux
// limitiations, |format_string| must never be controlled by the user.
@@ -302,7 +283,6 @@
// crbug.com/158399.
static const FormatType& GetWebCustomDataFormatType();
static const FormatType& GetPepperCustomDataFormatType();
- static const FormatType& GetSourceTagFormatType();
// Embeds a pointer to a SharedMemory object pointed to by |bitmap_handle|
// belonging to |process| into a shared bitmap [CBF_SMBITMAP] slot in
@@ -330,8 +310,6 @@
void DispatchObject(ObjectType type, const ObjectMapParams& params);
- void WriteObjectsImpl(Buffer buffer, const ObjectMap& objects, SourceTag tag);
-
void WriteText(const char* text_data, size_t text_len);
void WriteHTML(const char* markup_data,
@@ -353,8 +331,6 @@
void WriteData(const FormatType& format,
const char* data_data,
size_t data_len);
-
- void WriteSourceTag(SourceTag tag);
#if defined(OS_WIN)
void WriteBitmapFromHandle(HBITMAP source_hbitmap,
const gfx::Size& size);
@@ -398,26 +374,17 @@
// Find the gtk clipboard for the passed buffer enum.
GtkClipboard* LookupBackingClipboard(Buffer clipboard) const;
- // Reads raw data from the specified clipboard with the given format type.
- void ReadDataImpl(Buffer buffer,
- const FormatType& format,
- std::string* result) const;
TargetMap* clipboard_data_;
GtkClipboard* clipboard_;
GtkClipboard* primary_selection_;
#elif defined(USE_AURA) && defined(USE_X11) && !defined(OS_CHROMEOS)
private:
- // Reads raw data from the specified clipboard with the given format type.
- void ReadDataImpl(Buffer buffer,
- const FormatType& format,
- std::string* result) const;
// We keep our implementation details private because otherwise we bring in
// the X11 headers and break chrome compile.
class AuraX11Details;
scoped_ptr<AuraX11Details> aurax11_details_;
#endif
- base::Callback<void(Buffer)> write_objects_callback_;
DISALLOW_COPY_AND_ASSIGN(Clipboard);
};
« no previous file with comments | « content/public/browser/browser_context.h ('k') | ui/base/clipboard/clipboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698