diff options
Diffstat (limited to 'app/clipboard')
-rw-r--r-- | app/clipboard/clipboard.cc | 4 | ||||
-rw-r--r-- | app/clipboard/clipboard.h | 14 | ||||
-rw-r--r-- | app/clipboard/clipboard_unittest.cc | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/app/clipboard/clipboard.cc b/app/clipboard/clipboard.cc index 4103c3a..a2050a0 100644 --- a/app/clipboard/clipboard.cc +++ b/app/clipboard/clipboard.cc @@ -67,12 +67,12 @@ void Clipboard::DispatchObject(ObjectType type, const ObjectMapParams& params) { WriteBitmap(&(params[0].front()), &(params[1].front())); break; -#if defined(OS_WIN) || defined(OS_LINUX) +#if !defined(OS_MACOSX) case CBF_DATA: WriteData(&(params[0].front()), params[0].size(), &(params[1].front()), params[1].size()); break; -#endif // defined(OS_WIN) || defined(OS_LINUX) +#endif // !defined(OS_MACOSX) default: NOTREACHED(); diff --git a/app/clipboard/clipboard.h b/app/clipboard/clipboard.h index 80a35e6..faaa00c 100644 --- a/app/clipboard/clipboard.h +++ b/app/clipboard/clipboard.h @@ -76,7 +76,7 @@ class Clipboard { // functions accept a buffer parameter. enum Buffer { BUFFER_STANDARD, -#if defined(OS_LINUX) +#if defined(USE_X11) BUFFER_SELECTION, #endif }; @@ -85,7 +85,7 @@ class Clipboard { switch (buffer) { case BUFFER_STANDARD: return true; -#if defined(OS_LINUX) +#if defined(USE_X11) case BUFFER_SELECTION: return true; #endif @@ -112,11 +112,11 @@ class Clipboard { // can use. void WriteObjects(const ObjectMap& objects, base::ProcessHandle process); - // On Linux, we need to know when the clipboard is set to a URL. Most + // On Linux/BSD, we need to know when the clipboard is set to a URL. Most // platforms don't care. -#if !defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) void DidWriteURL(const std::string& utf8_text) {} -#else // !defined(OS_LINUX) +#else // !defined(OS_WIN) && !defined(OS_MACOSX) void DidWriteURL(const std::string& utf8_text); #endif @@ -193,7 +193,7 @@ class Clipboard { void WriteBitmap(const char* pixel_data, const char* size_data); -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FREEBSD) +#if !defined(OS_MACOSX) // |format_name| is an ASCII string and should be NULL-terminated. // TODO(estade): port to mac. void WriteData(const char* format_name, size_t format_len, @@ -226,7 +226,7 @@ class Clipboard { // True if we can create a window. bool create_window_; -#elif defined(USE_X11) +#elif !defined(OS_MACOSX) // The public API is via WriteObjects() which dispatches to multiple // Write*() calls, but on GTK we must write all the clipboard types // in a single GTK call. To support this we store the current set diff --git a/app/clipboard/clipboard_unittest.cc b/app/clipboard/clipboard_unittest.cc index 6f19d97..81f400d 100644 --- a/app/clipboard/clipboard_unittest.cc +++ b/app/clipboard/clipboard_unittest.cc @@ -130,7 +130,7 @@ TEST_F(ClipboardTest, TrickyHTMLTest) { } // TODO(estade): Port the following test (decide what target we use for urls) -#if !defined(OS_LINUX) +#if !defined(OS_POSIX) || defined(OS_MACOSX) TEST_F(ClipboardTest, BookmarkTest) { Clipboard clipboard; @@ -213,7 +213,7 @@ TEST_F(ClipboardTest, URLTest) { #endif // defined(OS_LINUX) } -#if defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX)) TEST_F(ClipboardTest, DataTest) { Clipboard clipboard; const char* format = "chromium/x-test-format"; |