| 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 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 5 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
| 6 #define UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 6 #define UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/shared_memory.h" | 15 #include "base/memory/shared_memory.h" |
| 16 #include "base/process/process.h" | 16 #include "base/process/process.h" |
| 17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 18 #include "base/threading/platform_thread.h" | 18 #include "base/threading/platform_thread.h" |
| 19 #include "base/threading/thread_checker.h" | 19 #include "base/threading/thread_checker.h" |
| 20 #include "ui/base/clipboard/clipboard_types.h" | 20 #include "ui/base/clipboard/clipboard_types.h" |
| 21 #include "ui/base/ui_export.h" | 21 #include "ui/base/ui_base_export.h" |
| 22 | 22 |
| 23 #if defined(TOOLKIT_GTK) | 23 #if defined(TOOLKIT_GTK) |
| 24 #include <gdk/gdk.h> | 24 #include <gdk/gdk.h> |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
| 28 #include <objidl.h> | 28 #include <objidl.h> |
| 29 #elif defined(OS_ANDROID) | 29 #elif defined(OS_ANDROID) |
| 30 #include <jni.h> | 30 #include <jni.h> |
| 31 | 31 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 57 | 57 |
| 58 #ifdef __OBJC__ | 58 #ifdef __OBJC__ |
| 59 @class NSString; | 59 @class NSString; |
| 60 #else | 60 #else |
| 61 class NSString; | 61 class NSString; |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 namespace ui { | 64 namespace ui { |
| 65 class ClipboardTest; | 65 class ClipboardTest; |
| 66 | 66 |
| 67 class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { | 67 class UI_BASE_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { |
| 68 public: | 68 public: |
| 69 // MIME type constants. | 69 // MIME type constants. |
| 70 static const char kMimeTypeText[]; | 70 static const char kMimeTypeText[]; |
| 71 static const char kMimeTypeURIList[]; | 71 static const char kMimeTypeURIList[]; |
| 72 static const char kMimeTypeDownloadURL[]; | 72 static const char kMimeTypeDownloadURL[]; |
| 73 static const char kMimeTypeHTML[]; | 73 static const char kMimeTypeHTML[]; |
| 74 static const char kMimeTypeRTF[]; | 74 static const char kMimeTypeRTF[]; |
| 75 static const char kMimeTypePNG[]; | 75 static const char kMimeTypePNG[]; |
| 76 | 76 |
| 77 // Platform neutral holder for native data representation of a clipboard type. | 77 // Platform neutral holder for native data representation of a clipboard type. |
| 78 struct UI_EXPORT FormatType { | 78 struct UI_BASE_EXPORT FormatType { |
| 79 FormatType(); | 79 FormatType(); |
| 80 ~FormatType(); | 80 ~FormatType(); |
| 81 | 81 |
| 82 // Serializes and deserializes a FormatType for use in IPC messages. | 82 // Serializes and deserializes a FormatType for use in IPC messages. |
| 83 std::string Serialize() const; | 83 std::string Serialize() const; |
| 84 static FormatType Deserialize(const std::string& serialization); | 84 static FormatType Deserialize(const std::string& serialization); |
| 85 | 85 |
| 86 #if defined(OS_WIN) || defined(USE_AURA) | 86 #if defined(OS_WIN) || defined(USE_AURA) |
| 87 // FormatType can be used in a set on some platforms. | 87 // FormatType can be used in a set on some platforms. |
| 88 bool operator<(const FormatType& other) const; | 88 bool operator<(const FormatType& other) const; |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 class AuraX11Details; | 391 class AuraX11Details; |
| 392 scoped_ptr<AuraX11Details> aurax11_details_; | 392 scoped_ptr<AuraX11Details> aurax11_details_; |
| 393 #endif | 393 #endif |
| 394 | 394 |
| 395 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 395 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
| 396 }; | 396 }; |
| 397 | 397 |
| 398 } // namespace ui | 398 } // namespace ui |
| 399 | 399 |
| 400 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 400 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
| OLD | NEW |