diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 01:20:01 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 01:20:01 +0000 |
commit | 22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83 (patch) | |
tree | df838980effe3721bdc41b6acea356bf6352df8e /base/clipboard_util.h | |
parent | 234ebdecf98582ca141b9066b1e5f4f74d3bdbff (diff) | |
download | chromium_src-22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83.zip chromium_src-22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83.tar.gz chromium_src-22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83.tar.bz2 |
Remove cf_html from webdropdata.h. This is windows
specific code so we should handle it before we get
to webkit.
CF_HTML needs the source URL to resolve relative URLs
so I added that to the format and plumb it through
from webcore.
I also did some small refactoring so we only have one
implementation of converting to/from CF_HTML and regular
markup. We can tweak these converters (and add unit tests)
in follow up changes.
Review URL: http://codereview.chromium.org/11247
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/clipboard_util.h')
-rw-r--r-- | base/clipboard_util.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/base/clipboard_util.h b/base/clipboard_util.h index 89c7b69..9b55819 100644 --- a/base/clipboard_util.h +++ b/base/clipboard_util.h @@ -43,10 +43,16 @@ class ClipboardUtil { static bool GetFilenames(IDataObject* data_object, std::vector<std::wstring>* filenames); static bool GetPlainText(IDataObject* data_object, std::wstring* plain_text); - static bool GetCFHtml(IDataObject* data_object, std::wstring* cf_html); - static bool GetTextHtml(IDataObject* data_object, std::wstring* text_html); + static bool GetHtml(IDataObject* data_object, std::wstring* text_html, + std::string* base_url); static bool GetFileContents(IDataObject* data_object, std::wstring* filename, std::string* file_contents); -}; + // A helper method for converting between MS CF_HTML format and plain + // text/html. + static std::string HtmlToCFHtml(const std::string& html, + const std::string& base_url); + static void CFHtmlToHtml(const std::string& cf_html, std::string* html, + std::string* base_url); +}; |