OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ |
6 #define WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "gfx/native_widget_types.h" | 11 #include "gfx/native_widget_types.h" |
12 #include "gfx/rect.h" | 12 #include "gfx/rect.h" |
13 #include "webkit/tools/test_shell/webwidget_host.h" | 13 #include "webkit/tools/test_shell/webwidget_host.h" |
14 | 14 |
15 #if defined(TOOLKIT_USES_GTK) | 15 #if defined(TOOLKIT_USES_GTK) |
16 #include "webkit/glue/plugins/gtk_plugin_container_manager.h" | 16 #include "webkit/glue/plugins/gtk_plugin_container_manager.h" |
17 #endif | 17 #endif |
18 | 18 |
19 struct WebPreferences; | 19 struct WebPreferences; |
20 class TestWebViewDelegate; | 20 class TestWebViewDelegate; |
21 | 21 |
22 namespace WebKit { | 22 namespace WebKit { |
23 class WebDevToolsAgentClient; | |
24 class WebView; | 23 class WebView; |
25 } | 24 } |
26 | 25 |
27 // This class is a simple NativeView-based host for a WebView | 26 // This class is a simple NativeView-based host for a WebView |
28 class WebViewHost : public WebWidgetHost { | 27 class WebViewHost : public WebWidgetHost { |
29 public: | 28 public: |
30 // The new instance is deleted once the associated NativeView is destroyed. | 29 // The new instance is deleted once the associated NativeView is destroyed. |
31 // The newly created window should be resized after it is created, using the | 30 // The newly created window should be resized after it is created, using the |
32 // MoveWindow (or equivalent) function. | 31 // MoveWindow (or equivalent) function. |
33 static WebViewHost* Create(gfx::NativeView parent_view, | 32 static WebViewHost* Create(gfx::NativeView parent_view, |
34 TestWebViewDelegate* delegate, | 33 TestWebViewDelegate* delegate, |
35 WebKit::WebDevToolsAgentClient* devtoolsClient, | |
36 const WebPreferences& prefs); | 34 const WebPreferences& prefs); |
37 | 35 |
38 WebKit::WebView* webview() const; | 36 WebKit::WebView* webview() const; |
39 | 37 |
40 #if defined(TOOLKIT_USES_GTK) | 38 #if defined(TOOLKIT_USES_GTK) |
41 // Create a new plugin parent container for a given plugin XID. | 39 // Create a new plugin parent container for a given plugin XID. |
42 void CreatePluginContainer(gfx::PluginWindowHandle id); | 40 void CreatePluginContainer(gfx::PluginWindowHandle id); |
43 | 41 |
44 // Destroy the plugin parent container when a plugin has been destroyed. | 42 // Destroy the plugin parent container when a plugin has been destroyed. |
45 void DestroyPluginContainer(gfx::PluginWindowHandle id); | 43 void DestroyPluginContainer(gfx::PluginWindowHandle id); |
(...skipping 12 matching lines...) Expand all Loading... |
58 } | 56 } |
59 #endif | 57 #endif |
60 | 58 |
61 #if defined(TOOLKIT_USES_GTK) | 59 #if defined(TOOLKIT_USES_GTK) |
62 // Helper class that creates and moves plugin containers. | 60 // Helper class that creates and moves plugin containers. |
63 GtkPluginContainerManager plugin_container_manager_; | 61 GtkPluginContainerManager plugin_container_manager_; |
64 #endif | 62 #endif |
65 }; | 63 }; |
66 | 64 |
67 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ | 65 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ |
OLD | NEW |