OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlwin.h> | 9 #include <atlwin.h> |
10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
11 #include <oleacc.h> | 11 #include <oleacc.h> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/win/scoped_comptr.h" | 14 #include "base/win/scoped_comptr.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
17 | 17 |
18 namespace ui { | 18 namespace ui { |
19 class WindowEventTarget; | 19 class WindowEventTarget; |
20 } | 20 } |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 class BrowserAccessibilityManagerWin; | |
24 class RenderWidgetHostViewAura; | 23 class RenderWidgetHostViewAura; |
25 | 24 |
26 // Reasons for the existence of this class outlined below:- | 25 // Reasons for the existence of this class outlined below:- |
27 // 1. Some screen readers expect every tab / every unique web content container | 26 // 1. Some screen readers expect every tab / every unique web content container |
28 // to be in its own HWND with class name Chrome_RenderWidgetHostHWND. | 27 // to be in its own HWND with class name Chrome_RenderWidgetHostHWND. |
29 // With Aura there is one main HWND which comprises the whole browser window | 28 // With Aura there is one main HWND which comprises the whole browser window |
30 // or the whole desktop. So, we need a fake HWND with the window class as | 29 // or the whole desktop. So, we need a fake HWND with the window class as |
31 // Chrome_RenderWidgetHostHWND as the root of the accessibility tree for | 30 // Chrome_RenderWidgetHostHWND as the root of the accessibility tree for |
32 // each tab. | 31 // each tab. |
33 // 2. There are legacy drivers for trackpads/trackpoints which have special | 32 // 2. There are legacy drivers for trackpads/trackpoints which have special |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 86 |
88 HWND hwnd() { return m_hWnd; } | 87 HWND hwnd() { return m_hWnd; } |
89 | 88 |
90 // Called when the child window is to be reparented to a new window. | 89 // Called when the child window is to be reparented to a new window. |
91 // The |parent| parameter contains the new parent window. | 90 // The |parent| parameter contains the new parent window. |
92 void UpdateParent(HWND parent); | 91 void UpdateParent(HWND parent); |
93 HWND GetParent(); | 92 HWND GetParent(); |
94 | 93 |
95 IAccessible* window_accessible() { return window_accessible_; } | 94 IAccessible* window_accessible() { return window_accessible_; } |
96 | 95 |
97 void set_browser_accessibility_manager( | |
98 content::BrowserAccessibilityManagerWin* manager) { | |
99 manager_ = manager; | |
100 } | |
101 | |
102 void OnManagerDeleted(content::BrowserAccessibilityManagerWin* manager); | |
103 | |
104 // Functions to show and hide the window. | 96 // Functions to show and hide the window. |
105 void Show(); | 97 void Show(); |
106 void Hide(); | 98 void Hide(); |
107 | 99 |
108 // Resizes the window to the bounds passed in. | 100 // Resizes the window to the bounds passed in. |
109 void SetBounds(const gfx::Rect& bounds); | 101 void SetBounds(const gfx::Rect& bounds); |
110 | 102 |
111 // The pointer to the containing RenderWidgetHostViewAura instance is passed | 103 // The pointer to the containing RenderWidgetHostViewAura instance is passed |
112 // here. | 104 // here. |
113 void set_host(RenderWidgetHostViewAura* host) { | 105 void set_host(RenderWidgetHostViewAura* host) { |
(...skipping 24 matching lines...) Expand all Loading... |
138 LRESULT OnScroll(UINT message, WPARAM w_param, LPARAM l_param); | 130 LRESULT OnScroll(UINT message, WPARAM w_param, LPARAM l_param); |
139 LRESULT OnNCHitTest(UINT message, WPARAM w_param, LPARAM l_param); | 131 LRESULT OnNCHitTest(UINT message, WPARAM w_param, LPARAM l_param); |
140 | 132 |
141 LRESULT OnNCPaint(UINT message, WPARAM w_param, LPARAM l_param); | 133 LRESULT OnNCPaint(UINT message, WPARAM w_param, LPARAM l_param); |
142 LRESULT OnPaint(UINT message, WPARAM w_param, LPARAM l_param); | 134 LRESULT OnPaint(UINT message, WPARAM w_param, LPARAM l_param); |
143 LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param); | 135 LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param); |
144 LRESULT OnNCCalcSize(UINT message, WPARAM w_param, LPARAM l_param); | 136 LRESULT OnNCCalcSize(UINT message, WPARAM w_param, LPARAM l_param); |
145 LRESULT OnSize(UINT message, WPARAM w_param, LPARAM l_param); | 137 LRESULT OnSize(UINT message, WPARAM w_param, LPARAM l_param); |
146 LRESULT OnSysCommand(UINT message, WPARAM w_param, LPARAM l_param); | 138 LRESULT OnSysCommand(UINT message, WPARAM w_param, LPARAM l_param); |
147 | 139 |
148 content::BrowserAccessibilityManagerWin* manager_; | |
149 base::win::ScopedComPtr<IAccessible> window_accessible_; | 140 base::win::ScopedComPtr<IAccessible> window_accessible_; |
150 | 141 |
151 // Set to true if we turned on mouse tracking. | 142 // Set to true if we turned on mouse tracking. |
152 bool mouse_tracking_enabled_; | 143 bool mouse_tracking_enabled_; |
153 | 144 |
154 RenderWidgetHostViewAura* host_; | 145 RenderWidgetHostViewAura* host_; |
155 | 146 |
156 DISALLOW_COPY_AND_ASSIGN(LegacyRenderWidgetHostHWND); | 147 DISALLOW_COPY_AND_ASSIGN(LegacyRenderWidgetHostHWND); |
157 }; | 148 }; |
158 | 149 |
159 } // namespace content | 150 } // namespace content |
160 | 151 |
161 #endif // CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_ | 152 #endif // CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_ |
162 | 153 |
OLD | NEW |