diff options
author | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-16 22:36:55 +0000 |
---|---|---|
committer | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-16 22:36:55 +0000 |
commit | 6ddd29f1f1a3d68d1f5546296bea956e502715c9 (patch) | |
tree | fa9f27fbe7726a26ac6e89da2a4e7cbd00b25328 | |
parent | c6f79b280b19c2b8c5f42f38f642888053599007 (diff) | |
download | chromium_src-6ddd29f1f1a3d68d1f5546296bea956e502715c9.zip chromium_src-6ddd29f1f1a3d68d1f5546296bea956e502715c9.tar.gz chromium_src-6ddd29f1f1a3d68d1f5546296bea956e502715c9.tar.bz2 |
Prevents LayoutTests/editing/pasteboard/copy-standalone-image.html from crashing
on NOTREACHED. The paste actually already works. The diff is still wrong.
Review URL: http://codereview.chromium.org/14473
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7106 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/clipboard.cc | 7 | ||||
-rw-r--r-- | base/clipboard.h | 5 | ||||
-rw-r--r-- | base/clipboard_linux.cc | 18 |
3 files changed, 22 insertions, 8 deletions
diff --git a/base/clipboard.cc b/base/clipboard.cc index 21b00fc..60851e2 100644 --- a/base/clipboard.cc +++ b/base/clipboard.cc @@ -20,7 +20,6 @@ void Clipboard::DispatchObject(ObjectType type, const ObjectMapParams& params) { WriteHTML(&(params[0].front()), params[0].size(), NULL, 0); break; -#if defined(OS_WIN) || defined(OS_MACOSX) case CBF_BOOKMARK: WriteBookmark(&(params[0].front()), params[0].size(), &(params[1].front()), params[1].size()); @@ -34,20 +33,18 @@ void Clipboard::DispatchObject(ObjectType type, const ObjectMapParams& params) { case CBF_FILES: WriteFiles(&(params[0].front()), params[0].size()); break; -#endif // defined(OS_WIN) || defined(OS_MACOSX) case CBF_WEBKIT: WriteWebSmartPaste(); break; -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_LINUX) // This is just a stub on Linux case CBF_BITMAP: WriteBitmap(&(params[0].front()), &(params[1].front())); break; -#endif // defined(OS_WIN) +#endif // defined(OS_WIN) || defined(OS_LINUX) default: NOTREACHED(); } } - diff --git a/base/clipboard.h b/base/clipboard.h index caf0dbf..64f9e3a 100644 --- a/base/clipboard.h +++ b/base/clipboard.h @@ -155,9 +155,9 @@ class Clipboard { void WriteFiles(const char* file_data, size_t file_len); void DispatchObject(ObjectType type, const ObjectMapParams& params); -#if defined(OS_WIN) - void WriteBitmap(const char* pixel_data, const char* size_data); + void WriteBitmap(const char* pixel_data, const char* size_data); +#if defined(OS_WIN) void WriteBitmapFromSharedMemory(const char* bitmap_data, const char* size_data, base::ProcessHandle handle); @@ -204,4 +204,3 @@ class Clipboard { }; #endif // BASE_CLIPBOARD_H_ - diff --git a/base/clipboard_linux.cc b/base/clipboard_linux.cc index 5906319..08e90fa 100644 --- a/base/clipboard_linux.cc +++ b/base/clipboard_linux.cc @@ -147,6 +147,24 @@ void Clipboard::WriteWebSmartPaste() { InsertMapping(kMimeWebkitSmartPaste, NULL, 0); } +void Clipboard::WriteBitmap(const char* pixel_data, const char* size_data) { + NOTIMPLEMENTED(); +} + +void Clipboard::WriteBookmark(const char* title_data, size_t title_len, + const char* url_data, size_t url_len) { + NOTIMPLEMENTED(); +} + +void Clipboard::WriteHyperlink(const char* title_data, size_t title_len, + const char* url_data, size_t url_len) { + NOTIMPLEMENTED(); +} + +void Clipboard::WriteFiles(const char* file_data, size_t file_len) { + NOTIMPLEMENTED(); +} + // We do not use gtk_clipboard_wait_is_target_available because of // a bug with the gtk clipboard. It caches the available targets // and does not always refresh the cache when it is appropriate. |