| 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_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
| 6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 virtual std::string GetWindowName() const; | 97 virtual std::string GetWindowName() const; |
| 98 | 98 |
| 99 // Saves the window's bounds and "show" state. By default this uses the | 99 // Saves the window's bounds and "show" state. By default this uses the |
| 100 // process' local state keyed by window name (See GetWindowName above). This | 100 // process' local state keyed by window name (See GetWindowName above). This |
| 101 // behavior can be overridden to provide additional functionality. | 101 // behavior can be overridden to provide additional functionality. |
| 102 virtual void SaveWindowPlacement(const gfx::Rect& bounds, | 102 virtual void SaveWindowPlacement(const gfx::Rect& bounds, |
| 103 ui::WindowShowState show_state); | 103 ui::WindowShowState show_state); |
| 104 | 104 |
| 105 // Retrieves the window's bounds and "show" states. | 105 // Retrieves the window's bounds and "show" states. |
| 106 // This behavior can be overridden to provide additional functionality. | 106 // This behavior can be overridden to provide additional functionality. |
| 107 virtual bool GetSavedWindowPlacement(gfx::Rect* bounds, | 107 virtual bool GetSavedWindowPlacement(const Widget* widget, |
| 108 gfx::Rect* bounds, |
| 108 ui::WindowShowState* show_state) const; | 109 ui::WindowShowState* show_state) const; |
| 109 | 110 |
| 110 // Returns true if the window's size should be restored. If this is false, | 111 // Returns true if the window's size should be restored. If this is false, |
| 111 // only the window's origin is restored and the window is given its | 112 // only the window's origin is restored and the window is given its |
| 112 // preferred size. | 113 // preferred size. |
| 113 // Default is true. | 114 // Default is true. |
| 114 virtual bool ShouldRestoreWindowSize() const; | 115 virtual bool ShouldRestoreWindowSize() const; |
| 115 | 116 |
| 116 // Called when the window closes. The delegate MUST NOT delete itself during | 117 // Called when the window closes. The delegate MUST NOT delete itself during |
| 117 // this call, since it can be called afterwards. See DeleteDelegate(). | 118 // this call, since it can be called afterwards. See DeleteDelegate(). |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 virtual Widget* GetWidget() OVERRIDE; | 198 virtual Widget* GetWidget() OVERRIDE; |
| 198 virtual const Widget* GetWidget() const OVERRIDE; | 199 virtual const Widget* GetWidget() const OVERRIDE; |
| 199 | 200 |
| 200 private: | 201 private: |
| 201 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); | 202 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); |
| 202 }; | 203 }; |
| 203 | 204 |
| 204 } // namespace views | 205 } // namespace views |
| 205 | 206 |
| 206 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 207 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
| OLD | NEW |