| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 gfx::NativeView GetNativeView() const; | 357 gfx::NativeView GetNativeView() const; |
| 358 | 358 |
| 359 // Returns the gfx::NativeWindow associated with this Widget. This may return | 359 // Returns the gfx::NativeWindow associated with this Widget. This may return |
| 360 // NULL on some platforms if the widget was created with a type other than | 360 // NULL on some platforms if the widget was created with a type other than |
| 361 // TYPE_WINDOW or TYPE_PANEL. | 361 // TYPE_WINDOW or TYPE_PANEL. |
| 362 gfx::NativeWindow GetNativeWindow() const; | 362 gfx::NativeWindow GetNativeWindow() const; |
| 363 | 363 |
| 364 // Add/remove observer. | 364 // Add/remove observer. |
| 365 void AddObserver(WidgetObserver* observer); | 365 void AddObserver(WidgetObserver* observer); |
| 366 void RemoveObserver(WidgetObserver* observer); | 366 void RemoveObserver(WidgetObserver* observer); |
| 367 bool HasObserver(WidgetObserver* observer); | 367 bool HasObserver(const WidgetObserver* observer) const; |
| 368 | 368 |
| 369 // Add/remove removals observer. | 369 // Add/remove removals observer. |
| 370 void AddRemovalsObserver(WidgetRemovalsObserver* observer); | 370 void AddRemovalsObserver(WidgetRemovalsObserver* observer); |
| 371 void RemoveRemovalsObserver(WidgetRemovalsObserver* observer); | 371 void RemoveRemovalsObserver(WidgetRemovalsObserver* observer); |
| 372 bool HasRemovalsObserver(WidgetRemovalsObserver* observer); | 372 bool HasRemovalsObserver(const WidgetRemovalsObserver* observer) const; |
| 373 | 373 |
| 374 // Returns the accelerator given a command id. Returns false if there is | 374 // Returns the accelerator given a command id. Returns false if there is |
| 375 // no accelerator associated with a given id, which is a common condition. | 375 // no accelerator associated with a given id, which is a common condition. |
| 376 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator) const; | 376 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator) const; |
| 377 | 377 |
| 378 // Forwarded from the RootView so that the widget can do any cleanup. | 378 // Forwarded from the RootView so that the widget can do any cleanup. |
| 379 void ViewHierarchyChanged(const View::ViewHierarchyChangedDetails& details); | 379 void ViewHierarchyChanged(const View::ViewHierarchyChangedDetails& details); |
| 380 | 380 |
| 381 // Called right before changing the widget's parent NativeView to do any | 381 // Called right before changing the widget's parent NativeView to do any |
| 382 // cleanup. | 382 // cleanup. |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 bool movement_disabled_; | 973 bool movement_disabled_; |
| 974 | 974 |
| 975 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; | 975 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; |
| 976 | 976 |
| 977 DISALLOW_COPY_AND_ASSIGN(Widget); | 977 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 978 }; | 978 }; |
| 979 | 979 |
| 980 } // namespace views | 980 } // namespace views |
| 981 | 981 |
| 982 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 982 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |