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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/gfx/native_widget_types.h" | 9 #include "base/gfx/native_widget_types.h" |
10 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
11 #include "base/scoped_ptr.h" | |
12 #include "webkit/tools/test_shell/webwidget_host.h" | 11 #include "webkit/tools/test_shell/webwidget_host.h" |
13 | 12 |
14 struct WebPreferences; | 13 struct WebPreferences; |
15 class WebView; | 14 class WebView; |
16 class WebViewDelegate; | 15 class WebViewDelegate; |
17 | 16 |
18 // This class is a simple NativeView-based host for a WebView | 17 // This class is a simple NativeView-based host for a WebView |
19 class WebViewHost : public WebWidgetHost { | 18 class WebViewHost : public WebWidgetHost { |
20 public: | 19 public: |
21 // The new instance is deleted once the associated NativeView is destroyed. | 20 // The new instance is deleted once the associated NativeView is destroyed. |
22 // The newly created window should be resized after it is created, using the | 21 // The newly created window should be resized after it is created, using the |
23 // MoveWindow (or equivalent) function. | 22 // MoveWindow (or equivalent) function. |
24 static WebViewHost* Create(gfx::NativeView parent_view, | 23 static WebViewHost* Create(gfx::NativeView parent_view, |
25 WebViewDelegate* delegate, | 24 WebViewDelegate* delegate, |
26 const WebPreferences& prefs); | 25 const WebPreferences& prefs); |
27 | 26 |
28 WebView* webview() const; | 27 WebView* webview() const; |
29 | 28 |
30 protected: | 29 protected: |
31 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
32 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam) { | 31 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam) { |
33 return false; | 32 return false; |
34 } | 33 } |
35 #endif | 34 #endif |
36 }; | 35 }; |
37 | 36 |
38 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ | 37 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBVIEW_HOST_H_ |
OLD | NEW |