| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // Only called by PanelManager. | 214 // Only called by PanelManager. |
| 215 bool initialized() const { return initialized_; } | 215 bool initialized() const { return initialized_; } |
| 216 void Initialize(const gfx::Rect& bounds); | 216 void Initialize(const gfx::Rect& bounds); |
| 217 | 217 |
| 218 // This is different from BrowserWindow::SetBounds(): | 218 // This is different from BrowserWindow::SetBounds(): |
| 219 // * SetPanelBounds() is only called by PanelManager to manage its position. | 219 // * SetPanelBounds() is only called by PanelManager to manage its position. |
| 220 // * SetBounds() is called by the API to try to change the bounds, which is | 220 // * SetBounds() is called by the API to try to change the bounds, which is |
| 221 // not allowed for Panel. | 221 // not allowed for Panel. |
| 222 void SetPanelBounds(const gfx::Rect& bounds); | 222 void SetPanelBounds(const gfx::Rect& bounds); |
| 223 | 223 |
| 224 // Updates the panel bounds instantly without any animation. |
| 225 void SetPanelBoundsInstantly(const gfx::Rect& bounds); |
| 226 |
| 224 // Sets whether the panel will auto resize according to its content. | 227 // Sets whether the panel will auto resize according to its content. |
| 225 void SetAutoResizable(bool resizable); | 228 void SetAutoResizable(bool resizable); |
| 226 | 229 |
| 227 // Sets minimum and maximum size for the panel. | 230 // Sets minimum and maximum size for the panel. |
| 228 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); | 231 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); |
| 229 | 232 |
| 230 protected: | 233 protected: |
| 231 virtual void DestroyBrowser() OVERRIDE; | 234 virtual void DestroyBrowser() OVERRIDE; |
| 232 | 235 |
| 233 private: | 236 private: |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 NativePanel* native_panel_; // Weak, owns us. | 281 NativePanel* native_panel_; // Weak, owns us. |
| 279 | 282 |
| 280 ExpansionState expansion_state_; | 283 ExpansionState expansion_state_; |
| 281 | 284 |
| 282 content::NotificationRegistrar registrar_; | 285 content::NotificationRegistrar registrar_; |
| 283 | 286 |
| 284 DISALLOW_COPY_AND_ASSIGN(Panel); | 287 DISALLOW_COPY_AND_ASSIGN(Panel); |
| 285 }; | 288 }; |
| 286 | 289 |
| 287 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 290 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| OLD | NEW |