OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
7 | 7 |
8 #include "ui/views/views_export.h" | 8 #include "ui/views/views_export.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Returns true if the delegate modifies |insets| to define a custom client | 45 // Returns true if the delegate modifies |insets| to define a custom client |
46 // area for the window, false if the default client area should be used. If | 46 // area for the window, false if the default client area should be used. If |
47 // false is returned, |insets| is not modified. | 47 // false is returned, |insets| is not modified. |
48 virtual bool GetClientAreaInsets(gfx::Insets* insets) const = 0; | 48 virtual bool GetClientAreaInsets(gfx::Insets* insets) const = 0; |
49 | 49 |
50 // Returns the minimum and maximum size the window can be resized to by the | 50 // Returns the minimum and maximum size the window can be resized to by the |
51 // user. | 51 // user. |
52 virtual void GetMinMaxSize(gfx::Size* min_size, | 52 virtual void GetMinMaxSize(gfx::Size* min_size, |
53 gfx::Size* max_size) const = 0; | 53 gfx::Size* max_size) const = 0; |
54 | 54 |
| 55 // Returns the current size of the RootView. |
| 56 virtual gfx::Size GetRootViewSize() const = 0; |
| 57 |
55 virtual void ResetWindowControls() = 0; | 58 virtual void ResetWindowControls() = 0; |
| 59 virtual void UpdateFrame() = 0; |
| 60 |
| 61 virtual void PaintLayeredWindow(gfx::Canvas* canvas) = 0; |
56 | 62 |
57 virtual InputMethod* GetInputMethod() = 0; | 63 virtual InputMethod* GetInputMethod() = 0; |
58 | 64 |
59 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; | 65 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; |
60 | 66 |
61 // TODO(beng): Investigate migrating these methods to On* prefixes once | 67 // TODO(beng): Investigate migrating these methods to On* prefixes once |
62 // HWNDMessageHandler is the WindowImpl. | 68 // HWNDMessageHandler is the WindowImpl. |
63 | 69 |
64 // Called when another app was activated. | 70 // Called when another app was activated. |
65 virtual void HandleAppDeactivated() = 0; | 71 virtual void HandleAppDeactivated() = 0; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 virtual void HandleNativeBlur(HWND focused_window) = 0; | 128 virtual void HandleNativeBlur(HWND focused_window) = 0; |
123 | 129 |
124 // Called when a mouse event is received. Returns true if the event was | 130 // Called when a mouse event is received. Returns true if the event was |
125 // handled by the delegate. | 131 // handled by the delegate. |
126 virtual bool HandleMouseEvent(const ui::MouseEvent& event) = 0; | 132 virtual bool HandleMouseEvent(const ui::MouseEvent& event) = 0; |
127 | 133 |
128 // Called when a key event is received. Returns true if the event was handled | 134 // Called when a key event is received. Returns true if the event was handled |
129 // by the delegate. | 135 // by the delegate. |
130 virtual bool HandleKeyEvent(const ui::KeyEvent& event) = 0; | 136 virtual bool HandleKeyEvent(const ui::KeyEvent& event) = 0; |
131 | 137 |
| 138 // Called to compel the delegate to paint |invalid_rect| accelerated. Returns |
| 139 // true if accelerated painting was performed. |
| 140 virtual bool HandlePaintAccelerated(const gfx::Rect& invalid_rect) = 0; |
| 141 |
| 142 // Called to compel the delegate to paint using the software path. |
| 143 virtual void HandlePaint(gfx::Canvas* canvas) = 0; |
| 144 |
132 // Called when we have detected a screen reader. | 145 // Called when we have detected a screen reader. |
133 virtual void HandleScreenReaderDetected() = 0; | 146 virtual void HandleScreenReaderDetected() = 0; |
134 | 147 |
135 // Called to forward a WM_NOTIFY message to the tooltip manager. | 148 // Called to forward a WM_NOTIFY message to the tooltip manager. |
136 virtual bool HandleTooltipNotify(int w_param, | 149 virtual bool HandleTooltipNotify(int w_param, |
137 NMHDR* l_param, | 150 NMHDR* l_param, |
138 LRESULT* l_result) = 0; | 151 LRESULT* l_result) = 0; |
139 | 152 |
140 // Called to forward mouse events to the tooltip manager. | 153 // Called to forward mouse events to the tooltip manager. |
141 virtual void HandleTooltipMouseMove(UINT message, | 154 virtual void HandleTooltipMouseMove(UINT message, |
142 WPARAM w_param, | 155 WPARAM w_param, |
143 LPARAM l_param) = 0; | 156 LPARAM l_param) = 0; |
144 | 157 |
145 // This is provided for methods that need to call private methods on NWW. | 158 // This is provided for methods that need to call private methods on NWW. |
146 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. | 159 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. |
147 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; | 160 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; |
148 | 161 |
149 protected: | 162 protected: |
150 virtual ~HWNDMessageHandlerDelegate() {} | 163 virtual ~HWNDMessageHandlerDelegate() {} |
151 }; | 164 }; |
152 | 165 |
153 } // namespace views | 166 } // namespace views |
154 | 167 |
155 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 168 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
OLD | NEW |