| 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" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void DiscardBackingStore(); | 54 void DiscardBackingStore(); |
| 55 // Allow clients to update the paint rect. For example, if we get a gdk | 55 // Allow clients to update the paint rect. For example, if we get a gdk |
| 56 // expose or WM_PAINT event, we need to update the paint rect. | 56 // expose or WM_PAINT event, we need to update the paint rect. |
| 57 void UpdatePaintRect(const gfx::Rect& rect); | 57 void UpdatePaintRect(const gfx::Rect& rect); |
| 58 void Paint(); | 58 void Paint(); |
| 59 | 59 |
| 60 skia::PlatformCanvas* canvas() const { return canvas_.get(); } | 60 skia::PlatformCanvas* canvas() const { return canvas_.get(); } |
| 61 | 61 |
| 62 WebKit::WebScreenInfo GetScreenInfo(); | 62 WebKit::WebScreenInfo GetScreenInfo(); |
| 63 | 63 |
| 64 // Paints the entire canvas a semi-transparent black (grayish). This is used |
| 65 // by the layout tests in fast/repaint. The alpha value matches upstream. |
| 66 void DisplayRepaintMask() { |
| 67 canvas()->drawARGB(167, 0, 0, 0); |
| 68 } |
| 69 |
| 64 protected: | 70 protected: |
| 65 WebWidgetHost(); | 71 WebWidgetHost(); |
| 66 ~WebWidgetHost(); | 72 ~WebWidgetHost(); |
| 67 | 73 |
| 68 #if defined(OS_WIN) | 74 #if defined(OS_WIN) |
| 69 // Per-class wndproc. Returns true if the event should be swallowed. | 75 // Per-class wndproc. Returns true if the event should be swallowed. |
| 70 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam); | 76 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam); |
| 71 | 77 |
| 72 void Resize(LPARAM lparam); | 78 void Resize(LPARAM lparam); |
| 73 void MouseEvent(UINT message, WPARAM wparam, LPARAM lparam); | 79 void MouseEvent(UINT message, WPARAM wparam, LPARAM lparam); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 int scroll_dy_; | 132 int scroll_dy_; |
| 127 | 133 |
| 128 bool track_mouse_leave_; | 134 bool track_mouse_leave_; |
| 129 | 135 |
| 130 #ifndef NDEBUG | 136 #ifndef NDEBUG |
| 131 bool painting_; | 137 bool painting_; |
| 132 #endif | 138 #endif |
| 133 }; | 139 }; |
| 134 | 140 |
| 135 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ | 141 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ |
| OLD | NEW |