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

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

Issue 2640503002: Disable next compatibility mode for ChromeVox on dev channel (Closed)
Patch Set: m Created 3 years, 11 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_root_obj_wrapper.h" 5 #include "chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/common/channel_info.h"
8 #include "ui/accessibility/ax_node_data.h" 9 #include "ui/accessibility/ax_node_data.h"
9 #include "ui/accessibility/ax_node_data.h" 10 #include "ui/accessibility/ax_node_data.h"
10 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
11 #include "ui/views/accessibility/ax_aura_obj_cache.h" 12 #include "ui/views/accessibility/ax_aura_obj_cache.h"
12 #include "ui/views/accessibility/ax_window_obj_wrapper.h" 13 #include "ui/views/accessibility/ax_window_obj_wrapper.h"
13 14
14 AXRootObjWrapper::AXRootObjWrapper(int32_t id) 15 AXRootObjWrapper::AXRootObjWrapper(int32_t id)
15 : id_(id), alert_window_(new aura::Window(NULL)) { 16 : id_(id), alert_window_(new aura::Window(NULL)) {
16 alert_window_->Init(ui::LAYER_NOT_DRAWN); 17 alert_window_->Init(ui::LAYER_NOT_DRAWN);
17 } 18 }
(...skipping 28 matching lines...) Expand all
46 void AXRootObjWrapper::GetChildren( 47 void AXRootObjWrapper::GetChildren(
47 std::vector<views::AXAuraObjWrapper*>* out_children) { 48 std::vector<views::AXAuraObjWrapper*>* out_children) {
48 views::AXAuraObjCache::GetInstance()->GetTopLevelWindows(out_children); 49 views::AXAuraObjCache::GetInstance()->GetTopLevelWindows(out_children);
49 out_children->push_back( 50 out_children->push_back(
50 views::AXAuraObjCache::GetInstance()->GetOrCreate(alert_window_)); 51 views::AXAuraObjCache::GetInstance()->GetOrCreate(alert_window_));
51 } 52 }
52 53
53 void AXRootObjWrapper::Serialize(ui::AXNodeData* out_node_data) { 54 void AXRootObjWrapper::Serialize(ui::AXNodeData* out_node_data) {
54 out_node_data->id = id_; 55 out_node_data->id = id_;
55 out_node_data->role = ui::AX_ROLE_DESKTOP; 56 out_node_data->role = ui::AX_ROLE_DESKTOP;
56 // TODO(dtseng): Apply a richer set of states.
57 out_node_data->state = 0; 57 out_node_data->state = 0;
58 out_node_data->AddStringAttribute(ui::AX_ATTR_CHROME_CHANNEL,
59 chrome::GetChannelString());
58 } 60 }
59 61
60 int32_t AXRootObjWrapper::GetID() { 62 int32_t AXRootObjWrapper::GetID() {
61 return id_; 63 return id_;
62 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698