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

Side by Side Diff: chrome/browser/ui/ash/accessibility/automation_manager_ash.cc

Issue 667713006: Implement automatic load of composed/embedded automation trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years, 1 month 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/ash/accessibility/automation_manager_ash.h" 5 #include "chrome/browser/ui/ash/accessibility/automation_manager_ash.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 25 matching lines...) Expand all
36 // Reset the serializer to save memory. 36 // Reset the serializer to save memory.
37 current_tree_serializer_->Reset(); 37 current_tree_serializer_->Reset();
38 } 38 }
39 39
40 void AutomationManagerAsh::HandleEvent(BrowserContext* context, 40 void AutomationManagerAsh::HandleEvent(BrowserContext* context,
41 views::View* view, 41 views::View* view,
42 ui::AXEvent event_type) { 42 ui::AXEvent event_type) {
43 if (!enabled_) { 43 if (!enabled_) {
44 return; 44 return;
45 } 45 }
46 46 current_tree_serializer_->Reset();
dmazzoni 2014/10/29 06:53:30 Why is this needed?
47 // TODO(dtseng): Events should only be delivered to extensions with the 47 // TODO(dtseng): Events should only be delivered to extensions with the
48 // desktop permission. 48 // desktop permission.
49 views::Widget* widget = view->GetWidget(); 49 views::Widget* widget = view->GetWidget();
50 if (!widget) 50 if (!widget)
51 return; 51 return;
52 52
53 if (!context && g_browser_process->profile_manager()) { 53 if (!context && g_browser_process->profile_manager()) {
54 context = g_browser_process->profile_manager()->GetLastUsedProfile(); 54 context = g_browser_process->profile_manager()->GetLastUsedProfile();
55 } 55 }
56 if (!context) { 56 if (!context) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 update.nodes, 107 update.nodes,
108 event_type, 108 event_type,
109 aura_obj->GetID(), 109 aura_obj->GetID(),
110 0, /* process_id */ 110 0, /* process_id */
111 0 /* routing_id */); 111 0 /* routing_id */);
112 std::vector<content::AXEventNotificationDetails> details; 112 std::vector<content::AXEventNotificationDetails> details;
113 details.push_back(detail); 113 details.push_back(detail);
114 extensions::automation_util::DispatchAccessibilityEventsToAutomation( 114 extensions::automation_util::DispatchAccessibilityEventsToAutomation(
115 details, context, gfx::Vector2d()); 115 details, context, gfx::Vector2d());
116 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698