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

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

Issue 174367: Change the ChromiumPasteboard to have a notion of an alternate clipboard... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/webview_impl.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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // 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 "webkit/api/public/WebClipboard.h" 13 #include "webkit/api/public/WebClipboard.h"
14 #include "webkit/api/public/WebString.h" 14 #include "webkit/api/public/WebString.h"
15 15
16 class MockWebClipboardImpl : public WebKit::WebClipboard { 16 class MockWebClipboardImpl : public WebKit::WebClipboard {
17 public: 17 public:
18 virtual bool isFormatAvailable(WebKit::WebClipboard::Format); 18 virtual bool isFormatAvailable(WebKit::WebClipboard::Format,
19 WebKit::WebClipboard::Buffer);
19 20
20 virtual WebKit::WebString readPlainText(); 21 virtual WebKit::WebString readPlainText(WebKit::WebClipboard::Buffer);
21 virtual WebKit::WebString readHTML(WebKit::WebURL*); 22 virtual WebKit::WebString readHTML(WebKit::WebClipboard::Buffer,
23 WebKit::WebURL*);
22 24
23 virtual void writeHTML( 25 virtual void writeHTML(
24 const WebKit::WebString& htmlText, const WebKit::WebURL&, 26 const WebKit::WebString& htmlText, const WebKit::WebURL&,
25 const WebKit::WebString& plainText, bool writeSmartPaste); 27 const WebKit::WebString& plainText, bool writeSmartPaste);
26 virtual void writeURL( 28 virtual void writeURL(
27 const WebKit::WebURL&, const WebKit::WebString& title); 29 const WebKit::WebURL&, const WebKit::WebString& title);
28 virtual void writeImage( 30 virtual void writeImage(
29 const WebKit::WebImage&, const WebKit::WebURL&, 31 const WebKit::WebImage&, const WebKit::WebURL&,
30 const WebKit::WebString& title); 32 const WebKit::WebString& title);
31 33
32 private: 34 private:
33 WebKit::WebString m_plainText; 35 WebKit::WebString m_plainText;
34 WebKit::WebString m_htmlText; 36 WebKit::WebString m_htmlText;
35 bool m_writeSmartPaste; 37 bool m_writeSmartPaste;
36 }; 38 };
37 39
38 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ 40 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/webview_impl.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