OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ | 5 #ifndef WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ |
6 #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ | 6 #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/callback.h" | |
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h " | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h " |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien t.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien t.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste m.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste m.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" |
18 #include "ui/base/keycodes/keyboard_codes.h" | 19 #include "ui/base/keycodes/keyboard_codes.h" |
19 | 20 |
20 namespace WebKit { | 21 namespace WebKit { |
21 class WebApplicationCacheHost; | 22 class WebApplicationCacheHost; |
(...skipping 12 matching lines...) Expand all Loading... | |
34 class WebURLResponse; | 35 class WebURLResponse; |
35 class WebView; | 36 class WebView; |
36 struct WebPluginParams; | 37 struct WebPluginParams; |
37 struct WebURLError; | 38 struct WebURLError; |
38 } | 39 } |
39 | 40 |
40 namespace webkit_media { | 41 namespace webkit_media { |
41 class MediaStreamClient; | 42 class MediaStreamClient; |
42 } | 43 } |
43 | 44 |
45 class TestWebKitPlatformSupport; | |
46 typedef base::Callback<TestWebKitPlatformSupport*(bool)> | |
47 PlatformSupportCreatorCallback; | |
48 | |
44 // This package provides functions used by DumpRenderTree/chromium. | 49 // This package provides functions used by DumpRenderTree/chromium. |
45 // DumpRenderTree/chromium uses some code in webkit/ of Chromium. In | 50 // DumpRenderTree/chromium uses some code in webkit/ of Chromium. In |
46 // order to minimize the dependency from WebKit to Chromium, the | 51 // order to minimize the dependency from WebKit to Chromium, the |
47 // following functions uses WebKit API classes as possible and hide | 52 // following functions uses WebKit API classes as possible and hide |
48 // implementation classes. | 53 // implementation classes. |
49 namespace webkit_support { | 54 namespace webkit_support { |
50 | 55 |
51 // Initializes or terminates a test environment. | 56 // Initializes or terminates a test environment. |
52 // |unit_test_mode| should be set to true when running in a TestSuite, in which | 57 // |unit_test_mode| should be set to true when running in a TestSuite, in which |
53 // case no AtExitManager is created and ICU is not initialized (as it is already | 58 // case no AtExitManager is created and ICU is not initialized (as it is already |
54 // done by the TestSuite). | 59 // done by the TestSuite). |
55 // SetUpTestEnvironment() and SetUpTestEnvironmentForUnitTests() calls | 60 // SetUpTestEnvironment() and SetUpTestEnvironmentForUnitTests() calls |
56 // WebKit::initialize(). | 61 // WebKit::initialize(). |
57 // TearDownTestEnvironment() calls WebKit::shutdown(). | 62 // TearDownTestEnvironment() calls WebKit::shutdown(). |
58 // SetUpTestEnvironmentForUnitTests() should be used when running in a | 63 // SetUpTestEnvironmentForUnitTests() should be used when running in a |
59 // TestSuite, in which case no AtExitManager is created and ICU is not | 64 // TestSuite, in which case no AtExitManager is created and ICU is not |
60 // initialized (as it is already done by the TestSuite). | 65 // initialized (as it is already done by the TestSuite). |
61 void SetUpTestEnvironment(); | 66 void SetUpTestEnvironment(); |
67 void SetUpTestEnvironment(const PlatformSupportCreatorCallback&); | |
tommi (sloooow) - chröme
2012/07/09 12:19:29
add variable names
Tommy Widenflycht
2012/07/09 12:25:31
Done.
| |
62 void SetUpTestEnvironmentForUnitTests(); | 68 void SetUpTestEnvironmentForUnitTests(); |
69 void SetUpTestEnvironmentForUnitTests(const PlatformSupportCreatorCallback&); | |
63 void TearDownTestEnvironment(); | 70 void TearDownTestEnvironment(); |
64 | 71 |
65 // Returns a pointer to a WebKitPlatformSupport implementation for | 72 // Returns a pointer to a WebKitPlatformSupport implementation for |
66 // DumpRenderTree. Needs to call SetUpTestEnvironment() before this. | 73 // DumpRenderTree. Needs to call SetUpTestEnvironment() before this. |
67 // This returns a pointer to a static instance. Don't delete it. | 74 // This returns a pointer to a static instance. Don't delete it. |
68 WebKit::WebKitPlatformSupport* GetWebKitPlatformSupport(); | 75 WebKit::WebKitPlatformSupport* GetWebKitPlatformSupport(); |
69 | 76 |
70 // This is used by WebFrameClient::createPlugin(). | 77 // This is used by WebFrameClient::createPlugin(). |
71 WebKit::WebPlugin* CreateWebPlugin(WebKit::WebFrame* frame, | 78 WebKit::WebPlugin* CreateWebPlugin(WebKit::WebFrame* frame, |
72 const WebKit::WebPluginParams& params); | 79 const WebKit::WebPluginParams& params); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 | 264 |
258 void EnableWebCoreLogChannels(const std::string& channels); | 265 void EnableWebCoreLogChannels(const std::string& channels); |
259 | 266 |
260 // - Gamepad | 267 // - Gamepad |
261 | 268 |
262 void SetGamepadData(const WebKit::WebGamepads& pads); | 269 void SetGamepadData(const WebKit::WebGamepads& pads); |
263 | 270 |
264 } // namespace webkit_support | 271 } // namespace webkit_support |
265 | 272 |
266 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ | 273 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ |
OLD | NEW |