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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.h

Issue 2692173003: Implemented SetSelection for the Web content on Windows. (Closed)
Patch Set: Fixed another compilation error on Windows. Created 3 years, 10 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
OLDNEW
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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "content/browser/accessibility/ax_platform_position.h"
17 #include "content/browser/accessibility/ax_tree_id_registry.h" 18 #include "content/browser/accessibility/ax_tree_id_registry.h"
18 #include "content/browser/accessibility/browser_accessibility_event.h" 19 #include "content/browser/accessibility/browser_accessibility_event.h"
19 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
20 #include "content/public/browser/ax_event_notification_details.h" 21 #include "content/public/browser/ax_event_notification_details.h"
21 #include "third_party/WebKit/public/web/WebAXEnums.h" 22 #include "third_party/WebKit/public/web/WebAXEnums.h"
22 #include "ui/accessibility/ax_action_data.h" 23 #include "ui/accessibility/ax_action_data.h"
23 #include "ui/accessibility/ax_node_data.h" 24 #include "ui/accessibility/ax_node_data.h"
25 #include "ui/accessibility/ax_range.h"
24 #include "ui/accessibility/ax_serializable_tree.h" 26 #include "ui/accessibility/ax_serializable_tree.h"
25 #include "ui/accessibility/ax_tree_update.h" 27 #include "ui/accessibility/ax_tree_update.h"
26 #include "ui/gfx/native_widget_types.h" 28 #include "ui/gfx/native_widget_types.h"
27 29
28 struct AccessibilityHostMsg_LocationChangeParams; 30 struct AccessibilityHostMsg_LocationChangeParams;
29 31
30 namespace content { 32 namespace content {
31 class BrowserAccessibility; 33 class BrowserAccessibility;
32 class BrowserAccessibilityManager; 34 class BrowserAccessibilityManager;
33 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void HitTest(const gfx::Point& point); 193 void HitTest(const gfx::Point& point);
192 void Increment(const BrowserAccessibility& node); 194 void Increment(const BrowserAccessibility& node);
193 void ScrollToMakeVisible( 195 void ScrollToMakeVisible(
194 const BrowserAccessibility& node, gfx::Rect subfocus); 196 const BrowserAccessibility& node, gfx::Rect subfocus);
195 void ScrollToPoint( 197 void ScrollToPoint(
196 const BrowserAccessibility& node, gfx::Point point); 198 const BrowserAccessibility& node, gfx::Point point);
197 void SetFocus(const BrowserAccessibility& node); 199 void SetFocus(const BrowserAccessibility& node);
198 void SetScrollOffset(const BrowserAccessibility& node, gfx::Point offset); 200 void SetScrollOffset(const BrowserAccessibility& node, gfx::Point offset);
199 void SetValue( 201 void SetValue(
200 const BrowserAccessibility& node, const base::string16& value); 202 const BrowserAccessibility& node, const base::string16& value);
201 void SetTextSelection( 203 void SetSelection(
202 const BrowserAccessibility& node, int start_offset, int end_offset); 204 ui::AXRange<AXPlatformPosition::AXPositionInstance::element_type> range);
203 void SetAccessibilityFocus(const BrowserAccessibility& node); 205 void SetAccessibilityFocus(const BrowserAccessibility& node);
204 void ShowContextMenu(const BrowserAccessibility& node); 206 void ShowContextMenu(const BrowserAccessibility& node);
205 207
206 // Retrieve the bounds of the parent View in screen coordinates. 208 // Retrieve the bounds of the parent View in screen coordinates.
207 gfx::Rect GetViewBounds(); 209 gfx::Rect GetViewBounds();
208 210
209 // Fire an event telling native assistive technology to move focus to the 211 // Fire an event telling native assistive technology to move focus to the
210 // given find in page result. 212 // given find in page result.
211 void ActivateFindInPageResult(int request_id, int match_index); 213 void ActivateFindInPageResult(int request_id, int match_index);
212 214
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // but return the best possible match instantly. 367 // but return the best possible match instantly.
366 // 368 //
367 // 369 //
368 BrowserAccessibility* CachingAsyncHitTest(const gfx::Point& screen_point); 370 BrowserAccessibility* CachingAsyncHitTest(const gfx::Point& screen_point);
369 371
370 // Called in response to a hover event, caches the result for the next 372 // Called in response to a hover event, caches the result for the next
371 // call to CachingAsyncHitTest(). 373 // call to CachingAsyncHitTest().
372 void CacheHitTestResult(BrowserAccessibility* hit_test_result); 374 void CacheHitTestResult(BrowserAccessibility* hit_test_result);
373 375
374 protected: 376 protected:
377 using AXPlatformPositionInstance = AXPlatformPosition::AXPositionInstance;
378 using AXPlatformRange = ui::AXRange<AXPlatformPositionInstance::element_type>;
379
375 BrowserAccessibilityManager( 380 BrowserAccessibilityManager(
376 BrowserAccessibilityDelegate* delegate, 381 BrowserAccessibilityDelegate* delegate,
377 BrowserAccessibilityFactory* factory); 382 BrowserAccessibilityFactory* factory);
378 383
379 BrowserAccessibilityManager( 384 BrowserAccessibilityManager(
380 const ui::AXTreeUpdate& initial_tree, 385 const ui::AXTreeUpdate& initial_tree,
381 BrowserAccessibilityDelegate* delegate, 386 BrowserAccessibilityDelegate* delegate,
382 BrowserAccessibilityFactory* factory); 387 BrowserAccessibilityFactory* factory);
383 388
384 // Send platform-specific notifications to each of these objects that 389 // Send platform-specific notifications to each of these objects that
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // node within that parent tree. It's computed as needed and cached for 466 // node within that parent tree. It's computed as needed and cached for
462 // speed so that it can be accessed quickly if it hasn't changed. 467 // speed so that it can be accessed quickly if it hasn't changed.
463 int parent_node_id_from_parent_tree_; 468 int parent_node_id_from_parent_tree_;
464 469
465 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); 470 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
466 }; 471 };
467 472
468 } // namespace content 473 } // namespace content
469 474
470 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 475 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698