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

Side by Side Diff: content/test/test_webkit_platform_support.h

Issue 41703005: Revert "Trim more dead code from webkit/support/" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | content/test/test_webkit_platform_support.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_TEST_TEST_WEBKIT_PLATFORM_SUPPORT_H_ 5 #ifndef CONTENT_TEST_TEST_WEBKIT_PLATFORM_SUPPORT_H_
6 #define CONTENT_TEST_TEST_WEBKIT_PLATFORM_SUPPORT_H_ 6 #define CONTENT_TEST_TEST_WEBKIT_PLATFORM_SUPPORT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "content/test/mock_webclipboard_impl.h" 10 #include "content/test/mock_webclipboard_impl.h"
11 #include "content/test/weburl_loader_mock_factory.h" 11 #include "content/test/weburl_loader_mock_factory.h"
12 #include "third_party/WebKit/public/platform/WebUnitTestSupport.h" 12 #include "third_party/WebKit/public/platform/WebUnitTestSupport.h"
13 #include "webkit/child/webkitplatformsupport_child_impl.h" 13 #include "webkit/child/webkitplatformsupport_child_impl.h"
14 #include "webkit/glue/simple_webmimeregistry_impl.h" 14 #include "webkit/glue/simple_webmimeregistry_impl.h"
15 #include "webkit/glue/webfileutilities_impl.h"
15 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" 16 #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h"
16 17
17 namespace WebKit { 18 namespace WebKit {
18 class WebLayerTreeView; 19 class WebLayerTreeView;
19 } 20 }
20 21
21 namespace content { 22 namespace content {
22 23
23 // An implementation of WebKitPlatformSupport for tests. 24 // An implementation of WebKitPlatformSupport for tests.
24 class TestWebKitPlatformSupport 25 class TestWebKitPlatformSupport
25 : public WebKit::WebUnitTestSupport, 26 : public WebKit::WebUnitTestSupport,
26 public webkit_glue::WebKitPlatformSupportChildImpl { 27 public webkit_glue::WebKitPlatformSupportChildImpl {
27 public: 28 public:
28 TestWebKitPlatformSupport(); 29 TestWebKitPlatformSupport();
29 virtual ~TestWebKitPlatformSupport(); 30 virtual ~TestWebKitPlatformSupport();
30 31
31 virtual WebKit::WebMimeRegistry* mimeRegistry(); 32 virtual WebKit::WebMimeRegistry* mimeRegistry();
32 virtual WebKit::WebClipboard* clipboard(); 33 virtual WebKit::WebClipboard* clipboard();
34 virtual WebKit::WebFileUtilities* fileUtilities();
35 virtual WebKit::WebIDBFactory* idbFactory();
33 36
34 virtual WebKit::WebURLLoader* createURLLoader(); 37 virtual WebKit::WebURLLoader* createURLLoader();
35 virtual WebKit::WebString defaultLocale(); 38 virtual WebKit::WebData loadResource(const char* name);
36
37 virtual WebKit::WebString queryLocalizedString( 39 virtual WebKit::WebString queryLocalizedString(
38 WebKit::WebLocalizedString::Name name); 40 WebKit::WebLocalizedString::Name name);
39 virtual WebKit::WebString queryLocalizedString( 41 virtual WebKit::WebString queryLocalizedString(
40 WebKit::WebLocalizedString::Name name, 42 WebKit::WebLocalizedString::Name name,
41 const WebKit::WebString& value); 43 const WebKit::WebString& value);
42 virtual WebKit::WebString queryLocalizedString( 44 virtual WebKit::WebString queryLocalizedString(
43 WebKit::WebLocalizedString::Name name, 45 WebKit::WebLocalizedString::Name name,
44 const WebKit::WebString& value1, 46 const WebKit::WebString& value1,
45 const WebKit::WebString& value2); 47 const WebKit::WebString& value2);
48 virtual WebKit::WebString defaultLocale();
46 49
47 #if defined(OS_WIN) || defined(OS_MACOSX) 50 #if defined(OS_WIN) || defined(OS_MACOSX)
48 void SetThemeEngine(WebKit::WebThemeEngine* engine); 51 void SetThemeEngine(WebKit::WebThemeEngine* engine);
49 virtual WebKit::WebThemeEngine* themeEngine(); 52 virtual WebKit::WebThemeEngine* themeEngine();
50 #endif 53 #endif
51 54
52 virtual WebKit::WebCompositorSupport* compositorSupport(); 55 virtual WebKit::WebCompositorSupport* compositorSupport();
53 56
54 WebURLLoaderMockFactory* url_loader_factory() { 57 WebURLLoaderMockFactory* url_loader_factory() {
55 return url_loader_factory_.get(); 58 return url_loader_factory_.get();
56 } 59 }
57 60
61 const base::FilePath& file_system_root() const {
62 return file_system_root_.path();
63 }
64
58 virtual base::string16 GetLocalizedString(int message_id) OVERRIDE; 65 virtual base::string16 GetLocalizedString(int message_id) OVERRIDE;
59 virtual base::StringPiece GetDataResource( 66 virtual base::StringPiece GetDataResource(
60 int resource_id, 67 int resource_id,
61 ui::ScaleFactor scale_factor) OVERRIDE; 68 ui::ScaleFactor scale_factor) OVERRIDE;
62 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( 69 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
63 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) 70 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
64 OVERRIDE; 71 OVERRIDE;
65 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketStreamBridge( 72 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketStreamBridge(
66 WebKit::WebSocketStreamHandle* handle, 73 WebKit::WebSocketStreamHandle* handle,
67 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; 74 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE;
(...skipping 17 matching lines...) Expand all
85 virtual void serveAsynchronousMockedRequests(); 92 virtual void serveAsynchronousMockedRequests();
86 virtual WebKit::WebString webKitRootDir(); 93 virtual WebKit::WebString webKitRootDir();
87 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting(); 94 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting();
88 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting( 95 virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting(
89 TestViewType type); 96 TestViewType type);
90 virtual WebKit::WebData readFromFile(const WebKit::WebString& path); 97 virtual WebKit::WebData readFromFile(const WebKit::WebString& path);
91 98
92 private: 99 private:
93 webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; 100 webkit_glue::SimpleWebMimeRegistryImpl mime_registry_;
94 scoped_ptr<MockWebClipboardImpl> mock_clipboard_; 101 scoped_ptr<MockWebClipboardImpl> mock_clipboard_;
102 webkit_glue::WebFileUtilitiesImpl file_utilities_;
103 base::ScopedTempDir file_system_root_;
95 scoped_ptr<WebURLLoaderMockFactory> url_loader_factory_; 104 scoped_ptr<WebURLLoaderMockFactory> url_loader_factory_;
96 webkit::WebCompositorSupportImpl compositor_support_; 105 webkit::WebCompositorSupportImpl compositor_support_;
97 106
98 #if defined(OS_WIN) || defined(OS_MACOSX) 107 #if defined(OS_WIN) || defined(OS_MACOSX)
99 WebKit::WebThemeEngine* active_theme_engine_; 108 WebKit::WebThemeEngine* active_theme_engine_;
100 #endif 109 #endif
101 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); 110 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport);
102 }; 111 };
103 112
104 } // namespace content 113 } // namespace content
105 114
106 #endif // CONTENT_TEST_TEST_WEBKIT_PLATFORM_SUPPORT_H_ 115 #endif // CONTENT_TEST_TEST_WEBKIT_PLATFORM_SUPPORT_H_
OLDNEW
« no previous file with comments | « no previous file | content/test/test_webkit_platform_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698