| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 gfx::NativeView parent, | 278 gfx::NativeView parent, |
| 279 const gfx::Rect& bounds); | 279 const gfx::Rect& bounds); |
| 280 | 280 |
| 281 // Creates a decorated window Widget in the same desktop context as |context|. | 281 // Creates a decorated window Widget in the same desktop context as |context|. |
| 282 static Widget* CreateWindowWithContext(WidgetDelegate* delegate, | 282 static Widget* CreateWindowWithContext(WidgetDelegate* delegate, |
| 283 gfx::NativeView context); | 283 gfx::NativeView context); |
| 284 static Widget* CreateWindowWithContextAndBounds(WidgetDelegate* delegate, | 284 static Widget* CreateWindowWithContextAndBounds(WidgetDelegate* delegate, |
| 285 gfx::NativeView context, | 285 gfx::NativeView context, |
| 286 const gfx::Rect& bounds); | 286 const gfx::Rect& bounds); |
| 287 | 287 |
| 288 // Creates an undecorated child window Widget parented to |parent|. | |
| 289 static Widget* CreateWindowAsFramelessChild(WidgetDelegate* widget_delegate, | |
| 290 gfx::NativeView parent); | |
| 291 | |
| 292 // Closes all Widgets that aren't identified as "secondary widgets". Called | 288 // Closes all Widgets that aren't identified as "secondary widgets". Called |
| 293 // during application shutdown when the last non-secondary widget is closed. | 289 // during application shutdown when the last non-secondary widget is closed. |
| 294 static void CloseAllSecondaryWidgets(); | 290 static void CloseAllSecondaryWidgets(); |
| 295 | 291 |
| 296 // Converts a rectangle from one Widget's coordinate system to another's. | 292 // Converts a rectangle from one Widget's coordinate system to another's. |
| 297 // Returns false if the conversion couldn't be made, because either these two | 293 // Returns false if the conversion couldn't be made, because either these two |
| 298 // Widgets do not have a common ancestor or they are not on the screen yet. | 294 // Widgets do not have a common ancestor or they are not on the screen yet. |
| 299 // The value of |*rect| won't be changed when false is returned. | 295 // The value of |*rect| won't be changed when false is returned. |
| 300 static bool ConvertRect(const Widget* source, | 296 static bool ConvertRect(const Widget* source, |
| 301 const Widget* target, | 297 const Widget* target, |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 bool movement_disabled_; | 928 bool movement_disabled_; |
| 933 | 929 |
| 934 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; | 930 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; |
| 935 | 931 |
| 936 DISALLOW_COPY_AND_ASSIGN(Widget); | 932 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 937 }; | 933 }; |
| 938 | 934 |
| 939 } // namespace views | 935 } // namespace views |
| 940 | 936 |
| 941 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 937 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |