diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 03:36:36 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 03:36:36 +0000 |
commit | 3a2a5d201631f31800a889164cb84b3c6784b8c2 (patch) | |
tree | 52f45c58258845ad6b0a9a9591e15b3cc225337c /base/scoped_clipboard_writer.h | |
parent | 0bb1a6204af17f50ad0577f811a2c044b2bf62ff (diff) | |
download | chromium_src-3a2a5d201631f31800a889164cb84b3c6784b8c2.zip chromium_src-3a2a5d201631f31800a889164cb84b3c6784b8c2.tar.gz chromium_src-3a2a5d201631f31800a889164cb84b3c6784b8c2.tar.bz2 |
Update clipboard classes to use string16 and FilePath instead of wstring.
Update callers as well.
This patch builds on a patch by mark.a.lindner@gmail.com which can be found at http://codereview.chromium.org/28294
Review URL: http://codereview.chromium.org/27370
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/scoped_clipboard_writer.h')
-rw-r--r-- | base/scoped_clipboard_writer.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/base/scoped_clipboard_writer.h b/base/scoped_clipboard_writer.h index 7bfedf4..a62a94c 100644 --- a/base/scoped_clipboard_writer.h +++ b/base/scoped_clipboard_writer.h @@ -10,7 +10,12 @@ #ifndef BASE_SCOPED_CLIPBOARD_WRITER_H_ #define BASE_SCOPED_CLIPBOARD_WRITER_H_ +#include <string> +#include <vector> + #include "base/clipboard.h" +#include "base/file_path.h" +#include "base/string16.h" // This class is a wrapper for |Clipboard| that handles packing data // into a Clipboard::ObjectMap. @@ -24,24 +29,24 @@ class ScopedClipboardWriter { ~ScopedClipboardWriter(); // Converts |text| to UTF-8 and adds it to the clipboard. - void WriteText(const std::wstring& text); + void WriteText(const string16& text); // Adds HTML to the clipboard. The url parameter is optional, but especially // useful if the HTML fragment contains relative links. - void WriteHTML(const std::wstring& markup, const std::string& source_url); + void WriteHTML(const string16& markup, const std::string& source_url); // Adds a bookmark to the clipboard. - void WriteBookmark(const std::wstring& bookmark_title, + void WriteBookmark(const string16& bookmark_title, const std::string& url); // Adds both a bookmark and an HTML hyperlink to the clipboard. It is a // convenience wrapper around WriteBookmark and WriteHTML. |link_text| is // used as the bookmark title. - void WriteHyperlink(const std::wstring& link_text, const std::string& url); + void WriteHyperlink(const string16& link_text, const std::string& url); // Adds a file or group of files to the clipboard. - void WriteFile(const std::wstring& file); - void WriteFiles(const std::vector<std::wstring>& files); + void WriteFile(const FilePath& file); + void WriteFiles(const std::vector<FilePath>& files); // Used by WebKit to determine whether WebKit wrote the clipboard last void WriteWebSmartPaste(); |