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

Side by Side Diff: chrome/browser/ui/aura/accessibility/ax_tree_source_aura.cc

Issue 1407413002: Move some AX attrs from AXNodeData to AXTreeData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h" 5 #include "chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" 9 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
10 #include "content/public/browser/render_frame_host.h" 10 #include "content/public/browser/render_frame_host.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if (obj) 49 if (obj)
50 obj->SetSelection(start, end); 50 obj->SetSelection(start, end);
51 } 51 }
52 52
53 void AXTreeSourceAura::ShowContextMenu(int32 id) { 53 void AXTreeSourceAura::ShowContextMenu(int32 id) {
54 AXAuraObjWrapper* obj = AXAuraObjCache::GetInstance()->Get(id); 54 AXAuraObjWrapper* obj = AXAuraObjCache::GetInstance()->Get(id);
55 if (obj) 55 if (obj)
56 obj->ShowContextMenu(); 56 obj->ShowContextMenu();
57 } 57 }
58 58
59 ui::AXTreeData AXTreeSourceAura::GetTreeData() const {
60 ui::AXTreeData tree_data;
61 tree_data.tree_id = 0;
62 tree_data.loaded = true;
63 tree_data.loading_progress = 1.0;
64 return tree_data;
65 }
66
59 AXAuraObjWrapper* AXTreeSourceAura::GetRoot() const { 67 AXAuraObjWrapper* AXTreeSourceAura::GetRoot() const {
60 return root_.get(); 68 return root_.get();
61 } 69 }
62 70
63 AXAuraObjWrapper* AXTreeSourceAura::GetFromId(int32 id) const { 71 AXAuraObjWrapper* AXTreeSourceAura::GetFromId(int32 id) const {
64 if (id == root_->GetID()) 72 if (id == root_->GetID())
65 return root_.get(); 73 return root_.get();
66 return AXAuraObjCache::GetInstance()->Get(id); 74 return AXAuraObjCache::GetInstance()->Get(id);
67 } 75 }
68 76
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 131
124 std::vector<AXAuraObjWrapper*> children; 132 std::vector<AXAuraObjWrapper*> children;
125 root->GetChildren(&children); 133 root->GetChildren(&children);
126 134
127 prefix += prefix[0]; 135 prefix += prefix[0];
128 for (size_t i = 0; i < children.size(); ++i) 136 for (size_t i = 0; i < children.size(); ++i)
129 output += ToString(children[i], prefix); 137 output += ToString(children[i], prefix);
130 138
131 return output; 139 return output;
132 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698