Skip to content

Commit 21f5af6

Browse files
jturcottebbandix
authored andcommitted
<chromium> Update clipboard.h to allow building clipboard_qt.cpp on all platforms
Reviewed-by: Simon Hausmann <[email protected]> Change-Id: I5fecc09e245b75d0fec16756f8d6e6b8f71a143e Reviewed-by: Zeno Albisser <[email protected]>
1 parent 53feebc commit 21f5af6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

chromium/ui/base/clipboard/clipboard.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
8888
bool operator<(const FormatType& other) const;
8989
#endif
9090

91+
#if !defined(TOOLKIT_QT)
9192
#if defined(OS_WIN)
9293
const FORMATETC& ToFormatEtc() const { return data_; }
9394
#elif defined(OS_MACOSX)
@@ -97,6 +98,9 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
9798
#elif defined(USE_AURA)
9899
const std::string& ToString() const { return data_; }
99100
#endif
101+
#else
102+
const std::string& ToString() const { return data_; }
103+
#endif // !defined(TOOLKIT_QT)
100104

101105
bool Equals(const FormatType& other) const;
102106

@@ -111,7 +115,10 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
111115
//
112116
// Note that in some cases, the accessor for the wrapped descriptor may be
113117
// public, as these format types can be used by drag and drop code as well.
114-
#if defined(OS_WIN)
118+
#if defined(TOOLKIT_QT)
119+
explicit FormatType(const std::string& native_format);
120+
std::string data_;
121+
#elif defined(OS_WIN)
115122
explicit FormatType(UINT native_format);
116123
FormatType(UINT native_format, LONG index);
117124
UINT ToUINT() const { return data_.cfFormat; }
@@ -339,7 +346,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
339346
void WriteData(const FormatType& format,
340347
const char* data_data,
341348
size_t data_len);
342-
#if defined(OS_WIN)
349+
#if !defined(TOOLKIT_QT) && defined(OS_WIN)
343350
void WriteBitmapFromHandle(HBITMAP source_hbitmap,
344351
const gfx::Size& size);
345352

0 commit comments

Comments
 (0)