OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "ui/gfx/linux_util.h" | 10 #include "ui/gfx/linux_util.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 namespace { | 15 namespace { |
16 const char kMimeTypeBitmap[] = "image/bmp"; | 16 const char kMimeTypeBitmap[] = "image/bmp"; |
17 const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste"; | 17 const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste"; |
| 18 // TODO(dcheng): This name is temporary. See crbug.com/106449 |
| 19 const char kMimeTypeWebCustomData[] = "chromium/x-web-custom-data"; |
18 | 20 |
19 // ClipboardData contains data copied to the Clipboard for a variety of formats. | 21 // ClipboardData contains data copied to the Clipboard for a variety of formats. |
20 // It mostly just provides APIs to cleanly access and manipulate this data. | 22 // It mostly just provides APIs to cleanly access and manipulate this data. |
21 class ClipboardData { | 23 class ClipboardData { |
22 public: | 24 public: |
23 ClipboardData() | 25 ClipboardData() |
24 : bitmap_data_(), | 26 : bitmap_data_(), |
25 custom_data_data_(), | 27 custom_data_data_(), |
26 custom_data_len_(0), | 28 custom_data_len_(0), |
27 web_smart_paste_(false) {} | 29 web_smart_paste_(false) {} |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 // static | 326 // static |
325 Clipboard::FormatType Clipboard::GetBitmapFormatType() { | 327 Clipboard::FormatType Clipboard::GetBitmapFormatType() { |
326 return std::string(kMimeTypeBitmap); | 328 return std::string(kMimeTypeBitmap); |
327 } | 329 } |
328 | 330 |
329 // static | 331 // static |
330 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() { | 332 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() { |
331 return std::string(kMimeTypeWebkitSmartPaste); | 333 return std::string(kMimeTypeWebkitSmartPaste); |
332 } | 334 } |
333 | 335 |
| 336 // static |
| 337 Clipboard::FormatType Clipboard::GetWebCustomDataFormatType() { |
| 338 return std::string(kMimeTypeWebCustomData); |
| 339 } |
| 340 |
334 } // namespace ui | 341 } // namespace ui |
OLD | NEW |