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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_win.cc

Issue 1705853002: NOT FOR REVIEW. ax tree focus with debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash Created 4 years, 10 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 (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_win.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // if they're not successful this time. 166 // if they're not successful this time.
167 focus_event_on_root_needed_ = true; 167 focus_event_on_root_needed_ = true;
168 168
169 if (!NativeViewHasFocus()) { 169 if (!NativeViewHasFocus()) {
170 inside_on_window_focused_ = false; 170 inside_on_window_focused_ = false;
171 return; 171 return;
172 } 172 }
173 173
174 // Try to fire a focus event on the root first and then the focused node. 174 // Try to fire a focus event on the root first and then the focused node.
175 // This will clear focus_event_on_root_needed_ if successful. 175 // This will clear focus_event_on_root_needed_ if successful.
176 if (focus_ != tree_->root() && GetRoot()) 176 if (GetFocus() != GetRoot() && GetRoot())
177 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, GetRoot()); 177 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, GetRoot());
178 BrowserAccessibilityManager::OnWindowFocused(); 178 BrowserAccessibilityManager::OnWindowFocused();
179 inside_on_window_focused_ = false; 179 inside_on_window_focused_ = false;
180 } 180 }
181 181
182 void BrowserAccessibilityManagerWin::UserIsReloading() { 182 void BrowserAccessibilityManagerWin::UserIsReloading() {
183 if (GetRoot()) 183 if (GetRoot())
184 MaybeCallNotifyWinEvent(IA2_EVENT_DOCUMENT_RELOAD, GetRoot()); 184 MaybeCallNotifyWinEvent(IA2_EVENT_DOCUMENT_RELOAD, GetRoot());
185 } 185 }
186 186
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 BrowserAccessibilityWin* BrowserAccessibilityManagerWin::GetFromUniqueIdWin( 405 BrowserAccessibilityWin* BrowserAccessibilityManagerWin::GetFromUniqueIdWin(
406 LONG unique_id_win) { 406 LONG unique_id_win) {
407 auto iter = g_unique_id_map.Get().find(unique_id_win); 407 auto iter = g_unique_id_map.Get().find(unique_id_win);
408 if (iter == g_unique_id_map.Get().end()) 408 if (iter == g_unique_id_map.Get().end())
409 return nullptr; 409 return nullptr;
410 410
411 return iter->second->ToBrowserAccessibilityWin(); 411 return iter->second->ToBrowserAccessibilityWin();
412 } 412 }
413 413
414 } // namespace content 414 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698