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" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/callback.h" | |
|
tony
2012/07/09 18:23:29
We don't want to include callback.h here. This ma
Tommy Widenflycht
2012/07/10 09:27:19
Done.
| |
| 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& callback); | |
| 62 void SetUpTestEnvironmentForUnitTests(); | 68 void SetUpTestEnvironmentForUnitTests(); |
| 69 void SetUpTestEnvironmentForUnitTests( | |
| 70 const PlatformSupportCreatorCallback& callback); | |
| 63 void TearDownTestEnvironment(); | 71 void TearDownTestEnvironment(); |
| 64 | 72 |
| 65 // Returns a pointer to a WebKitPlatformSupport implementation for | 73 // Returns a pointer to a WebKitPlatformSupport implementation for |
| 66 // DumpRenderTree. Needs to call SetUpTestEnvironment() before this. | 74 // DumpRenderTree. Needs to call SetUpTestEnvironment() before this. |
| 67 // This returns a pointer to a static instance. Don't delete it. | 75 // This returns a pointer to a static instance. Don't delete it. |
| 68 WebKit::WebKitPlatformSupport* GetWebKitPlatformSupport(); | 76 WebKit::WebKitPlatformSupport* GetWebKitPlatformSupport(); |
| 69 | 77 |
| 70 // This is used by WebFrameClient::createPlugin(). | 78 // This is used by WebFrameClient::createPlugin(). |
| 71 WebKit::WebPlugin* CreateWebPlugin(WebKit::WebFrame* frame, | 79 WebKit::WebPlugin* CreateWebPlugin(WebKit::WebFrame* frame, |
| 72 const WebKit::WebPluginParams& params); | 80 const WebKit::WebPluginParams& params); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 | 265 |
| 258 void EnableWebCoreLogChannels(const std::string& channels); | 266 void EnableWebCoreLogChannels(const std::string& channels); |
| 259 | 267 |
| 260 // - Gamepad | 268 // - Gamepad |
| 261 | 269 |
| 262 void SetGamepadData(const WebKit::WebGamepads& pads); | 270 void SetGamepadData(const WebKit::WebGamepads& pads); |
| 263 | 271 |
| 264 } // namespace webkit_support | 272 } // namespace webkit_support |
| 265 | 273 |
| 266 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ | 274 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ |
| OLD | NEW |