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

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

Issue 9318003: Update WebClipboard/WebDropData glue to use new getter/setter for WebDragData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 8 years, 10 months 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/glue/webdropdata.cc ('k') | webkit/tools/test_shell/mock_webclipboard_impl.cc » ('j') | 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 // This file mocks out just enough of the WebClipboard API for running the 5 // This file mocks out just enough of the WebClipboard API for running the
6 // webkit tests. This is so we can run webkit tests without them sharing a 6 // webkit tests. This is so we can run webkit tests without them sharing a
7 // clipboard, which allows for running them in parallel and having the tests 7 // clipboard, which allows for running them in parallel and having the tests
8 // not interact with actual user actions. 8 // not interact with actual user actions.
9 9
10 #ifndef WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ 10 #ifndef WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_
11 #define WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ 11 #define WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_
12 12
13 #include <map>
14
15 #include "base/string16.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebClipboard .h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebClipboard .h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
16 19
17 class MockWebClipboardImpl : public WebKit::WebClipboard { 20 class MockWebClipboardImpl : public WebKit::WebClipboard {
18 public: 21 public:
19 MockWebClipboardImpl(); 22 MockWebClipboardImpl();
20 ~MockWebClipboardImpl(); 23 ~MockWebClipboardImpl();
21 24
22 virtual bool isFormatAvailable(WebKit::WebClipboard::Format format, 25 virtual bool isFormatAvailable(WebKit::WebClipboard::Format format,
(...skipping 15 matching lines...) Expand all
38 const WebKit::WebString& htmlText, const WebKit::WebURL& url, 41 const WebKit::WebString& htmlText, const WebKit::WebURL& url,
39 const WebKit::WebString& plainText, bool writeSmartPaste); 42 const WebKit::WebString& plainText, bool writeSmartPaste);
40 virtual void writeURL( 43 virtual void writeURL(
41 const WebKit::WebURL& url, const WebKit::WebString& title); 44 const WebKit::WebURL& url, const WebKit::WebString& title);
42 virtual void writeImage( 45 virtual void writeImage(
43 const WebKit::WebImage& image, const WebKit::WebURL& url, 46 const WebKit::WebImage& image, const WebKit::WebURL& url,
44 const WebKit::WebString& title); 47 const WebKit::WebString& title);
45 virtual void writeDataObject(const WebKit::WebDragData& data); 48 virtual void writeDataObject(const WebKit::WebDragData& data);
46 49
47 private: 50 private:
51 void clear();
52
48 WebKit::WebString m_plainText; 53 WebKit::WebString m_plainText;
49 WebKit::WebString m_htmlText; 54 WebKit::WebString m_htmlText;
50 WebKit::WebImage m_image; 55 WebKit::WebImage m_image;
51 WebKit::WebVector<WebKit::WebDragData::CustomData> m_customData; 56 std::map<string16, string16> m_customData;
52 bool m_writeSmartPaste; 57 bool m_writeSmartPaste;
53 }; 58 };
54 59
55 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ 60 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/webdropdata.cc ('k') | webkit/tools/test_shell/mock_webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698