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 #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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // functions accept a buffer parameter. | 88 // functions accept a buffer parameter. |
89 enum Buffer { | 89 enum Buffer { |
90 BUFFER_STANDARD, | 90 BUFFER_STANDARD, |
91 BUFFER_SELECTION, | 91 BUFFER_SELECTION, |
92 }; | 92 }; |
93 | 93 |
94 static bool IsValidBuffer(int32 buffer) { | 94 static bool IsValidBuffer(int32 buffer) { |
95 switch (buffer) { | 95 switch (buffer) { |
96 case BUFFER_STANDARD: | 96 case BUFFER_STANDARD: |
97 return true; | 97 return true; |
98 #if defined(USE_X11) | 98 #if defined(USE_X11) && !defined(USE_AURA) |
99 case BUFFER_SELECTION: | 99 case BUFFER_SELECTION: |
100 return true; | 100 return true; |
101 #endif | 101 #endif |
102 } | 102 } |
103 return false; | 103 return false; |
104 } | 104 } |
105 | 105 |
106 static Buffer FromInt(int32 buffer) { | 106 static Buffer FromInt(int32 buffer) { |
107 return static_cast<Buffer>(buffer); | 107 return static_cast<Buffer>(buffer); |
108 } | 108 } |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 static const char kMimeTypeText[]; | 286 static const char kMimeTypeText[]; |
287 static const char kMimeTypeHTML[]; | 287 static const char kMimeTypeHTML[]; |
288 static const char kMimeTypePNG[]; | 288 static const char kMimeTypePNG[]; |
289 | 289 |
290 DISALLOW_COPY_AND_ASSIGN(Clipboard); | 290 DISALLOW_COPY_AND_ASSIGN(Clipboard); |
291 }; | 291 }; |
292 | 292 |
293 } // namespace ui | 293 } // namespace ui |
294 | 294 |
295 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ | 295 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_H_ |
OLD | NEW |