diff options
author | rbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-21 01:26:11 +0000 |
---|---|---|
committer | rbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-21 01:26:11 +0000 |
commit | 92053810f25256e43c866db2c0847e212700cd0d (patch) | |
tree | 3c31332cb61ac301db5e451a7d39bca8ebb50c47 /ui/base/clipboard/clipboard.h | |
parent | 351c086e67d19caaa7367cae60915edf9003f4f2 (diff) | |
download | chromium_src-92053810f25256e43c866db2c0847e212700cd0d.zip chromium_src-92053810f25256e43c866db2c0847e212700cd0d.tar.gz chromium_src-92053810f25256e43c866db2c0847e212700cd0d.tar.bz2 |
Add drag and drop support for custom and html data types on Aura
Also unifies OSExchangeData::CustomFormat and Clipboard::FormatType on Aura so
we don't need two separate code paths and mime type lists for getting specific
custom formats.
Note that this means that on some platforms CustomFormat has a dtor (since it
can hold, eg. a std::string), so we can no longer use static/global
CustomFormat variables. In the two places we were doing that I switched to use
CR_DEFINE_STATIC_LOCAL to allow the static to leak, exactly as we're already
doing for each implementation of Clipboard::Get*FormatType().
BUG=118416
TEST=See bug - no automated tests exist for any of this yet :-(
Review URL: http://codereview.chromium.org/9770001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/clipboard/clipboard.h')
-rw-r--r-- | ui/base/clipboard/clipboard.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h index 5020882..a268512 100644 --- a/ui/base/clipboard/clipboard.h +++ b/ui/base/clipboard/clipboard.h @@ -65,6 +65,13 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { std::string Serialize() const; static FormatType Deserialize(const std::string& serialization); + // FormatType can be used as the key in a map on some platforms. +#if defined(OS_WIN) || defined(USE_AURA) + bool operator<(const FormatType& other) const { + return data_ < other.data_; + } +#endif + private: friend class Clipboard; |