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/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "third_party/skia/include/core/SkBitmap.h" | 15 #include "third_party/skia/include/core/SkBitmap.h" |
16 #include "ui/base/clipboard/custom_data_helper.h" | 16 #include "ui/base/clipboard/custom_data_helper.h" |
17 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 | 20 |
21 namespace { | 21 namespace { |
22 const char kMimeTypeFilename[] = "chromium/filename"; | 22 const char kMimeTypeFilename[] = "chromium/filename"; |
23 const char kMimeTypeBitmap[] = "image/bmp"; | 23 const char kMimeTypeBitmap[] = "image/bmp"; |
| 24 const char kMimeTypePepperCustomData[] = "chromium/x-pepper-custom-data"; |
24 const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste"; | 25 const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste"; |
25 const size_t kMaxClipboardSize = 1; | 26 const size_t kMaxClipboardSize = 1; |
26 | 27 |
27 // Clipboard data format used by AuraClipboard. | 28 // Clipboard data format used by AuraClipboard. |
28 enum AuraClipboardFormat { | 29 enum AuraClipboardFormat { |
29 TEXT = 1 << 0, | 30 TEXT = 1 << 0, |
30 HTML = 1 << 1, | 31 HTML = 1 << 1, |
31 RTF = 1 << 2, | 32 RTF = 1 << 2, |
32 BOOKMARK = 1 << 3, | 33 BOOKMARK = 1 << 3, |
33 BITMAP = 1 << 4, | 34 BITMAP = 1 << 4, |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebkitSmartPaste)); | 664 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebkitSmartPaste)); |
664 return type; | 665 return type; |
665 } | 666 } |
666 | 667 |
667 // static | 668 // static |
668 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { | 669 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { |
669 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); | 670 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypeWebCustomData)); |
670 return type; | 671 return type; |
671 } | 672 } |
672 | 673 |
| 674 // static |
| 675 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { |
| 676 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); |
| 677 return type; |
| 678 } |
| 679 |
673 } // namespace ui | 680 } // namespace ui |
OLD | NEW |