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

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: Minor fix 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 (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);
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 DCHECK_NE(widget, child_widget);
1500 continue;
1501 1499
1502 if (!child_widget->IsVisible()) 1500 if (!child_widget->IsVisible())
1503 continue; 1501 continue;
1504 1502
1505 if (widget->GetNativeWindowProperty(kWidgetNativeViewHostKey)) 1503 if (widget->GetNativeWindowProperty(kWidgetNativeViewHostKey))
1506 continue; 1504 continue;
1507 1505
1508 result_child_widgets->push_back(child_widget); 1506 result_child_widgets->push_back(child_widget);
1509 } 1507 }
1510 } 1508 }
(...skipping 20 matching lines...) Expand all
1531 if (view == NULL || view == view_) { 1529 if (view == NULL || view == view_) {
1532 alert_target_view_storage_ids_.erase( 1530 alert_target_view_storage_ids_.erase(
1533 alert_target_view_storage_ids_.begin() + i); 1531 alert_target_view_storage_ids_.begin() + i);
1534 } else { 1532 } else {
1535 ++i; 1533 ++i;
1536 } 1534 }
1537 } 1535 }
1538 } 1536 }
1539 1537
1540 } // namespace views 1538 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_views_browsertest.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698