OLD | NEW |
(Empty) | |
| 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 |
| 3 // LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| 7 |
| 8 #include "webkit/glue/simple_webmimeregistry_impl.h" |
| 9 #include "webkit/glue/webkit_glue.h" |
| 10 #include "webkit/glue/webkitclient_impl.h" |
| 11 |
| 12 #include "WebKit.h" |
| 13 |
| 14 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { |
| 15 public: |
| 16 TestShellWebKitInit(bool layout_test_mode) { |
| 17 WebKit::initialize(this); |
| 18 |
| 19 // TODO(darin): This should eventually be a property of WebKitClientImpl. |
| 20 webkit_glue::SetLayoutTestMode(layout_test_mode); |
| 21 } |
| 22 |
| 23 ~TestShellWebKitInit() { |
| 24 WebKit::shutdown(); |
| 25 } |
| 26 |
| 27 virtual WebKit::WebMimeRegistry* mimeRegistry() { |
| 28 return &mime_registry_; |
| 29 } |
| 30 |
| 31 private: |
| 32 webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; |
| 33 }; |
| 34 |
| 35 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
OLD | NEW |