| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/base/clipboard/clipboard.h" | 5 #include "ui/base/clipboard/clipboard.h" |
| 6 | 6 |
| 7 #include <X11/extensions/Xfixes.h> | 7 #include <X11/extensions/Xfixes.h> |
| 8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 if (format.Equals(GetBitmapFormatType())) | 784 if (format.Equals(GetBitmapFormatType())) |
| 785 return; | 785 return; |
| 786 | 786 |
| 787 std::vector<unsigned char> bytes(data_data, data_data + data_len); | 787 std::vector<unsigned char> bytes(data_data, data_data + data_len); |
| 788 scoped_refptr<base::RefCountedMemory> mem( | 788 scoped_refptr<base::RefCountedMemory> mem( |
| 789 base::RefCountedBytes::TakeVector(&bytes)); | 789 base::RefCountedBytes::TakeVector(&bytes)); |
| 790 aurax11_details_->InsertMapping(format.ToString(), mem); | 790 aurax11_details_->InsertMapping(format.ToString(), mem); |
| 791 } | 791 } |
| 792 | 792 |
| 793 // static | 793 // static |
| 794 Clipboard::FormatType Clipboard::GetFormatType( | 794 Clipboard::FormatType Clipboard::GetFormatTypeInternal( |
| 795 const std::string& format_string) { | 795 const std::string& format_string) { |
| 796 return FormatType::Deserialize(format_string); | 796 return FormatType::Deserialize(format_string); |
| 797 } | 797 } |
| 798 | 798 |
| 799 // static | 799 // static |
| 800 const Clipboard::FormatType& Clipboard::GetUrlFormatType() { | 800 const Clipboard::FormatType& Clipboard::GetUrlFormatType() { |
| 801 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeURIList)); | 801 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeURIList)); |
| 802 return type; | 802 return type; |
| 803 } | 803 } |
| 804 | 804 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 } | 848 } |
| 849 | 849 |
| 850 // static | 850 // static |
| 851 const Clipboard::FormatType& Clipboard::GetWebKitSmartPasteFormatType() { | 851 const Clipboard::FormatType& Clipboard::GetWebKitSmartPasteFormatType() { |
| 852 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebkitSmartPaste)); | 852 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebkitSmartPaste)); |
| 853 return type; | 853 return type; |
| 854 } | 854 } |
| 855 | 855 |
| 856 // static | 856 // static |
| 857 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { | 857 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { |
| 858 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); | 858 CR_DEFINE_STATIC_LOCAL( |
| 859 FormatType, type, (GetFormatType(kMimeTypeWebCustomData))); |
| 859 return type; | 860 return type; |
| 860 } | 861 } |
| 861 | 862 |
| 862 // static | 863 // static |
| 863 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { | 864 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { |
| 864 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); | 865 CR_DEFINE_STATIC_LOCAL( |
| 866 FormatType, type, (GetFormatType(kMimeTypePepperCustomData))); |
| 865 return type; | 867 return type; |
| 866 } | 868 } |
| 867 | 869 |
| 868 } // namespace ui | 870 } // namespace ui |
| OLD | NEW |