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/clipboard_linux.cc | |
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/clipboard_linux.cc')
-rw-r--r-- | base/clipboard_linux.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/base/clipboard_linux.cc b/base/clipboard_linux.cc index e535942..17ecf6c 100644 --- a/base/clipboard_linux.cc +++ b/base/clipboard_linux.cc @@ -200,7 +200,7 @@ bool Clipboard::IsFormatAvailable(Clipboard::FormatType format) const { return retval; } -void Clipboard::ReadText(std::wstring* result) const { +void Clipboard::ReadText(string16* result) const { result->clear(); gchar* text = gtk_clipboard_wait_for_text(clipboard_); @@ -208,7 +208,7 @@ void Clipboard::ReadText(std::wstring* result) const { return; // TODO(estade): do we want to handle the possible error here? - UTF8ToWide(text, strlen(text), result); + UTF8ToUTF16(text, strlen(text), result); g_free(text); } @@ -223,8 +223,12 @@ void Clipboard::ReadAsciiText(std::string* result) const { g_free(text); } +void Clipboard::ReadFile(FilePath* file) const { + *file = FilePath(); +} + // TODO(estade): handle different charsets. -void Clipboard::ReadHTML(std::wstring* markup, std::string* src_url) const { +void Clipboard::ReadHTML(string16* markup, std::string* src_url) const { markup->clear(); GtkSelectionData* data = gtk_clipboard_wait_for_contents(clipboard_, @@ -233,9 +237,9 @@ void Clipboard::ReadHTML(std::wstring* markup, std::string* src_url) const { if (!data) return; - UTF8ToWide(reinterpret_cast<char*>(data->data), - strlen(reinterpret_cast<char*>(data->data)), - markup); + UTF8ToUTF16(reinterpret_cast<char*>(data->data), + strlen(reinterpret_cast<char*>(data->data)), + markup); gtk_selection_data_free(data); } |