Chromium Code Reviews| 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 "third_party/skia/include/core/SkBitmap.h" | 7 #include "third_party/skia/include/core/SkBitmap.h" |
| 8 #include "ui/gfx/size.h" | 8 #include "ui/gfx/size.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 // Various format we support. | 14 // Various format we support. |
| 15 const char kPlainTextFormat[] = "text"; | 15 const char kPlainTextFormat[] = "text"; |
| 16 const char kHTMLFormat[] = "html"; | 16 const char kHTMLFormat[] = "html"; |
| 17 const char kRTFFormat[] = "rtf"; | |
|
dcheng
2012/03/29 18:30:58
Will the earlier patch break because GetRtfFormatT
| |
| 17 const char kBitmapFormat[] = "bitmap"; | 18 const char kBitmapFormat[] = "bitmap"; |
| 18 const char kWebKitSmartPasteFormat[] = "webkit_smart"; | 19 const char kWebKitSmartPasteFormat[] = "webkit_smart"; |
| 19 const char kBookmarkFormat[] = "bookmark"; | 20 const char kBookmarkFormat[] = "bookmark"; |
| 20 const char kMimeTypeWebCustomData[] = "chromium/x-web-custom-data"; | 21 const char kMimeTypeWebCustomData[] = "chromium/x-web-custom-data"; |
| 21 | 22 |
| 22 } // namespace | 23 } // namespace |
| 23 | 24 |
| 24 Clipboard::FormatType::FormatType() { | 25 Clipboard::FormatType::FormatType() { |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 return type; | 129 return type; |
| 129 } | 130 } |
| 130 | 131 |
| 131 // static | 132 // static |
| 132 const Clipboard::FormatType& Clipboard::GetHtmlFormatType() { | 133 const Clipboard::FormatType& Clipboard::GetHtmlFormatType() { |
| 133 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kHTMLFormat)); | 134 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kHTMLFormat)); |
| 134 return type; | 135 return type; |
| 135 } | 136 } |
| 136 | 137 |
| 137 // static | 138 // static |
| 139 const Clipboard::FormatType& Clipboard::GetRtfFormatType() { | |
| 140 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kRTFFormat)); | |
| 141 return type; | |
| 142 } | |
| 143 | |
| 144 // static | |
| 138 const Clipboard::FormatType& Clipboard::GetBitmapFormatType() { | 145 const Clipboard::FormatType& Clipboard::GetBitmapFormatType() { |
| 139 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kBitmapFormat)); | 146 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kBitmapFormat)); |
| 140 return type; | 147 return type; |
| 141 } | 148 } |
| 142 | 149 |
| 143 // static | 150 // static |
| 144 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { | 151 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { |
| 145 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); | 152 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); |
| 146 return type; | 153 return type; |
| 147 } | 154 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 void Clipboard::Clear() { | 189 void Clipboard::Clear() { |
| 183 } | 190 } |
| 184 | 191 |
| 185 void Clipboard::ClearInternalClipboard() const { | 192 void Clipboard::ClearInternalClipboard() const { |
| 186 } | 193 } |
| 187 | 194 |
| 188 void Clipboard::Set(const std::string& key, const std::string& value) { | 195 void Clipboard::Set(const std::string& key, const std::string& value) { |
| 189 } | 196 } |
| 190 | 197 |
| 191 } // namespace ui | 198 } // namespace ui |
| OLD | NEW |