Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: ui/base/clipboard/clipboard_win.cc

Issue 8805030: Revert 113040 - Enable custom MIME types in web copy/paste. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/clipboard/clipboard_util_win.cc ('k') | webkit/glue/webclipboard_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_win.cc
===================================================================
--- ui/base/clipboard/clipboard_win.cc (revision 113044)
+++ ui/base/clipboard/clipboard_win.cc (working copy)
@@ -24,7 +24,6 @@
#include "base/win/wrapped_window_proc.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/clipboard_util_win.h"
-#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/size.h"
@@ -378,19 +377,6 @@
if (::IsClipboardFormatAvailable(CF_DIB))
types->push_back(UTF8ToUTF16(kMimeTypePNG));
*contains_filenames = false;
-
- // Acquire the clipboard.
- ScopedClipboard clipboard;
- if (!clipboard.Acquire(GetClipboardWindow()))
- return;
-
- HANDLE hdata = ::GetClipboardData(
- ClipboardUtil::GetWebCustomDataFormat()->cfFormat);
- if (!hdata)
- return;
-
- ReadCustomDataTypes(::GlobalLock(hdata), ::GlobalSize(hdata), types);
- ::GlobalUnlock(hdata);
}
void Clipboard::ReadText(Clipboard::Buffer buffer, string16* result) const {
@@ -561,20 +547,8 @@
void Clipboard::ReadCustomData(Buffer buffer,
const string16& type,
string16* result) const {
- DCHECK_EQ(buffer, BUFFER_STANDARD);
-
- // Acquire the clipboard.
- ScopedClipboard clipboard;
- if (!clipboard.Acquire(GetClipboardWindow()))
- return;
-
- HANDLE hdata = ::GetClipboardData(
- ClipboardUtil::GetWebCustomDataFormat()->cfFormat);
- if (!hdata)
- return;
-
- ReadCustomDataForType(::GlobalLock(hdata), ::GlobalSize(hdata), type, result);
- ::GlobalUnlock(hdata);
+ // TODO(dcheng): Implement this.
+ NOTIMPLEMENTED();
}
void Clipboard::ReadBookmark(string16* title, std::string* url) const {
@@ -759,16 +733,6 @@
}
// static
-Clipboard::FormatType Clipboard::GetWebCustomDataFormatType() {
- // TODO(dcheng): Clean up the duplicated constant.
- // Clipboard::WritePickledData() takes a FormatType, but all the callers
- // assume that it's a raw string. As a result, we return the format name here
- // rather than returning a string-ified version of the registered clipboard
- // format ID.
- return "Chromium Web Custom MIME Data Format";
-}
-
-// static
void Clipboard::FreeData(unsigned int format, HANDLE data) {
if (format == CF_BITMAP)
::DeleteObject(static_cast<HBITMAP>(data));
« no previous file with comments | « ui/base/clipboard/clipboard_util_win.cc ('k') | webkit/glue/webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698