| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_PANELS_PANEL_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 | 10 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // Only called by PanelManager. | 211 // Only called by PanelManager. |
| 212 bool initialized() const { return initialized_; } | 212 bool initialized() const { return initialized_; } |
| 213 void Initialize(const gfx::Rect& bounds); | 213 void Initialize(const gfx::Rect& bounds); |
| 214 | 214 |
| 215 // This is different from BrowserWindow::SetBounds(): | 215 // This is different from BrowserWindow::SetBounds(): |
| 216 // * SetPanelBounds() is only called by PanelManager to manage its position. | 216 // * SetPanelBounds() is only called by PanelManager to manage its position. |
| 217 // * SetBounds() is called by the API to try to change the bounds, which is | 217 // * SetBounds() is called by the API to try to change the bounds, which is |
| 218 // not allowed for Panel. | 218 // not allowed for Panel. |
| 219 void SetPanelBounds(const gfx::Rect& bounds); | 219 void SetPanelBounds(const gfx::Rect& bounds); |
| 220 | 220 |
| 221 // Updates the panel bounds instantly without any animation. |
| 222 void SetPanelBoundsInstantly(const gfx::Rect& bounds); |
| 223 |
| 221 // Sets whether the panel will auto resize according to its content. | 224 // Sets whether the panel will auto resize according to its content. |
| 222 void SetAutoResizable(bool resizable); | 225 void SetAutoResizable(bool resizable); |
| 223 | 226 |
| 224 // Sets minimum and maximum size for the panel. | 227 // Sets minimum and maximum size for the panel. |
| 225 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); | 228 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); |
| 226 | 229 |
| 227 protected: | 230 protected: |
| 228 virtual void DestroyBrowser() OVERRIDE; | 231 virtual void DestroyBrowser() OVERRIDE; |
| 229 | 232 |
| 230 private: | 233 private: |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 NativePanel* native_panel_; // Weak, owns us. | 278 NativePanel* native_panel_; // Weak, owns us. |
| 276 | 279 |
| 277 ExpansionState expansion_state_; | 280 ExpansionState expansion_state_; |
| 278 | 281 |
| 279 content::NotificationRegistrar registrar_; | 282 content::NotificationRegistrar registrar_; |
| 280 | 283 |
| 281 DISALLOW_COPY_AND_ASSIGN(Panel); | 284 DISALLOW_COPY_AND_ASSIGN(Panel); |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 287 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| OLD | NEW |