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

Side by Side Diff: ui/base/clipboard/clipboard_util_win.h

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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_unittest.cc ('k') | ui/base/clipboard/clipboard_util_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Some helper functions for working with the clipboard and IDataObjects. 5 // Some helper functions for working with the clipboard and IDataObjects.
6 6
7 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_WIN_H_ 7 #ifndef UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_WIN_H_
8 #define UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_WIN_H_ 8 #define UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_WIN_H_
9 9
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 14 matching lines...) Expand all
25 static bool HasUrl(IDataObject* data_object); 25 static bool HasUrl(IDataObject* data_object);
26 static bool HasFilenames(IDataObject* data_object); 26 static bool HasFilenames(IDataObject* data_object);
27 static bool HasPlainText(IDataObject* data_object); 27 static bool HasPlainText(IDataObject* data_object);
28 static bool HasFileContents(IDataObject* data_object); 28 static bool HasFileContents(IDataObject* data_object);
29 static bool HasHtml(IDataObject* data_object); 29 static bool HasHtml(IDataObject* data_object);
30 30
31 ///////////////////////////////////////////////////////////////////////////// 31 /////////////////////////////////////////////////////////////////////////////
32 // Helper methods to extract information from an IDataObject. These methods 32 // Helper methods to extract information from an IDataObject. These methods
33 // return true if the requested data type is found in |data_object|. 33 // return true if the requested data type is found in |data_object|.
34 static bool GetUrl(IDataObject* data_object, 34 static bool GetUrl(IDataObject* data_object,
35 string16* url, 35 base::string16* url,
36 string16* title, 36 base::string16* title,
37 bool convert_filenames); 37 bool convert_filenames);
38 static bool GetFilenames(IDataObject* data_object, 38 static bool GetFilenames(IDataObject* data_object,
39 std::vector<string16>* filenames); 39 std::vector<base::string16>* filenames);
40 static bool GetPlainText(IDataObject* data_object, string16* plain_text); 40 static bool GetPlainText(IDataObject* data_object,
41 base::string16* plain_text);
41 static bool GetHtml(IDataObject* data_object, 42 static bool GetHtml(IDataObject* data_object,
42 string16* text_html, 43 base::string16* text_html,
43 std::string* base_url); 44 std::string* base_url);
44 static bool GetFileContents(IDataObject* data_object, 45 static bool GetFileContents(IDataObject* data_object,
45 string16* filename, 46 base::string16* filename,
46 std::string* file_contents); 47 std::string* file_contents);
47 // This represents custom MIME types a web page might set to transport its 48 // This represents custom MIME types a web page might set to transport its
48 // own types of data for drag and drop. It is sandboxed in its own CLIPFORMAT 49 // own types of data for drag and drop. It is sandboxed in its own CLIPFORMAT
49 // to avoid polluting the ::RegisterClipboardFormat() namespace with random 50 // to avoid polluting the ::RegisterClipboardFormat() namespace with random
50 // strings from web content. 51 // strings from web content.
51 static bool GetWebCustomData(IDataObject* data_object, 52 static bool GetWebCustomData(
52 std::map<string16, string16>* custom_data); 53 IDataObject* data_object,
54 std::map<base::string16, base::string16>* custom_data);
53 55
54 // Helper method for converting between MS CF_HTML format and plain 56 // Helper method for converting between MS CF_HTML format and plain
55 // text/html. 57 // text/html.
56 static std::string HtmlToCFHtml(const std::string& html, 58 static std::string HtmlToCFHtml(const std::string& html,
57 const std::string& base_url); 59 const std::string& base_url);
58 static void CFHtmlToHtml(const std::string& cf_html, 60 static void CFHtmlToHtml(const std::string& cf_html,
59 std::string* html, 61 std::string* html,
60 std::string* base_url); 62 std::string* base_url);
61 static void CFHtmlExtractMetadata(const std::string& cf_html, 63 static void CFHtmlExtractMetadata(const std::string& cf_html,
62 std::string* base_url, 64 std::string* base_url,
63 size_t* html_start, 65 size_t* html_start,
64 size_t* fragment_start, 66 size_t* fragment_start,
65 size_t* fragment_end); 67 size_t* fragment_end);
66 }; 68 };
67 69
68 } 70 }
69 71
70 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_WIN_H_ 72 #endif // UI_BASE_CLIPBOARD_CLIPBOARD_UTIL_WIN_H_
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_unittest.cc ('k') | ui/base/clipboard/clipboard_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698