Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 // if you pass a RootWindow to |parent|, your window will be parented to | 200 // if you pass a RootWindow to |parent|, your window will be parented to |
| 201 // |parent|. If you pass a RootWindow to |context|, we ask that RootWindow | 201 // |parent|. If you pass a RootWindow to |context|, we ask that RootWindow |
| 202 // where it wants your window placed.) NULL is not allowed if you are using | 202 // where it wants your window placed.) NULL is not allowed if you are using |
| 203 // aura. | 203 // aura. |
| 204 gfx::NativeView context; | 204 gfx::NativeView context; |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 Widget(); | 207 Widget(); |
| 208 virtual ~Widget(); | 208 virtual ~Widget(); |
| 209 | 209 |
| 210 // Creates a toplevel window with no context. These methods should only be | |
| 211 // used in cases where there is no contextual information because we're | |
| 212 // creating a toplevel window connected to no other event. | |
| 213 // | |
| 214 // If you have any parenting or context information, or can pass that | |
| 215 // information, prefer the WithParent or WithContext versions of these | |
| 216 // methods. | |
| 217 static Widget* CreateWindow(WidgetDelegate* delegate); | |
|
Ben Goodger (Google)
2013/01/09 17:30:22
you need to align the function order in the .cc to
| |
| 218 static Widget* CreateWindowWithBounds(WidgetDelegate* delegate, | |
| 219 const gfx::Rect& bounds); | |
| 220 | |
| 210 // Creates a decorated window Widget with the specified properties. | 221 // Creates a decorated window Widget with the specified properties. |
| 211 static Widget* CreateWindow(WidgetDelegate* delegate); | |
| 212 static Widget* CreateWindowWithParent(WidgetDelegate* delegate, | 222 static Widget* CreateWindowWithParent(WidgetDelegate* delegate, |
| 213 gfx::NativeWindow parent); | 223 gfx::NativeWindow parent); |
| 214 static Widget* CreateWindowWithBounds(WidgetDelegate* delegate, | |
| 215 const gfx::Rect& bounds); | |
| 216 static Widget* CreateWindowWithParentAndBounds(WidgetDelegate* delegate, | 224 static Widget* CreateWindowWithParentAndBounds(WidgetDelegate* delegate, |
| 217 gfx::NativeWindow parent, | 225 gfx::NativeWindow parent, |
| 218 const gfx::Rect& bounds); | 226 const gfx::Rect& bounds); |
| 219 | 227 |
| 220 // Creates a decorated window Widget in the same desktop context as | 228 // Creates a decorated window Widget in the same desktop context as |
| 221 // |context|. | 229 // |context|. |
| 222 static Widget* CreateWindowWithContext(WidgetDelegate* delegate, | 230 static Widget* CreateWindowWithContext(WidgetDelegate* delegate, |
| 223 gfx::NativeView context); | 231 gfx::NativeView context); |
| 224 static Widget* CreateWindowWithContextAndBounds(WidgetDelegate* delegate, | 232 static Widget* CreateWindowWithContextAndBounds(WidgetDelegate* delegate, |
| 225 gfx::NativeView context, | 233 gfx::NativeView context, |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 827 | 835 |
| 828 // Is |root_layers_| out of date? | 836 // Is |root_layers_| out of date? |
| 829 bool root_layers_dirty_; | 837 bool root_layers_dirty_; |
| 830 | 838 |
| 831 DISALLOW_COPY_AND_ASSIGN(Widget); | 839 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 832 }; | 840 }; |
| 833 | 841 |
| 834 } // namespace views | 842 } // namespace views |
| 835 | 843 |
| 836 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 844 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |