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

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

Issue 1438513003: [MD] Implement incognito colors as a NativeTheme (for Aura). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: init param, pkasting feedback Created 5 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
« no previous file with comments | « ui/native_theme/native_theme_win.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 ui::WindowShowState show_state; 233 ui::WindowShowState show_state;
234 gfx::NativeView parent; 234 gfx::NativeView parent;
235 // Specifies the initial bounds of the Widget. Default is empty, which means 235 // Specifies the initial bounds of the Widget. Default is empty, which means
236 // the NativeWidget may specify a default size. If the parent is specified, 236 // the NativeWidget may specify a default size. If the parent is specified,
237 // |bounds| is in the parent's coordinate system. If the parent is not 237 // |bounds| is in the parent's coordinate system. If the parent is not
238 // specified, it's in screen's global coordinate system. 238 // specified, it's in screen's global coordinate system.
239 gfx::Rect bounds; 239 gfx::Rect bounds;
240 // When set, this value is used as the Widget's NativeWidget implementation. 240 // When set, this value is used as the Widget's NativeWidget implementation.
241 // The Widget will not construct a default one. Default is NULL. 241 // The Widget will not construct a default one. Default is NULL.
242 NativeWidget* native_widget; 242 NativeWidget* native_widget;
243 // If provided, sets the native theme for this widget.
244 ui::NativeTheme* native_theme;
243 // Aura-only. Provides a DesktopWindowTreeHost implementation to use instead 245 // Aura-only. Provides a DesktopWindowTreeHost implementation to use instead
244 // of the default one. 246 // of the default one.
245 // TODO(beng): Figure out if there's a better way to expose this, e.g. get 247 // TODO(beng): Figure out if there's a better way to expose this, e.g. get
246 // rid of NW subclasses and do this all via message handling. 248 // rid of NW subclasses and do this all via message handling.
247 DesktopWindowTreeHost* desktop_window_tree_host; 249 DesktopWindowTreeHost* desktop_window_tree_host;
248 // Only used by NativeWidgetAura. Specifies the type of layer for the 250 // Only used by NativeWidgetAura. Specifies the type of layer for the
249 // aura::Window. Default is ui::LAYER_TEXTURED. 251 // aura::Window. Default is ui::LAYER_TEXTURED.
250 ui::LayerType layer_type; 252 ui::LayerType layer_type;
251 // Only used by Aura. Provides a context window whose RootWindow is 253 // Only used by Aura. Provides a context window whose RootWindow is
252 // consulted during widget creation to determine where in the Window 254 // consulted during widget creation to determine where in the Window
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 // Sizes and positions the frameless window just after it is created. 854 // Sizes and positions the frameless window just after it is created.
853 void SetInitialBoundsForFramelessWindow(const gfx::Rect& bounds); 855 void SetInitialBoundsForFramelessWindow(const gfx::Rect& bounds);
854 856
855 // Returns the bounds and "show" state from the delegate. Returns true if 857 // Returns the bounds and "show" state from the delegate. Returns true if
856 // the delegate wants to use a specified bounds. 858 // the delegate wants to use a specified bounds.
857 bool GetSavedWindowPlacement(gfx::Rect* bounds, 859 bool GetSavedWindowPlacement(gfx::Rect* bounds,
858 ui::WindowShowState* show_state); 860 ui::WindowShowState* show_state);
859 861
860 internal::NativeWidgetPrivate* native_widget_; 862 internal::NativeWidgetPrivate* native_widget_;
861 863
864 // If non-null, the native theme for this widget. Otherwise the native theme
865 // comes from |native_widget_|.
866 ui::NativeTheme* native_theme_;
867
862 base::ObserverList<WidgetObserver> observers_; 868 base::ObserverList<WidgetObserver> observers_;
863 869
864 base::ObserverList<WidgetRemovalsObserver> removals_observers_; 870 base::ObserverList<WidgetRemovalsObserver> removals_observers_;
865 871
866 // Non-owned pointer to the Widget's delegate. If a NULL delegate is supplied 872 // Non-owned pointer to the Widget's delegate. If a NULL delegate is supplied
867 // to Init() a default WidgetDelegate is created. 873 // to Init() a default WidgetDelegate is created.
868 WidgetDelegate* widget_delegate_; 874 WidgetDelegate* widget_delegate_;
869 875
870 // The root of the View hierarchy attached to this window. 876 // The root of the View hierarchy attached to this window.
871 // WARNING: see warning in tooltip_manager_ for ordering dependencies with 877 // WARNING: see warning in tooltip_manager_ for ordering dependencies with
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 bool movement_disabled_; 965 bool movement_disabled_;
960 966
961 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 967 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
962 968
963 DISALLOW_COPY_AND_ASSIGN(Widget); 969 DISALLOW_COPY_AND_ASSIGN(Widget);
964 }; 970 };
965 971
966 } // namespace views 972 } // namespace views
967 973
968 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 974 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_win.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698