Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: webkit/tools/test_shell/webview_host.h

Issue 519030: bsds: views/ and webkit/ support for FreeBSD/OpenBSD (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "app/gfx/native_widget_types.h" 10 #include "app/gfx/native_widget_types.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/gfx/rect.h" 12 #include "base/gfx/rect.h"
13 #include "webkit/tools/test_shell/webwidget_host.h" 13 #include "webkit/tools/test_shell/webwidget_host.h"
14 #if defined(OS_LINUX) 14
15 #if defined(TOOLKIT_USES_GTK)
15 #include "webkit/glue/plugins/gtk_plugin_container_manager.h" 16 #include "webkit/glue/plugins/gtk_plugin_container_manager.h"
16 #endif 17 #endif
17 18
18 struct WebPreferences; 19 struct WebPreferences;
19 class TestWebViewDelegate; 20 class TestWebViewDelegate;
20 21
21 namespace WebKit { 22 namespace WebKit {
22 class WebView; 23 class WebView;
23 } 24 }
24 25
25 // This class is a simple NativeView-based host for a WebView 26 // This class is a simple NativeView-based host for a WebView
26 class WebViewHost : public WebWidgetHost { 27 class WebViewHost : public WebWidgetHost {
27 public: 28 public:
28 // The new instance is deleted once the associated NativeView is destroyed. 29 // The new instance is deleted once the associated NativeView is destroyed.
29 // 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
30 // MoveWindow (or equivalent) function. 31 // MoveWindow (or equivalent) function.
31 static WebViewHost* Create(gfx::NativeView parent_view, 32 static WebViewHost* Create(gfx::NativeView parent_view,
32 TestWebViewDelegate* delegate, 33 TestWebViewDelegate* delegate,
33 const WebPreferences& prefs); 34 const WebPreferences& prefs);
34 35
35 WebKit::WebView* webview() const; 36 WebKit::WebView* webview() const;
36 37
37 #if defined(OS_LINUX) 38 #if defined(TOOLKIT_USES_GTK)
38 // Create a new plugin parent container for a given plugin XID. 39 // Create a new plugin parent container for a given plugin XID.
39 void CreatePluginContainer(gfx::PluginWindowHandle id); 40 void CreatePluginContainer(gfx::PluginWindowHandle id);
40 41
41 // Destroy the plugin parent container when a plugin has been destroyed. 42 // Destroy the plugin parent container when a plugin has been destroyed.
42 void DestroyPluginContainer(gfx::PluginWindowHandle id); 43 void DestroyPluginContainer(gfx::PluginWindowHandle id);
43 44
44 GtkPluginContainerManager* plugin_container_manager() { 45 GtkPluginContainerManager* plugin_container_manager() {
45 return &plugin_container_manager_; 46 return &plugin_container_manager_;
46 } 47 }
47 #elif defined(OS_MACOSX) 48 #elif defined(OS_MACOSX)
48 void SetIsActive(bool active); 49 void SetIsActive(bool active);
49 #endif 50 #endif
50 51
51 protected: 52 protected:
52 #if defined(OS_WIN) 53 #if defined(OS_WIN)
53 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam) { 54 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam) {
54 return false; 55 return false;
55 } 56 }
56 #endif 57 #endif
57 58
58 #if defined(OS_LINUX) 59 #if defined(TOOLKIT_USES_GTK)
59 // Helper class that creates and moves plugin containers. 60 // Helper class that creates and moves plugin containers.
60 GtkPluginContainerManager plugin_container_manager_; 61 GtkPluginContainerManager plugin_container_manager_;
61 #endif 62 #endif
62 }; 63 };
63 64
64 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ 65 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698