OLD | NEW |
---|---|
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 "chrome/browser/ui/views/accessibility/accessibility_event_router_views .h" | 5 #include "chrome/browser/ui/views/accessibility/accessibility_event_router_views .h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
584 std::string result = RecursiveGetStaticText(child); | 584 std::string result = RecursiveGetStaticText(child); |
585 if (!result.empty()) | 585 if (!result.empty()) |
586 return result; | 586 return result; |
587 } | 587 } |
588 return std::string(); | 588 return std::string(); |
589 } | 589 } |
590 | 590 |
591 // static | 591 // static |
592 views::View* AccessibilityEventRouterViews::FindFirstAccessibleAncestor( | 592 views::View* AccessibilityEventRouterViews::FindFirstAccessibleAncestor( |
593 views::View* view) { | 593 views::View* view) { |
594 while (view->parent() && !view->IsAccessibilityFocusable()) { | 594 views::View* temp_view = view; |
595 view = view->parent(); | 595 while (temp_view->parent() && !temp_view->IsAccessibilityFocusable()) { |
596 temp_view = temp_view->parent(); | |
596 } | 597 } |
sky
2014/07/25 20:14:26
nit: no {} here.
evy
2014/07/25 20:55:31
Done.
| |
597 return view; | 598 if (temp_view->IsAccessibilityFocusable()) |
599 return temp_view; | |
600 else | |
sky
2014/07/25 20:14:26
nit: no else here, see style guide.
evy
2014/07/25 20:55:31
Done.
| |
601 return view; | |
598 } | 602 } |
OLD | NEW |