OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/webclipboard_impl.h" | 5 #include "content/renderer/webclipboard_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 } | 197 } |
198 | 198 |
199 bool WebClipboardImpl::ConvertBufferType(Buffer buffer, | 199 bool WebClipboardImpl::ConvertBufferType(Buffer buffer, |
200 ui::ClipboardType* result) { | 200 ui::ClipboardType* result) { |
201 *result = ui::CLIPBOARD_TYPE_COPY_PASTE; | 201 *result = ui::CLIPBOARD_TYPE_COPY_PASTE; |
202 switch (buffer) { | 202 switch (buffer) { |
203 case BufferStandard: | 203 case BufferStandard: |
204 break; | 204 break; |
205 case BufferSelection: | 205 case BufferSelection: |
206 #if defined(USE_X11) | 206 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
207 #if defined(OS_CHROMEOS) | |
208 // Chrome OS only supports the standard clipboard, | |
209 // but not the X selection clipboad. | |
210 return false; | |
211 #else | |
212 *result = ui::CLIPBOARD_TYPE_SELECTION; | 207 *result = ui::CLIPBOARD_TYPE_SELECTION; |
213 break; | 208 break; |
214 #endif | 209 #else |
| 210 // Chrome OS and non-X11 unix builds do not support |
| 211 // the X selection clipboad. |
| 212 // TODO: remove the need for this case, see http://crbug.com/361753 |
| 213 return false; |
215 #endif | 214 #endif |
216 default: | 215 default: |
217 NOTREACHED(); | 216 NOTREACHED(); |
218 return false; | 217 return false; |
219 } | 218 } |
220 return true; | 219 return true; |
221 } | 220 } |
222 | 221 |
223 } // namespace content | 222 } // namespace content |
OLD | NEW |