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

Side by Side Diff: webkit/tools/test_shell/mock_webclipboard_impl.cc

Issue 8591034: Implement WebClipboard::writeDataObject. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/tools/test_shell/mock_webclipboard_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" 5 #include "webkit/tools/test_shell/mock_webclipboard_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/escape.h" 10 #include "net/base/escape.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCommon.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCommon.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
14 #include "webkit/glue/webclipboard_impl.h" 15 #include "webkit/glue/webclipboard_impl.h"
15 #include "webkit/glue/webkit_glue.h" 16 #include "webkit/glue/webkit_glue.h"
16 #include "webkit/support/webkit_support_gfx.h" 17 #include "webkit/support/webkit_support_gfx.h"
17 18
18 #if WEBKIT_USING_CG 19 #if WEBKIT_USING_CG
19 #include <ApplicationServices/ApplicationServices.h> 20 #include <ApplicationServices/ApplicationServices.h>
20 #include <CoreFoundation/CoreFoundation.h> 21 #include <CoreFoundation/CoreFoundation.h>
21 #endif 22 #endif
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void MockWebClipboardImpl::writeImage(const WebKit::WebImage& image, 152 void MockWebClipboardImpl::writeImage(const WebKit::WebImage& image,
152 const WebKit::WebURL& url, const WebKit::WebString& title) { 153 const WebKit::WebURL& url, const WebKit::WebString& title) {
153 if (!image.isNull()) { 154 if (!image.isNull()) {
154 m_htmlText = WebString::fromUTF8( 155 m_htmlText = WebString::fromUTF8(
155 webkit_glue::WebClipboardImpl::URLToImageMarkup(url, title)); 156 webkit_glue::WebClipboardImpl::URLToImageMarkup(url, title));
156 m_plainText = m_htmlText; 157 m_plainText = m_htmlText;
157 m_image = image; 158 m_image = image;
158 m_writeSmartPaste = false; 159 m_writeSmartPaste = false;
159 } 160 }
160 } 161 }
162
163 void MockWebClipboardImpl::writeDataObject(const WebKit::WebDragData& data) {
164 m_htmlText = data.htmlText();
165 m_plainText = data.plainText();
166 m_image.reset();
167 m_writeSmartPaste = false;
168 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mock_webclipboard_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698