| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 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 | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| 7 | 7 |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "webkit/glue/simple_webmimeregistry_impl.h" | 9 #include "webkit/glue/simple_webmimeregistry_impl.h" |
| 10 #include "webkit/glue/webkit_glue.h" | 10 #include "webkit/glue/webkit_glue.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { | 22 class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { |
| 23 public: | 23 public: |
| 24 TestShellWebKitInit(bool layout_test_mode) { | 24 TestShellWebKitInit(bool layout_test_mode) { |
| 25 v8::V8::SetCounterFunction(StatsTable::FindLocation); | 25 v8::V8::SetCounterFunction(StatsTable::FindLocation); |
| 26 | 26 |
| 27 WebKit::initialize(this); | 27 WebKit::initialize(this); |
| 28 WebKit::setLayoutTestMode(layout_test_mode); | 28 WebKit::setLayoutTestMode(layout_test_mode); |
| 29 WebKit::registerURLSchemeAsLocal( | 29 WebKit::registerURLSchemeAsLocal( |
| 30 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); | 30 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); |
| 31 WebKit::registerURLSchemeAsNoAccess( |
| 32 ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); |
| 31 WebKit::registerExtension(extensions_v8::GearsExtension::Get()); | 33 WebKit::registerExtension(extensions_v8::GearsExtension::Get()); |
| 32 WebKit::registerExtension(extensions_v8::IntervalExtension::Get()); | 34 WebKit::registerExtension(extensions_v8::IntervalExtension::Get()); |
| 33 } | 35 } |
| 34 | 36 |
| 35 ~TestShellWebKitInit() { | 37 ~TestShellWebKitInit() { |
| 36 WebKit::shutdown(); | 38 WebKit::shutdown(); |
| 37 } | 39 } |
| 38 | 40 |
| 39 virtual WebKit::WebMimeRegistry* mimeRegistry() { | 41 virtual WebKit::WebMimeRegistry* mimeRegistry() { |
| 40 return &mime_registry_; | 42 return &mime_registry_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 86 |
| 85 virtual WebKit::WebString defaultLocale() { | 87 virtual WebKit::WebString defaultLocale() { |
| 86 return ASCIIToUTF16("en-US"); | 88 return ASCIIToUTF16("en-US"); |
| 87 } | 89 } |
| 88 | 90 |
| 89 private: | 91 private: |
| 90 webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; | 92 webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; |
| 91 }; | 93 }; |
| 92 | 94 |
| 93 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ | 95 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ |
| OLD | NEW |