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

Side by Side Diff: ui/views/widget/widget.h

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: Merged GetAllChildWidgets and GetAllOwnedWidgets 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 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 static Widget* GetWidgetForNativeView(gfx::NativeView native_view); 306 static Widget* GetWidgetForNativeView(gfx::NativeView native_view);
307 static Widget* GetWidgetForNativeWindow(gfx::NativeWindow native_window); 307 static Widget* GetWidgetForNativeWindow(gfx::NativeWindow native_window);
308 308
309 // Retrieves the top level widget in a native view hierarchy 309 // Retrieves the top level widget in a native view hierarchy
310 // starting at |native_view|. Top level widget is a widget with TYPE_WINDOW, 310 // starting at |native_view|. Top level widget is a widget with TYPE_WINDOW,
311 // TYPE_PANEL, TYPE_WINDOW_FRAMELESS, POPUP or MENU and has its own 311 // TYPE_PANEL, TYPE_WINDOW_FRAMELESS, POPUP or MENU and has its own
312 // focus manager. This may be itself if the |native_view| is top level, 312 // focus manager. This may be itself if the |native_view| is top level,
313 // or NULL if there is no toplevel in a native view hierarchy. 313 // or NULL if there is no toplevel in a native view hierarchy.
314 static Widget* GetTopLevelWidgetForNativeView(gfx::NativeView native_view); 314 static Widget* GetTopLevelWidgetForNativeView(gfx::NativeView native_view);
315 315
316 // Returns all Widgets in |native_view|'s hierarchy, including itself if 316 // Returns all owned and child Widgets in |native_view|'s hierarchy, including
317 // it is one. 317 // itself if it is one.
318 static void GetAllChildWidgets(gfx::NativeView native_view, 318 static void GetAllChildAndOwnedWidgets(gfx::NativeView native_view,
319 Widgets* children); 319 Widgets* widgets);
320
321 // Returns all non-child Widgets owned by |native_view|.
322 static void GetAllOwnedWidgets(gfx::NativeView native_view,
323 Widgets* owned);
324 320
325 // Re-parent a NativeView and notify all Widgets in |native_view|'s hierarchy 321 // Re-parent a NativeView and notify all Widgets in |native_view|'s hierarchy
326 // of the change. 322 // of the change.
327 static void ReparentNativeView(gfx::NativeView native_view, 323 static void ReparentNativeView(gfx::NativeView native_view,
328 gfx::NativeView new_parent); 324 gfx::NativeView new_parent);
329 325
330 // Returns the preferred size of the contents view of this window based on 326 // Returns the preferred size of the contents view of this window based on
331 // its localized size data. The width in cols is held in a localized string 327 // its localized size data. The width in cols is held in a localized string
332 // resource identified by |col_resource_id|, the height in the same fashion. 328 // resource identified by |col_resource_id|, the height in the same fashion.
333 // TODO(beng): This should eventually live somewhere else, probably closer to 329 // TODO(beng): This should eventually live somewhere else, probably closer to
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 bool movement_disabled_; 941 bool movement_disabled_;
946 942
947 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 943 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
948 944
949 DISALLOW_COPY_AND_ASSIGN(Widget); 945 DISALLOW_COPY_AND_ASSIGN(Widget);
950 }; 946 };
951 947
952 } // namespace views 948 } // namespace views
953 949
954 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 950 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698