| 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_WEBWIDGET_HOST_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_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" | 11 #include "base/scoped_ptr.h" |
| 12 #include "skia/ext/platform_canvas.h" | 12 #include "skia/ext/platform_canvas.h" |
| 13 | 13 |
| 14 class WebWidget; | 14 class WebWidget; |
| 15 class WebWidgetDelegate; | 15 class WebWidgetDelegate; |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Size; | 18 class Size; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace WebKit { |
| 22 struct WebScreenInfo; |
| 23 } |
| 24 |
| 21 #if defined(OS_MACOSX) | 25 #if defined(OS_MACOSX) |
| 22 #ifdef __OBJC__ | 26 #ifdef __OBJC__ |
| 23 @class NSEvent; | 27 @class NSEvent; |
| 24 #else | 28 #else |
| 25 class NSEvent; | 29 class NSEvent; |
| 26 #endif | 30 #endif |
| 27 #endif | 31 #endif |
| 28 | 32 |
| 29 // This class is a simple NativeView-based host for a WebWidget | 33 // This class is a simple NativeView-based host for a WebWidget |
| 30 class WebWidgetHost { | 34 class WebWidgetHost { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 47 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
| 48 void SetCursor(HCURSOR cursor); | 52 void SetCursor(HCURSOR cursor); |
| 49 #endif | 53 #endif |
| 50 | 54 |
| 51 void DiscardBackingStore(); | 55 void DiscardBackingStore(); |
| 52 // Allow clients to update the paint rect. For example, if we get a gdk | 56 // Allow clients to update the paint rect. For example, if we get a gdk |
| 53 // expose or WM_PAINT event, we need to update the paint rect. | 57 // expose or WM_PAINT event, we need to update the paint rect. |
| 54 void UpdatePaintRect(const gfx::Rect& rect); | 58 void UpdatePaintRect(const gfx::Rect& rect); |
| 55 void Paint(); | 59 void Paint(); |
| 56 | 60 |
| 61 WebKit::WebScreenInfo GetScreenInfo(); |
| 62 |
| 57 protected: | 63 protected: |
| 58 WebWidgetHost(); | 64 WebWidgetHost(); |
| 59 ~WebWidgetHost(); | 65 ~WebWidgetHost(); |
| 60 | 66 |
| 61 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
| 62 // Per-class wndproc. Returns true if the event should be swallowed. | 68 // Per-class wndproc. Returns true if the event should be swallowed. |
| 63 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam); | 69 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam); |
| 64 | 70 |
| 65 void Resize(LPARAM lparam); | 71 void Resize(LPARAM lparam); |
| 66 void MouseEvent(UINT message, WPARAM wparam, LPARAM lparam); | 72 void MouseEvent(UINT message, WPARAM wparam, LPARAM lparam); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 int scroll_dy_; | 125 int scroll_dy_; |
| 120 | 126 |
| 121 bool track_mouse_leave_; | 127 bool track_mouse_leave_; |
| 122 | 128 |
| 123 #ifndef NDEBUG | 129 #ifndef NDEBUG |
| 124 bool painting_; | 130 bool painting_; |
| 125 #endif | 131 #endif |
| 126 }; | 132 }; |
| 127 | 133 |
| 128 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ | 134 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ |
| OLD | NEW |