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

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

Issue 6698011: Revert r78134+r78136 (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/webclipboard_impl.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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 std::string html_fragment(static_cast<const char*>(::GlobalLock(data))); 397 std::string html_fragment(static_cast<const char*>(::GlobalLock(data)));
398 ::GlobalUnlock(data); 398 ::GlobalUnlock(data);
399 399
400 std::string markup_utf8; 400 std::string markup_utf8;
401 ClipboardUtil::CFHtmlToHtml(html_fragment, markup ? &markup_utf8 : NULL, 401 ClipboardUtil::CFHtmlToHtml(html_fragment, markup ? &markup_utf8 : NULL,
402 src_url); 402 src_url);
403 if (markup) 403 if (markup)
404 markup->assign(UTF8ToWide(markup_utf8)); 404 markup->assign(UTF8ToWide(markup_utf8));
405 } 405 }
406 406
407 void Clipboard::ReadImage(Buffer buffer, std::string* data) const {
408 DCHECK_EQ(buffer, BUFFER_STANDARD);
409 if (!data) {
410 NOTREACHED();
411 return;
412 }
413 }
414
415 void Clipboard::ReadBookmark(string16* title, std::string* url) const { 407 void Clipboard::ReadBookmark(string16* title, std::string* url) const {
416 if (title) 408 if (title)
417 title->clear(); 409 title->clear();
418 410
419 if (url) 411 if (url)
420 url->clear(); 412 url->clear();
421 413
422 // Acquire the clipboard. 414 // Acquire the clipboard.
423 ScopedClipboard clipboard; 415 ScopedClipboard clipboard;
424 if (!clipboard.Acquire(GetClipboardWindow())) 416 if (!clipboard.Acquire(GetClipboardWindow()))
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", 597 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass",
606 L"ClipboardOwnerWindow", 598 L"ClipboardOwnerWindow",
607 0, 0, 0, 0, 0, 599 0, 0, 0, 0, 0,
608 HWND_MESSAGE, 600 HWND_MESSAGE,
609 0, 0, 0); 601 0, 0, 0);
610 } 602 }
611 return clipboard_owner_; 603 return clipboard_owner_;
612 } 604 }
613 605
614 } // namespace ui 606 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_mac.mm ('k') | webkit/glue/webclipboard_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698