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 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Would be nice if this were in UTCoreTypes.h, but it isn't | 29 // Would be nice if this were in UTCoreTypes.h, but it isn't |
30 NSString* const kUTTypeURLName = @"public.url-name"; | 30 NSString* const kUTTypeURLName = @"public.url-name"; |
31 | 31 |
32 // Tells us if WebKit was the last to write to the pasteboard. There's no | 32 // Tells us if WebKit was the last to write to the pasteboard. There's no |
33 // actual data associated with this type. | 33 // actual data associated with this type. |
34 NSString* const kWebSmartPastePboardType = @"NeXT smart paste pasteboard type"; | 34 NSString* const kWebSmartPastePboardType = @"NeXT smart paste pasteboard type"; |
35 | 35 |
| 36 // Pepper custom data format type. |
| 37 NSString* const kPepperCustomDataPboardType = |
| 38 @"org.chromium.pepper-custom-data"; |
| 39 |
36 NSPasteboard* GetPasteboard() { | 40 NSPasteboard* GetPasteboard() { |
37 // The pasteboard should not be nil in a UI session, but this handy DCHECK | 41 // The pasteboard should not be nil in a UI session, but this handy DCHECK |
38 // can help track down problems if someone tries using clipboard code outside | 42 // can help track down problems if someone tries using clipboard code outside |
39 // of a UI session. | 43 // of a UI session. |
40 NSPasteboard* pasteboard = [NSPasteboard generalPasteboard]; | 44 NSPasteboard* pasteboard = [NSPasteboard generalPasteboard]; |
41 DCHECK(pasteboard); | 45 DCHECK(pasteboard); |
42 return pasteboard; | 46 return pasteboard; |
43 } | 47 } |
44 | 48 |
45 } // namespace | 49 } // namespace |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kWebSmartPastePboardType)); | 472 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kWebSmartPastePboardType)); |
469 return type; | 473 return type; |
470 } | 474 } |
471 | 475 |
472 // static | 476 // static |
473 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { | 477 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { |
474 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kWebCustomDataPboardType)); | 478 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kWebCustomDataPboardType)); |
475 return type; | 479 return type; |
476 } | 480 } |
477 | 481 |
| 482 // static |
| 483 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { |
| 484 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kPepperCustomDataPboardType)); |
| 485 return type; |
| 486 } |
| 487 |
478 } // namespace ui | 488 } // namespace ui |
OLD | NEW |