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

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

Issue 588113002: Change Widget::GetAllOwnedWidgets to return child widgets as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aid_resilient_to_uninstall_and_profile_changes
Patch Set: Update NativeViewAccessibilityWin Created 6 years, 2 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 "ui/views/accessibility/native_view_accessibility_win.h" 5 #include "ui/views/accessibility/native_view_accessibility_win.h"
6 6
7 #include <oleacc.h> 7 #include <oleacc.h>
8 #include <UIAutomationClient.h> 8 #include <UIAutomationClient.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 text, line_breaks, boundary, start_offset, direction); 1484 text, line_breaks, boundary, start_offset, direction);
1485 } 1485 }
1486 1486
1487 void NativeViewAccessibilityWin::PopulateChildWidgetVector( 1487 void NativeViewAccessibilityWin::PopulateChildWidgetVector(
1488 std::vector<Widget*>* result_child_widgets) { 1488 std::vector<Widget*>* result_child_widgets) {
1489 const Widget* widget = view()->GetWidget(); 1489 const Widget* widget = view()->GetWidget();
1490 if (!widget) 1490 if (!widget)
1491 return; 1491 return;
1492 1492
1493 std::set<Widget*> child_widgets; 1493 std::set<Widget*> child_widgets;
1494 Widget::GetAllChildWidgets(widget->GetNativeView(), &child_widgets);
sashab 2014/10/20 03:03:01 Originally, this function was taking the concatena
1495 Widget::GetAllOwnedWidgets(widget->GetNativeView(), &child_widgets); 1494 Widget::GetAllOwnedWidgets(widget->GetNativeView(), &child_widgets);
1496 for (std::set<Widget*>::const_iterator iter = child_widgets.begin(); 1495 for (std::set<Widget*>::const_iterator iter = child_widgets.begin();
1497 iter != child_widgets.end(); ++iter) { 1496 iter != child_widgets.end(); ++iter) {
1498 Widget* child_widget = *iter; 1497 Widget* child_widget = *iter;
1499 if (child_widget == widget) 1498 if (child_widget == widget)
sashab 2014/10/20 03:03:01 ... their own widget is ignored anyway. Leaving th
tapted 2014/10/20 04:40:05 If it's just for clarity, something like DCHECK_N
sashab 2014/10/20 05:15:34 Good idea; done.
1500 continue; 1499 continue;
1501 1500
1502 if (!child_widget->IsVisible()) 1501 if (!child_widget->IsVisible())
1503 continue; 1502 continue;
1504 1503
1505 if (widget->GetNativeWindowProperty(kWidgetNativeViewHostKey)) 1504 if (widget->GetNativeWindowProperty(kWidgetNativeViewHostKey))
1506 continue; 1505 continue;
1507 1506
1508 result_child_widgets->push_back(child_widget); 1507 result_child_widgets->push_back(child_widget);
1509 } 1508 }
(...skipping 21 matching lines...) Expand all
1531 if (view == NULL || view == view_) { 1530 if (view == NULL || view == view_) {
1532 alert_target_view_storage_ids_.erase( 1531 alert_target_view_storage_ids_.erase(
1533 alert_target_view_storage_ids_.begin() + i); 1532 alert_target_view_storage_ids_.begin() + i);
1534 } else { 1533 } else {
1535 ++i; 1534 ++i;
1536 } 1535 }
1537 } 1536 }
1538 } 1537 }
1539 1538
1540 } // namespace views 1539 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698