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

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

Issue 11416251: Desktop aura: Continue threading context through views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix erroneously removed line from NWWin tests. Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_unittest.cc ('k') | ui/views/widget/widget_unittest.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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 WIDGET_OWNS_NATIVE_WIDGET 138 WIDGET_OWNS_NATIVE_WIDGET
139 }; 139 };
140 140
141 InitParams(); 141 InitParams();
142 explicit InitParams(Type type); 142 explicit InitParams(Type type);
143 143
144 // If |parent_widget| is non-null, its native view is returned, otherwise 144 // If |parent_widget| is non-null, its native view is returned, otherwise
145 // |parent| is returned. 145 // |parent| is returned.
146 gfx::NativeView GetParent() const; 146 gfx::NativeView GetParent() const;
147 147
148 // Will return the first of the following that isn't NULL: the native view,
149 // |parent|, |context|.
150 gfx::NativeView GetContext() const;
151
148 Type type; 152 Type type;
149 // If NULL, a default implementation will be constructed. 153 // If NULL, a default implementation will be constructed.
150 WidgetDelegate* delegate; 154 WidgetDelegate* delegate;
151 bool child; 155 bool child;
152 bool transient; 156 bool transient;
153 // If true, the widget may be fully or partially transparent. If false, 157 // If true, the widget may be fully or partially transparent. If false,
154 // we can perform optimizations based on the widget being fully opaque. 158 // we can perform optimizations based on the widget being fully opaque.
155 // For window widgets, defaults to ViewsDelegate::UseTransparentWindows(). 159 // For window widgets, defaults to ViewsDelegate::UseTransparentWindows().
156 // Defaults to false for non-window widgets. 160 // Defaults to false for non-window widgets.
157 bool transparent; 161 bool transparent;
(...skipping 26 matching lines...) Expand all
184 NativeWidget* native_widget; 188 NativeWidget* native_widget;
185 // Aura-only. Provides a DesktopRootWindowHost implementation to use instead 189 // Aura-only. Provides a DesktopRootWindowHost implementation to use instead
186 // of the default one. 190 // of the default one.
187 // TODO(beng): Figure out if there's a better way to expose this, e.g. get 191 // TODO(beng): Figure out if there's a better way to expose this, e.g. get
188 // rid of NW subclasses and do this all via message handling. 192 // rid of NW subclasses and do this all via message handling.
189 DesktopRootWindowHost* desktop_root_window_host; 193 DesktopRootWindowHost* desktop_root_window_host;
190 bool top_level; 194 bool top_level;
191 // Only used by NativeWidgetAura. Specifies the type of layer for the 195 // Only used by NativeWidgetAura. Specifies the type of layer for the
192 // aura::Window. Default is LAYER_TEXTURED. 196 // aura::Window. Default is LAYER_TEXTURED.
193 ui::LayerType layer_type; 197 ui::LayerType layer_type;
194 // Only used by Aura. Provides additional context (generally a RootWindow) 198 // Only used by Aura. Provides a context window whose RootWindow we be
195 // during creation to allow the widget to determine which desktop type it 199 // consulted during widget creation to determine where in the Window
196 // will belong to. NULL is not allowed if you are using aura. 200 // hierarchy this widget should be placed. (This is separate from |parent|;
201 // if you pass a RootWindow to |parent|, your window will be parented to
202 // |parent|. If you pass a RootWindow to |context|, we ask that RootWindow
203 // where it wants your window placed.) NULL is not allowed if you are using
204 // aura.
197 gfx::NativeView context; 205 gfx::NativeView context;
198 }; 206 };
199 207
200 Widget(); 208 Widget();
201 virtual ~Widget(); 209 virtual ~Widget();
202 210
203 // Creates a decorated window Widget with the specified properties. 211 // Creates a decorated window Widget with the specified properties.
204 static Widget* CreateWindow(WidgetDelegate* delegate); 212 static Widget* CreateWindow(WidgetDelegate* delegate);
205 static Widget* CreateWindowWithParent(WidgetDelegate* delegate, 213 static Widget* CreateWindowWithParent(WidgetDelegate* delegate,
206 gfx::NativeWindow parent); 214 gfx::NativeWindow parent);
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 819
812 // Is |root_layers_| out of date? 820 // Is |root_layers_| out of date?
813 bool root_layers_dirty_; 821 bool root_layers_dirty_;
814 822
815 DISALLOW_COPY_AND_ASSIGN(Widget); 823 DISALLOW_COPY_AND_ASSIGN(Widget);
816 }; 824 };
817 825
818 } // namespace views 826 } // namespace views
819 827
820 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 828 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_unittest.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698