| Index: ui/base/clipboard/clipboard_aurax11.cc
|
| ===================================================================
|
| --- ui/base/clipboard/clipboard_aurax11.cc (revision 183210)
|
| +++ ui/base/clipboard/clipboard_aurax11.cc (working copy)
|
| @@ -39,7 +39,6 @@
|
| const char kMimeTypePepperCustomData[] = "chromium/x-pepper-custom-data";
|
| const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste";
|
| const char kMultiple[] = "MULTIPLE";
|
| -const char kSourceTagType[] = "org.chromium.source-tag";
|
| const char kString[] = "STRING";
|
| const char kTargets[] = "TARGETS";
|
| const char kText[] = "TEXT";
|
| @@ -53,7 +52,6 @@
|
| kMimeTypeMozillaURL,
|
| kMimeTypeWebkitSmartPaste,
|
| kMultiple,
|
| - kSourceTagType,
|
| kString,
|
| kTargets,
|
| kText,
|
| @@ -887,9 +885,7 @@
|
| // current selection to live on.
|
| }
|
|
|
| -void Clipboard::WriteObjectsImpl(Buffer buffer,
|
| - const ObjectMap& objects,
|
| - SourceTag tag) {
|
| +void Clipboard::WriteObjects(Buffer buffer, const ObjectMap& objects) {
|
| DCHECK(CalledOnValidThread());
|
| DCHECK(IsValidBuffer(buffer));
|
|
|
| @@ -898,7 +894,6 @@
|
| iter != objects.end(); ++iter) {
|
| DispatchObject(static_cast<ObjectType>(iter->first), iter->second);
|
| }
|
| - WriteSourceTag(tag);
|
| aurax11_details_->TakeOwnershipOfSelection(buffer);
|
|
|
| if (buffer == BUFFER_STANDARD) {
|
| @@ -907,7 +902,6 @@
|
| aurax11_details_->CreateNewClipboardData();
|
| const ObjectMapParam& char_vector = text_iter->second[0];
|
| WriteText(&char_vector.front(), char_vector.size());
|
| - WriteSourceTag(tag);
|
| aurax11_details_->TakeOwnershipOfSelection(BUFFER_SELECTION);
|
| }
|
| }
|
| @@ -1054,26 +1048,14 @@
|
| }
|
|
|
| void Clipboard::ReadData(const FormatType& format, std::string* result) const {
|
| - ReadDataImpl(BUFFER_STANDARD, format, result);
|
| -}
|
| -
|
| -void Clipboard::ReadDataImpl(Buffer buffer,
|
| - const FormatType& format,
|
| - std::string* result) const {
|
| DCHECK(CalledOnValidThread());
|
|
|
| scoped_ptr<SelectionData> data(aurax11_details_->RequestAndWaitForTypes(
|
| - buffer, aurax11_details_->GetAtomsForFormat(format)));
|
| + BUFFER_STANDARD, aurax11_details_->GetAtomsForFormat(format)));
|
| if (data.get())
|
| data->AssignTo(result);
|
| }
|
|
|
| -Clipboard::SourceTag Clipboard::ReadSourceTag(Buffer buffer) const {
|
| - std::string result;
|
| - ReadDataImpl(buffer, GetSourceTagFormatType(), &result);
|
| - return Binary2SourceTag(result);
|
| -}
|
| -
|
| uint64 Clipboard::GetSequenceNumber(Buffer buffer) {
|
| DCHECK(CalledOnValidThread());
|
| if (buffer == BUFFER_STANDARD)
|
| @@ -1155,13 +1137,6 @@
|
| aurax11_details_->InsertMapping(format.ToString(), data, data_len);
|
| }
|
|
|
| -void Clipboard::WriteSourceTag(SourceTag tag) {
|
| - if (tag != SourceTag()) {
|
| - ObjectMapParam binary = SourceTag2Binary(tag);
|
| - WriteData(GetSourceTagFormatType(), &binary[0], binary.size());
|
| - }
|
| -}
|
| -
|
| // static
|
| Clipboard::FormatType Clipboard::GetFormatType(
|
| const std::string& format_string) {
|
| @@ -1237,10 +1212,4 @@
|
| return type;
|
| }
|
|
|
| -// static
|
| -const Clipboard::FormatType& Clipboard::GetSourceTagFormatType() {
|
| - CR_DEFINE_STATIC_LOCAL(FormatType, type, (kSourceTagType));
|
| - return type;
|
| -}
|
| -
|
| } // namespace ui
|
|
|