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

Side by Side Diff: content/browser/renderer_host/legacy_render_widget_host_win.h

Issue 2852763002: Added a system caret used for accessibility on Windows. (Closed)
Patch Set: Disabled all tests Created 3 years, 5 months 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 | « chrome/test/BUILD.gn ('k') | content/browser/renderer_host/legacy_render_widget_host_win.cc » ('j') | 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) 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 <atlcrack.h> 9 #include <atlcrack.h>
10 #include <atlwin.h> 10 #include <atlwin.h>
11 #include <oleacc.h> 11 #include <oleacc.h>
12 12
13 #include <memory> 13 #include <memory>
14 14
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/win/scoped_comptr.h" 16 #include "base/win/scoped_comptr.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "ui/gfx/geometry/rect.h" 18 #include "ui/gfx/geometry/rect.h"
19 19
20 namespace gfx { 20 namespace gfx {
21 namespace win { 21 namespace win {
22 class DirectManipulationHelper; 22 class DirectManipulationHelper;
23 } // namespace win 23 } // namespace win
24 } // namespace gfx 24 } // namespace gfx
25 25
26 namespace ui { 26 namespace ui {
27 class AXFakeCaretWin; 27 class AXSystemCaretWin;
28 class WindowEventTarget; 28 class WindowEventTarget;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 class RenderWidgetHostViewAura; 32 class RenderWidgetHostViewAura;
33 33
34 // Reasons for the existence of this class outlined below:- 34 // Reasons for the existence of this class outlined below:-
35 // 1. Some screen readers expect every tab / every unique web content container 35 // 1. Some screen readers expect every tab / every unique web content container
36 // to be in its own HWND with class name Chrome_RenderWidgetHostHWND. 36 // to be in its own HWND with class name Chrome_RenderWidgetHostHWND.
37 // With Aura there is one main HWND which comprises the whole browser window 37 // With Aura there is one main HWND which comprises the whole browser window
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Resizes the window to the bounds passed in. 115 // Resizes the window to the bounds passed in.
116 void SetBounds(const gfx::Rect& bounds); 116 void SetBounds(const gfx::Rect& bounds);
117 117
118 // The pointer to the containing RenderWidgetHostViewAura instance is passed 118 // The pointer to the containing RenderWidgetHostViewAura instance is passed
119 // here. 119 // here.
120 void set_host(RenderWidgetHostViewAura* host) { 120 void set_host(RenderWidgetHostViewAura* host) {
121 host_ = host; 121 host_ = host;
122 } 122 }
123 123
124 // Changes the position of the fake caret. 124 // Changes the position of the system caret used for accessibility.
125 void MoveCaretTo(const gfx::Rect& bounds); 125 void MoveCaretTo(const gfx::Rect& bounds);
126 126
127 protected: 127 protected:
128 void OnFinalMessage(HWND hwnd) override; 128 void OnFinalMessage(HWND hwnd) override;
129 129
130 private: 130 private:
131 explicit LegacyRenderWidgetHostHWND(HWND parent); 131 explicit LegacyRenderWidgetHostHWND(HWND parent);
132 ~LegacyRenderWidgetHostHWND() override; 132 ~LegacyRenderWidgetHostHWND() override;
133 133
134 bool Init(); 134 bool Init();
(...skipping 22 matching lines...) Expand all
157 LRESULT OnWindowPosChanged(UINT message, WPARAM w_param, LPARAM l_param); 157 LRESULT OnWindowPosChanged(UINT message, WPARAM w_param, LPARAM l_param);
158 158
159 base::win::ScopedComPtr<IAccessible> window_accessible_; 159 base::win::ScopedComPtr<IAccessible> window_accessible_;
160 160
161 // Set to true if we turned on mouse tracking. 161 // Set to true if we turned on mouse tracking.
162 bool mouse_tracking_enabled_; 162 bool mouse_tracking_enabled_;
163 163
164 RenderWidgetHostViewAura* host_; 164 RenderWidgetHostViewAura* host_;
165 165
166 // Some assistive software need to track the location of the caret. 166 // Some assistive software need to track the location of the caret.
167 std::unique_ptr<ui::AXFakeCaretWin> ax_fake_caret_; 167 std::unique_ptr<ui::AXSystemCaretWin> ax_system_caret_;
168 168
169 // This class provides functionality to register the legacy window as a 169 // This class provides functionality to register the legacy window as a
170 // Direct Manipulation consumer. This allows us to support smooth scroll 170 // Direct Manipulation consumer. This allows us to support smooth scroll
171 // in Chrome on Windows 10. 171 // in Chrome on Windows 10.
172 std::unique_ptr<gfx::win::DirectManipulationHelper> 172 std::unique_ptr<gfx::win::DirectManipulationHelper>
173 direct_manipulation_helper_; 173 direct_manipulation_helper_;
174 174
175 DISALLOW_COPY_AND_ASSIGN(LegacyRenderWidgetHostHWND); 175 DISALLOW_COPY_AND_ASSIGN(LegacyRenderWidgetHostHWND);
176 }; 176 };
177 177
178 } // namespace content 178 } // namespace content
179 179
180 #endif // CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_ 180 #endif // CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_
181 181
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | content/browser/renderer_host/legacy_render_widget_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698