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

Side by Side Diff: webkit/glue/webclipboard_impl.cc

Issue 6317016: Change UTF8ToUTF16 to accept const StringPiece&. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 10 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 | « webkit/appcache/view_appcache_internals_job.cc ('k') | webkit/plugins/npapi/plugin_group.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) 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 #include "webkit/glue/webclipboard_impl.h" 5 #include "webkit/glue/webclipboard_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void WebClipboardImpl::writePlainText(const WebString& plain_text) { 138 void WebClipboardImpl::writePlainText(const WebString& plain_text) {
139 ScopedClipboardWriterGlue scw(ClipboardGetClipboard()); 139 ScopedClipboardWriterGlue scw(ClipboardGetClipboard());
140 scw.WriteText(plain_text); 140 scw.WriteText(plain_text);
141 } 141 }
142 142
143 void WebClipboardImpl::writeURL(const WebURL& url, const WebString& title) { 143 void WebClipboardImpl::writeURL(const WebURL& url, const WebString& title) {
144 ScopedClipboardWriterGlue scw(ClipboardGetClipboard()); 144 ScopedClipboardWriterGlue scw(ClipboardGetClipboard());
145 145
146 scw.WriteBookmark(title, url.spec()); 146 scw.WriteBookmark(title, url.spec());
147 scw.WriteHTML(UTF8ToUTF16(URLToMarkup(url, title)), ""); 147 scw.WriteHTML(UTF8ToUTF16(URLToMarkup(url, title)), "");
148 scw.WriteText(UTF8ToUTF16(url.spec())); 148 scw.WriteText(UTF8ToUTF16(std::string(url.spec())));
149 } 149 }
150 150
151 void WebClipboardImpl::writeImage( 151 void WebClipboardImpl::writeImage(
152 const WebImage& image, const WebURL& url, const WebString& title) { 152 const WebImage& image, const WebURL& url, const WebString& title) {
153 ScopedClipboardWriterGlue scw(ClipboardGetClipboard()); 153 ScopedClipboardWriterGlue scw(ClipboardGetClipboard());
154 154
155 if (!image.isNull()) { 155 if (!image.isNull()) {
156 #if WEBKIT_USING_SKIA 156 #if WEBKIT_USING_SKIA
157 const SkBitmap& bitmap = image.getSkBitmap(); 157 const SkBitmap& bitmap = image.getSkBitmap();
158 #elif WEBKIT_USING_CG 158 #elif WEBKIT_USING_CG
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 break; 225 break;
226 #endif 226 #endif
227 default: 227 default:
228 NOTREACHED(); 228 NOTREACHED();
229 return false; 229 return false;
230 } 230 }
231 return true; 231 return true;
232 } 232 }
233 233
234 } // namespace webkit_glue 234 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/appcache/view_appcache_internals_job.cc ('k') | webkit/plugins/npapi/plugin_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698