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

Side by Side Diff: base/scoped_clipboard_writer.cc

Issue 11247: Remove cf_html from webdropdata.h. This is windows (Closed)
Patch Set: fix feedback Created 12 years, 1 month 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
« no previous file with comments | « base/clipboard_win.cc ('k') | chrome/browser/web_contents_view_win.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/scoped_clipboard_writer.h" 5 #include "base/scoped_clipboard_writer.h"
6 6
7 #include "base/clipboard.h" 7 #include "base/clipboard.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 9
10 ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard) 10 ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard)
(...skipping 20 matching lines...) Expand all
31 void ScopedClipboardWriter::WriteHTML(const std::wstring& markup, 31 void ScopedClipboardWriter::WriteHTML(const std::wstring& markup,
32 const std::string& src_url) { 32 const std::string& src_url) {
33 if (markup.empty()) 33 if (markup.empty())
34 return; 34 return;
35 35
36 std::string utf8_markup = WideToUTF8(markup); 36 std::string utf8_markup = WideToUTF8(markup);
37 37
38 Clipboard::ObjectMapParams params; 38 Clipboard::ObjectMapParams params;
39 params.push_back( 39 params.push_back(
40 Clipboard::ObjectMapParam(utf8_markup.begin(), 40 Clipboard::ObjectMapParam(utf8_markup.begin(),
41 utf8_markup.end())); 41 utf8_markup.end()));
42 if (!src_url.empty()) { 42 if (!src_url.empty()) {
43 params.push_back(Clipboard::ObjectMapParam(src_url.begin(), 43 params.push_back(Clipboard::ObjectMapParam(src_url.begin(),
44 src_url.end())); 44 src_url.end()));
45 } 45 }
46 46
47 objects_[Clipboard::CBF_HTML] = params; 47 objects_[Clipboard::CBF_HTML] = params;
48 } 48 }
49 49
50 void ScopedClipboardWriter::WriteBookmark(const std::wstring& title, 50 void ScopedClipboardWriter::WriteBookmark(const std::wstring& title,
51 const std::string& url) { 51 const std::string& url) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 size_t size_len = sizeof(gfx::Size); 121 size_t size_len = sizeof(gfx::Size);
122 for (size_t i = 0; i < size_len; i++) 122 for (size_t i = 0; i < size_len; i++)
123 param2.push_back(size_data[i]); 123 param2.push_back(size_data[i]);
124 124
125 Clipboard::ObjectMapParams params; 125 Clipboard::ObjectMapParams params;
126 params.push_back(param1); 126 params.push_back(param1);
127 params.push_back(param2); 127 params.push_back(param2);
128 objects_[Clipboard::CBF_BITMAP] = params; 128 objects_[Clipboard::CBF_BITMAP] = params;
129 } 129 }
130 #endif // defined(OS_WIN) 130 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « base/clipboard_win.cc ('k') | chrome/browser/web_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698