Chromium Code Reviews| 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 #include "content/browser/accessibility/browser_accessibility_manager.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/accessibility/browser_accessibility.h" | 8 #include "content/browser/accessibility/browser_accessibility.h" |
| 9 #include "content/common/accessibility_messages.h" | 9 #include "content/common/accessibility_messages.h" |
| 10 #include "ui/accessibility/ax_tree_serializer.h" | 10 #include "ui/accessibility/ax_tree_serializer.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 | 279 |
| 280 void BrowserAccessibilityManager::ScrollToPoint( | 280 void BrowserAccessibilityManager::ScrollToPoint( |
| 281 const BrowserAccessibility& node, gfx::Point point) { | 281 const BrowserAccessibility& node, gfx::Point point) { |
| 282 if (delegate_) { | 282 if (delegate_) { |
| 283 delegate_->AccessibilityScrollToPoint(node.GetId(), point); | 283 delegate_->AccessibilityScrollToPoint(node.GetId(), point); |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 | 286 |
| 287 void BrowserAccessibilityManager::SetValue( | |
| 288 const BrowserAccessibility& node, const base::string16& value) { | |
|
nasko
2014/10/27 17:18:25
nit: In general this CL doesn't use the proper sty
dmazzoni
2014/11/04 23:22:53
OK. Fixed for the parts of the code that this chan
| |
| 289 if (delegate_) | |
| 290 delegate_->AccessibilitySetValue(node.GetId(), value); | |
| 291 } | |
| 292 | |
| 287 void BrowserAccessibilityManager::SetTextSelection( | 293 void BrowserAccessibilityManager::SetTextSelection( |
| 288 const BrowserAccessibility& node, int start_offset, int end_offset) { | 294 const BrowserAccessibility& node, int start_offset, int end_offset) { |
| 289 if (delegate_) { | 295 if (delegate_) { |
| 290 delegate_->AccessibilitySetTextSelection( | 296 delegate_->AccessibilitySetTextSelection( |
| 291 node.GetId(), start_offset, end_offset); | 297 node.GetId(), start_offset, end_offset); |
| 292 } | 298 } |
| 293 } | 299 } |
| 294 | 300 |
| 295 gfx::Rect BrowserAccessibilityManager::GetViewBounds() { | 301 gfx::Rect BrowserAccessibilityManager::GetViewBounds() { |
| 296 if (delegate_) | 302 if (delegate_) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 ui::AXTreeUpdate BrowserAccessibilityManager::SnapshotAXTreeForTesting() { | 373 ui::AXTreeUpdate BrowserAccessibilityManager::SnapshotAXTreeForTesting() { |
| 368 scoped_ptr<ui::AXTreeSource<const ui::AXNode*> > tree_source( | 374 scoped_ptr<ui::AXTreeSource<const ui::AXNode*> > tree_source( |
| 369 tree_->CreateTreeSource()); | 375 tree_->CreateTreeSource()); |
| 370 ui::AXTreeSerializer<const ui::AXNode*> serializer(tree_source.get()); | 376 ui::AXTreeSerializer<const ui::AXNode*> serializer(tree_source.get()); |
| 371 ui::AXTreeUpdate update; | 377 ui::AXTreeUpdate update; |
| 372 serializer.SerializeChanges(tree_->GetRoot(), &update); | 378 serializer.SerializeChanges(tree_->GetRoot(), &update); |
| 373 return update; | 379 return update; |
| 374 } | 380 } |
| 375 | 381 |
| 376 } // namespace content | 382 } // namespace content |
| OLD | NEW |