| 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 <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 ClipboardDataBuilder::WriteBitmap(bitmap); | 594 ClipboardDataBuilder::WriteBitmap(bitmap); |
| 595 } | 595 } |
| 596 | 596 |
| 597 void Clipboard::WriteData(const FormatType& format, | 597 void Clipboard::WriteData(const FormatType& format, |
| 598 const char* data_data, | 598 const char* data_data, |
| 599 size_t data_len) { | 599 size_t data_len) { |
| 600 ClipboardDataBuilder::WriteData(format.ToString(), data_data, data_len); | 600 ClipboardDataBuilder::WriteData(format.ToString(), data_data, data_len); |
| 601 } | 601 } |
| 602 | 602 |
| 603 // static | 603 // static |
| 604 Clipboard::FormatType Clipboard::GetFormatType( | 604 Clipboard::FormatType Clipboard::GetFormatTypeInternal( |
| 605 const std::string& format_string) { | 605 const std::string& format_string) { |
| 606 return FormatType::Deserialize(format_string); | 606 return FormatType::Deserialize(format_string); |
| 607 } | 607 } |
| 608 | 608 |
| 609 // static | 609 // static |
| 610 const Clipboard::FormatType& Clipboard::GetUrlFormatType() { | 610 const Clipboard::FormatType& Clipboard::GetUrlFormatType() { |
| 611 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeURIList)); | 611 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeURIList)); |
| 612 return type; | 612 return type; |
| 613 } | 613 } |
| 614 | 614 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 658 } |
| 659 | 659 |
| 660 // static | 660 // static |
| 661 const Clipboard::FormatType& Clipboard::GetWebKitSmartPasteFormatType() { | 661 const Clipboard::FormatType& Clipboard::GetWebKitSmartPasteFormatType() { |
| 662 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebkitSmartPaste)); | 662 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebkitSmartPaste)); |
| 663 return type; | 663 return type; |
| 664 } | 664 } |
| 665 | 665 |
| 666 // static | 666 // static |
| 667 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { | 667 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { |
| 668 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); | 668 CR_DEFINE_STATIC_LOCAL( |
| 669 FormatType, type, (GetFormatType(kMimeTypeWebCustomData))); |
| 669 return type; | 670 return type; |
| 670 } | 671 } |
| 671 | 672 |
| 672 // static | 673 // static |
| 673 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { | 674 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { |
| 674 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); | 675 CR_DEFINE_STATIC_LOCAL( |
| 676 FormatType, type, (GetFormatType(kMimeTypePepperCustomData))); |
| 675 return type; | 677 return type; |
| 676 } | 678 } |
| 677 | 679 |
| 678 } // namespace ui | 680 } // namespace ui |
| OLD | NEW |