Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: content/renderer/webclipboard_impl.cc

Issue 224843013: don't hit NOTREACHED when pasting on non-x11 non-chromeos unix builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leave TODO note Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698