Chromium Code Reviews| 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" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 class WebURLResponse; | 34 class WebURLResponse; |
| 35 class WebView; | 35 class WebView; |
| 36 struct WebPluginParams; | 36 struct WebPluginParams; |
| 37 struct WebURLError; | 37 struct WebURLError; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace webkit_media { | 40 namespace webkit_media { |
| 41 class MediaStreamClient; | 41 class MediaStreamClient; |
| 42 } | 42 } |
| 43 | 43 |
| 44 class TestWebKitPlatformSupport; | |
| 45 typedef TestWebKitPlatformSupport* (*PlatformSupportCreatorCallback)( | |
|
tony
2012/07/10 17:39:08
Do we have to use TestWebKitPlatformSupport or can
| |
| 46 bool unit_test_mode); | |
| 47 | |
| 44 // This package provides functions used by DumpRenderTree/chromium. | 48 // This package provides functions used by DumpRenderTree/chromium. |
| 45 // DumpRenderTree/chromium uses some code in webkit/ of Chromium. In | 49 // DumpRenderTree/chromium uses some code in webkit/ of Chromium. In |
| 46 // order to minimize the dependency from WebKit to Chromium, the | 50 // order to minimize the dependency from WebKit to Chromium, the |
| 47 // following functions uses WebKit API classes as possible and hide | 51 // following functions uses WebKit API classes as possible and hide |
| 48 // implementation classes. | 52 // implementation classes. |
| 49 namespace webkit_support { | 53 namespace webkit_support { |
| 50 | 54 |
| 51 // Initializes or terminates a test environment. | 55 // Initializes or terminates a test environment. |
| 52 // |unit_test_mode| should be set to true when running in a TestSuite, in which | 56 // |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 | 57 // case no AtExitManager is created and ICU is not initialized (as it is already |
| 54 // done by the TestSuite). | 58 // done by the TestSuite). |
| 55 // SetUpTestEnvironment() and SetUpTestEnvironmentForUnitTests() calls | 59 // SetUpTestEnvironment() and SetUpTestEnvironmentForUnitTests() calls |
| 56 // WebKit::initialize(). | 60 // WebKit::initialize(). |
| 57 // TearDownTestEnvironment() calls WebKit::shutdown(). | 61 // TearDownTestEnvironment() calls WebKit::shutdown(). |
| 58 // SetUpTestEnvironmentForUnitTests() should be used when running in a | 62 // SetUpTestEnvironmentForUnitTests() should be used when running in a |
| 59 // TestSuite, in which case no AtExitManager is created and ICU is not | 63 // TestSuite, in which case no AtExitManager is created and ICU is not |
| 60 // initialized (as it is already done by the TestSuite). | 64 // initialized (as it is already done by the TestSuite). |
| 61 void SetUpTestEnvironment(); | 65 void SetUpTestEnvironment(); |
| 66 void SetUpTestEnvironment(PlatformSupportCreatorCallback callback); | |
| 62 void SetUpTestEnvironmentForUnitTests(); | 67 void SetUpTestEnvironmentForUnitTests(); |
| 68 void SetUpTestEnvironmentForUnitTests(PlatformSupportCreatorCallback callback); | |
| 63 void TearDownTestEnvironment(); | 69 void TearDownTestEnvironment(); |
| 64 | 70 |
| 65 // Returns a pointer to a WebKitPlatformSupport implementation for | 71 // Returns a pointer to a WebKitPlatformSupport implementation for |
| 66 // DumpRenderTree. Needs to call SetUpTestEnvironment() before this. | 72 // DumpRenderTree. Needs to call SetUpTestEnvironment() before this. |
| 67 // This returns a pointer to a static instance. Don't delete it. | 73 // This returns a pointer to a static instance. Don't delete it. |
| 68 WebKit::WebKitPlatformSupport* GetWebKitPlatformSupport(); | 74 WebKit::WebKitPlatformSupport* GetWebKitPlatformSupport(); |
| 69 | 75 |
| 70 // This is used by WebFrameClient::createPlugin(). | 76 // This is used by WebFrameClient::createPlugin(). |
| 71 WebKit::WebPlugin* CreateWebPlugin(WebKit::WebFrame* frame, | 77 WebKit::WebPlugin* CreateWebPlugin(WebKit::WebFrame* frame, |
| 72 const WebKit::WebPluginParams& params); | 78 const WebKit::WebPluginParams& params); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 | 263 |
| 258 void EnableWebCoreLogChannels(const std::string& channels); | 264 void EnableWebCoreLogChannels(const std::string& channels); |
| 259 | 265 |
| 260 // - Gamepad | 266 // - Gamepad |
| 261 | 267 |
| 262 void SetGamepadData(const WebKit::WebGamepads& pads); | 268 void SetGamepadData(const WebKit::WebGamepads& pads); |
| 263 | 269 |
| 264 } // namespace webkit_support | 270 } // namespace webkit_support |
| 265 | 271 |
| 266 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ | 272 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ |
| OLD | NEW |