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 29 matching lines...) Expand all Loading... |
40 // It mostly just provides APIs to cleanly access and manipulate this data. | 40 // It mostly just provides APIs to cleanly access and manipulate this data. |
41 class ClipboardData { | 41 class ClipboardData { |
42 public: | 42 public: |
43 ClipboardData() | 43 ClipboardData() |
44 : web_smart_paste_(false), | 44 : web_smart_paste_(false), |
45 format_(0) {} | 45 format_(0) {} |
46 | 46 |
47 virtual ~ClipboardData() {} | 47 virtual ~ClipboardData() {} |
48 | 48 |
49 // Bitmask of AuraClipboardFormat types. | 49 // Bitmask of AuraClipboardFormat types. |
50 const int format() const { return format_; } | 50 int format() const { return format_; } |
51 | 51 |
52 const std::string& text() const { return text_; } | 52 const std::string& text() const { return text_; } |
53 void set_text(const std::string& text) { | 53 void set_text(const std::string& text) { |
54 text_ = text; | 54 text_ = text; |
55 format_ |= TEXT; | 55 format_ |= TEXT; |
56 } | 56 } |
57 | 57 |
58 const std::string& markup_data() const { return markup_data_; } | 58 const std::string& markup_data() const { return markup_data_; } |
59 void set_markup_data(const std::string& markup_data) { | 59 void set_markup_data(const std::string& markup_data) { |
60 markup_data_ = markup_data; | 60 markup_data_ = markup_data; |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 return type; | 664 return type; |
665 } | 665 } |
666 | 666 |
667 // static | 667 // static |
668 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { | 668 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { |
669 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); | 669 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); |
670 return type; | 670 return type; |
671 } | 671 } |
672 | 672 |
673 } // namespace ui | 673 } // namespace ui |
OLD | NEW |