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

Side by Side Diff: webkit/renderer/clipboard_utils.cc

Issue 17420005: Move the following clipboard files from webkit\glue to webkit\renderer. These files now live in the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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/renderer/clipboard_utils.h ('k') | webkit/support/mock_webclipboard_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 //
5
6 #include "webkit/renderer/clipboard_utils.h"
7
8 #include "base/strings/utf_string_conversions.h"
9 #include "net/base/escape.h"
10
11 namespace webkit_clipboard {
12
13 // Static
14 std::string URLToMarkup(const WebURL& url, const WebString& title) {
15 std::string markup("<a href=\"");
16 markup.append(url.spec());
17 markup.append("\">");
18 // TODO(darin): HTML escape this
19 markup.append(net::EscapeForHTML(UTF16ToUTF8(title)));
20 markup.append("</a>");
21 return markup;
22 }
23
24 std::string URLToImageMarkup(const WebURL& url, const WebString& title) {
25 std::string markup("<img src=\"");
26 markup.append(url.spec());
27 markup.append("\"");
28 if (!title.isEmpty()) {
29 markup.append(" alt=\"");
30 markup.append(net::EscapeForHTML(UTF16ToUTF8(title)));
31 markup.append("\"");
32 }
33 markup.append("/>");
34 return markup;
35 }
36
37 } // webkit_clipboard
38
OLDNEW
« no previous file with comments | « webkit/renderer/clipboard_utils.h ('k') | webkit/support/mock_webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698