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

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

Issue 8000: Start writing the GTK code for test_shell. (Closed)
Patch Set: Sync with master Created 12 years, 1 month 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
« no previous file with comments | « webkit/tools/test_shell/gtk/webwidget_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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/platform_canvas.h" 10 #include "base/gfx/platform_canvas.h"
(...skipping 24 matching lines...) Expand all
35 gfx::ViewHandle window_handle() const { return view_; } 35 gfx::ViewHandle window_handle() const { return view_; }
36 WebWidget* webwidget() const { return webwidget_; } 36 WebWidget* webwidget() const { return webwidget_; }
37 37
38 void DidInvalidateRect(const gfx::Rect& rect); 38 void DidInvalidateRect(const gfx::Rect& rect);
39 void DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect); 39 void DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect);
40 #if defined(OS_WIN) 40 #if defined(OS_WIN)
41 void SetCursor(HCURSOR cursor); 41 void SetCursor(HCURSOR cursor);
42 #endif 42 #endif
43 43
44 void DiscardBackingStore(); 44 void DiscardBackingStore();
45 void Paint();
45 46
46 protected: 47 protected:
47 WebWidgetHost(); 48 WebWidgetHost();
48 ~WebWidgetHost(); 49 ~WebWidgetHost();
49 50
50 #if defined(OS_WIN) 51 #if defined(OS_WIN)
51 // Per-class wndproc. Returns true if the event should be swallowed. 52 // Per-class wndproc. Returns true if the event should be swallowed.
52 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam); 53 virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam);
53 54
54 void Paint();
55 void Resize(LPARAM lparam); 55 void Resize(LPARAM lparam);
56 void MouseEvent(UINT message, WPARAM wparam, LPARAM lparam); 56 void MouseEvent(UINT message, WPARAM wparam, LPARAM lparam);
57 void WheelEvent(WPARAM wparam, LPARAM lparam); 57 void WheelEvent(WPARAM wparam, LPARAM lparam);
58 void KeyEvent(UINT message, WPARAM wparam, LPARAM lparam); 58 void KeyEvent(UINT message, WPARAM wparam, LPARAM lparam);
59 void CaptureLostEvent(); 59 void CaptureLostEvent();
60 void SetFocus(bool enable); 60 void SetFocus(bool enable);
61 61
62 static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); 62 static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
63 #elif defined(OS_MACOSX) 63 #elif defined(OS_MACOSX)
64 // These need to be called from a non-subclass, so they need to be public. 64 // These need to be called from a non-subclass, so they need to be public.
65 public: 65 public:
66 void Paint();
67 void Resize(const gfx::Rect& rect); 66 void Resize(const gfx::Rect& rect);
68 void MouseEvent(NSEvent *); 67 void MouseEvent(NSEvent *);
69 void WheelEvent(NSEvent *); 68 void WheelEvent(NSEvent *);
70 void KeyEvent(NSEvent *); 69 void KeyEvent(NSEvent *);
71 void SetFocus(bool enable); 70 void SetFocus(bool enable);
72 protected: 71 protected:
72 #elif defined(OS_LINUX)
73 public:
74 void WindowDestroyed();
75 void Resize(const gfx::Size& size);
73 #endif 76 #endif
74 77
75 void TrackMouseLeave(bool enable); 78 void TrackMouseLeave(bool enable);
76 void ResetScrollRect(); 79 void ResetScrollRect();
77 void PaintRect(const gfx::Rect& rect); 80 void PaintRect(const gfx::Rect& rect);
78 81
79 void set_painting(bool value) { 82 void set_painting(bool value) {
80 #ifndef NDEBUG 83 #ifndef NDEBUG
81 painting_ = value; 84 painting_ = value;
82 #endif 85 #endif
(...skipping 12 matching lines...) Expand all
95 int scroll_dy_; 98 int scroll_dy_;
96 99
97 bool track_mouse_leave_; 100 bool track_mouse_leave_;
98 101
99 #ifndef NDEBUG 102 #ifndef NDEBUG
100 bool painting_; 103 bool painting_;
101 #endif 104 #endif
102 }; 105 };
103 106
104 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ 107 #endif // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/gtk/webwidget_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698