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

Side by Side Diff: ui/views/accessibility/native_view_accessibility_auralinux.cc

Issue 1089003003: Pass a TaskRunner through ViewsDelegate to put AX init on FILE thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment about FILE thread Created 5 years, 7 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 | « ui/accessibility/platform/ax_platform_node_auralinux.cc ('k') | ui/views/views_delegate.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/views/accessibility/native_view_accessibility_auralinux.h" 5 #include "ui/views/accessibility/native_view_accessibility_auralinux.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 AuraLinuxApplication() 119 AuraLinuxApplication()
120 : platform_node_(ui::AXPlatformNode::Create(this)) { 120 : platform_node_(ui::AXPlatformNode::Create(this)) {
121 data_.role = ui::AX_ROLE_APPLICATION; 121 data_.role = ui::AX_ROLE_APPLICATION;
122 if (ViewsDelegate::views_delegate) { 122 if (ViewsDelegate::views_delegate) {
123 data_.AddStringAttribute( 123 data_.AddStringAttribute(
124 ui::AX_ATTR_NAME, 124 ui::AX_ATTR_NAME,
125 ViewsDelegate::views_delegate->GetApplicationName()); 125 ViewsDelegate::views_delegate->GetApplicationName());
126 } 126 }
127 ui::AXPlatformNodeAuraLinux::SetApplication(platform_node_); 127 ui::AXPlatformNodeAuraLinux::SetApplication(platform_node_);
128 if (ViewsDelegate::views_delegate) {
129 scoped_refptr<base::TaskRunner> init_task_runner =
130 ViewsDelegate::views_delegate->
131 GetTaskRunnerForAuraLinuxAccessibilityInit();
132 if (init_task_runner)
133 ui::AXPlatformNodeAuraLinux::StaticInitialize(init_task_runner);
134 }
128 } 135 }
129 136
130 ~AuraLinuxApplication() override { 137 ~AuraLinuxApplication() override {
131 platform_node_->Destroy(); 138 platform_node_->Destroy();
132 platform_node_ = nullptr; 139 platform_node_ = nullptr;
133 } 140 }
134 141
135 ui::AXPlatformNode* platform_node_; 142 ui::AXPlatformNode* platform_node_;
136 ui::AXNodeData data_; 143 ui::AXNodeData data_;
137 std::vector<Widget*> widgets_; 144 std::vector<Widget*> widgets_;
(...skipping 17 matching lines...) Expand all
155 } 162 }
156 163
157 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() { 164 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() {
158 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent(); 165 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent();
159 if (!parent) 166 if (!parent)
160 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible(); 167 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible();
161 return parent; 168 return parent;
162 } 169 }
163 170
164 } // namespace views 171 } // namespace views
OLDNEW
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_auralinux.cc ('k') | ui/views/views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698