blob: a10102a3c08df6ed154b744ef933c4592df7a0e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
#ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
#define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
#include "webkit/glue/simple_webmimeregistry_impl.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h"
#include "WebKit.h"
class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
public:
TestShellWebKitInit(bool layout_test_mode) {
WebKit::initialize(this);
// TODO(darin): This should eventually be a property of WebKitClientImpl.
webkit_glue::SetLayoutTestMode(layout_test_mode);
}
~TestShellWebKitInit() {
WebKit::shutdown();
}
virtual WebKit::WebMimeRegistry* mimeRegistry() {
return &mime_registry_;
}
private:
webkit_glue::SimpleWebMimeRegistryImpl mime_registry_;
};
#endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
|