| 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 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 void OnWindowSizeAvailable(); | 214 void OnWindowSizeAvailable(); |
| 215 | 215 |
| 216 // Asynchronous completion of panel close request. | 216 // Asynchronous completion of panel close request. |
| 217 void OnNativePanelClosed(); | 217 void OnNativePanelClosed(); |
| 218 | 218 |
| 219 NativePanel* native_panel() { return native_panel_; } | 219 NativePanel* native_panel() { return native_panel_; } |
| 220 Browser* browser() const { return browser_; } | 220 Browser* browser() const { return browser_; } |
| 221 | 221 |
| 222 // May be NULL if panel is newly created and has not been positioned yet. | 222 // May be NULL if panel is newly created and has not been positioned yet. |
| 223 PanelStrip* panel_strip() const { return panel_strip_; } | 223 PanelStrip* panel_strip() const { return panel_strip_; } |
| 224 void set_panel_strip(PanelStrip* panel_strip) { panel_strip_ = panel_strip; } |
| 224 | 225 |
| 225 // Moves the panel to the |new_strip|, removing the panel from its | 226 // Moves the panel to the |new_strip|, removing the panel from its |
| 226 // current strip. | 227 // current strip. |
| 227 void MoveToStrip(PanelStrip* new_strip); | 228 void MoveToStrip(PanelStrip* new_strip); |
| 228 | 229 |
| 229 ExpansionState expansion_state() const { return expansion_state_; } | 230 ExpansionState expansion_state() const { return expansion_state_; } |
| 230 ExpansionState old_expansion_state() const { return old_expansion_state_; } | 231 ExpansionState old_expansion_state() const { return old_expansion_state_; } |
| 231 const gfx::Size& min_size() const { return min_size_; } | 232 const gfx::Size& min_size() const { return min_size_; } |
| 232 const gfx::Size& max_size() const { return max_size_; } | 233 const gfx::Size& max_size() const { return max_size_; } |
| 233 bool auto_resizable() const { return auto_resizable_; } | 234 bool auto_resizable() const { return auto_resizable_; } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 254 | 255 |
| 255 // Sets whether the panel will auto resize according to its content. | 256 // Sets whether the panel will auto resize according to its content. |
| 256 void SetAutoResizable(bool resizable); | 257 void SetAutoResizable(bool resizable); |
| 257 | 258 |
| 258 // Sets minimum and maximum size for the panel. | 259 // Sets minimum and maximum size for the panel. |
| 259 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); | 260 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); |
| 260 | 261 |
| 261 // Sets whether the panel app icon is visible in the taskbar. | 262 // Sets whether the panel app icon is visible in the taskbar. |
| 262 void SetAppIconVisibility(bool visible); | 263 void SetAppIconVisibility(bool visible); |
| 263 | 264 |
| 265 // Sets whether the panel window is always on top. |
| 266 void SetAlwaysOnTop(bool on_top); |
| 267 |
| 264 // Newly created panels may be placed in a temporary layout until their | 268 // Newly created panels may be placed in a temporary layout until their |
| 265 // final position is determined. | 269 // final position is determined. |
| 266 bool has_temporary_layout() const { return has_temporary_layout_; } | 270 bool has_temporary_layout() const { return has_temporary_layout_; } |
| 267 void set_has_temporary_layout(bool temporary) { | 271 void set_has_temporary_layout(bool temporary) { |
| 268 has_temporary_layout_ = temporary; | 272 has_temporary_layout_ = temporary; |
| 269 } | 273 } |
| 270 | 274 |
| 271 protected: | 275 protected: |
| 272 virtual void DestroyBrowser() OVERRIDE; | 276 virtual void DestroyBrowser() OVERRIDE; |
| 273 | 277 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // True if this panel auto resizes based on content. | 318 // True if this panel auto resizes based on content. |
| 315 bool auto_resizable_; | 319 bool auto_resizable_; |
| 316 | 320 |
| 317 // Platform specifc implementation for panels. It'd be one of | 321 // Platform specifc implementation for panels. It'd be one of |
| 318 // PanelBrowserWindowGtk/PanelBrowserView/PanelBrowserWindowCocoa. | 322 // PanelBrowserWindowGtk/PanelBrowserView/PanelBrowserWindowCocoa. |
| 319 NativePanel* native_panel_; // Weak, owns us. | 323 NativePanel* native_panel_; // Weak, owns us. |
| 320 | 324 |
| 321 ExpansionState expansion_state_; | 325 ExpansionState expansion_state_; |
| 322 ExpansionState old_expansion_state_; | 326 ExpansionState old_expansion_state_; |
| 323 | 327 |
| 324 // Indicates whether the panel app icon is visible in the taskbar. | |
| 325 bool app_icon_visible_; | |
| 326 | |
| 327 content::NotificationRegistrar registrar_; | 328 content::NotificationRegistrar registrar_; |
| 328 | 329 |
| 329 DISALLOW_COPY_AND_ASSIGN(Panel); | 330 DISALLOW_COPY_AND_ASSIGN(Panel); |
| 330 }; | 331 }; |
| 331 | 332 |
| 332 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 333 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| OLD | NEW |