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

Side by Side Diff: ui/base/clipboard/clipboard_win.cc

Issue 6685063: Fix glue for ClipboardHostMsg_ReadAvailableTypes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 9 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 | « ui/base/clipboard/clipboard_mac.mm ('k') | webkit/glue/webkit_glue.h » ('j') | 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) 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 // Many of these functions are based on those found in 5 // Many of these functions are based on those found in
6 // webkit/port/platform/PasteboardWin.cpp 6 // webkit/port/platform/PasteboardWin.cpp
7 7
8 #include "ui/base/clipboard/clipboard.h" 8 #include "ui/base/clipboard/clipboard.h"
9 9
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 324 }
325 325
326 bool Clipboard::IsFormatAvailableByString( 326 bool Clipboard::IsFormatAvailableByString(
327 const std::string& ascii_format, Clipboard::Buffer buffer) const { 327 const std::string& ascii_format, Clipboard::Buffer buffer) const {
328 DCHECK_EQ(buffer, BUFFER_STANDARD); 328 DCHECK_EQ(buffer, BUFFER_STANDARD);
329 std::wstring wide_format = ASCIIToWide(ascii_format); 329 std::wstring wide_format = ASCIIToWide(ascii_format);
330 CLIPFORMAT format = ::RegisterClipboardFormat(wide_format.c_str()); 330 CLIPFORMAT format = ::RegisterClipboardFormat(wide_format.c_str());
331 return ::IsClipboardFormatAvailable(format) != FALSE; 331 return ::IsClipboardFormatAvailable(format) != FALSE;
332 } 332 }
333 333
334 void Clipboard::ReadAvailableTypes(Clipboard::Buffer buffer,
335 std::vector<string16>* types,
336 bool* contains_filenames) const {
337 if (!types || !contains_filenames) {
338 NOTREACHED();
339 return;
340 }
341
342 // TODO(dcheng): Implement me.
343 types->clear();
344 *contains_filenames = false;
345 }
346
334 void Clipboard::ReadText(Clipboard::Buffer buffer, string16* result) const { 347 void Clipboard::ReadText(Clipboard::Buffer buffer, string16* result) const {
335 DCHECK_EQ(buffer, BUFFER_STANDARD); 348 DCHECK_EQ(buffer, BUFFER_STANDARD);
336 if (!result) { 349 if (!result) {
337 NOTREACHED(); 350 NOTREACHED();
338 return; 351 return;
339 } 352 }
340 353
341 result->clear(); 354 result->clear();
342 355
343 // Acquire the clipboard. 356 // Acquire the clipboard.
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", 618 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass",
606 L"ClipboardOwnerWindow", 619 L"ClipboardOwnerWindow",
607 0, 0, 0, 0, 0, 620 0, 0, 0, 0, 0,
608 HWND_MESSAGE, 621 HWND_MESSAGE,
609 0, 0, 0); 622 0, 0, 0);
610 } 623 }
611 return clipboard_owner_; 624 return clipboard_owner_;
612 } 625 }
613 626
614 } // namespace ui 627 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_mac.mm ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698