| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // a) it does not go on top when some app enters full screen mode. | 72 // a) it does not go on top when some app enters full screen mode. |
| 73 // b) it remains on top when an app exits full screen mode. | 73 // b) it remains on top when an app exits full screen mode. |
| 74 void FullScreenModeChanged(bool is_full_screen); | 74 void FullScreenModeChanged(bool is_full_screen); |
| 75 | 75 |
| 76 // Ensures that the panel is fully visible, that is, not obscured by other | 76 // Ensures that the panel is fully visible, that is, not obscured by other |
| 77 // top-most windows. | 77 // top-most windows. |
| 78 void EnsureFullyVisible(); | 78 void EnsureFullyVisible(); |
| 79 | 79 |
| 80 int TitleOnlyHeight() const; | 80 int TitleOnlyHeight() const; |
| 81 | 81 |
| 82 // Returns the size of the panel when it is iconified, as shown on the | |
| 83 // overflow area. | |
| 84 gfx::Size IconOnlySize() const; | |
| 85 | |
| 86 // Returns true if the panel can be minimized or restored, depending on the | 82 // Returns true if the panel can be minimized or restored, depending on the |
| 87 // strip the panel is in. | 83 // strip the panel is in. |
| 88 bool CanMinimize() const; | 84 bool CanMinimize() const; |
| 89 bool CanRestore() const; | 85 bool CanRestore() const; |
| 90 | 86 |
| 91 // BrowserWindow overrides. | 87 // BrowserWindow overrides. |
| 92 virtual void Show() OVERRIDE; | 88 virtual void Show() OVERRIDE; |
| 93 virtual void ShowInactive() OVERRIDE; | 89 virtual void ShowInactive() OVERRIDE; |
| 94 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 90 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 95 virtual void Close() OVERRIDE; | 91 virtual void Close() OVERRIDE; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 void SetPreviewMode(bool in_preview_mode); | 293 void SetPreviewMode(bool in_preview_mode); |
| 298 | 294 |
| 299 // Sets up the panel for being resizable by the user - for example, | 295 // Sets up the panel for being resizable by the user - for example, |
| 300 // enables the resize mouse cursors when mouse is hovering over the edges. | 296 // enables the resize mouse cursors when mouse is hovering over the edges. |
| 301 void EnableResizeByMouse(bool enable); | 297 void EnableResizeByMouse(bool enable); |
| 302 | 298 |
| 303 // Changes the preferred size to acceptable based on min_size() and max_size() | 299 // Changes the preferred size to acceptable based on min_size() and max_size() |
| 304 void ClampSize(gfx::Size* size) const; | 300 void ClampSize(gfx::Size* size) const; |
| 305 | 301 |
| 306 // Called when the panel's active state changes. | 302 // Called when the panel's active state changes. |
| 307 void OnActiveStateChanged(); | 303 // |active| is true if panel became active. |
| 304 void OnActiveStateChanged(bool active); |
| 308 | 305 |
| 309 protected: | 306 protected: |
| 310 virtual void DestroyBrowser() OVERRIDE; | 307 virtual void DestroyBrowser() OVERRIDE; |
| 311 | 308 |
| 312 private: | 309 private: |
| 313 friend class PanelManager; | 310 friend class PanelManager; |
| 314 friend class PanelBrowserTest; | 311 friend class PanelBrowserTest; |
| 315 FRIEND_TEST_ALL_PREFIXES(PanelBrowserTest, RestoredBounds); | 312 FRIEND_TEST_ALL_PREFIXES(PanelBrowserTest, RestoredBounds); |
| 316 | 313 |
| 317 // Panel can only be created using PanelManager::CreatePanel(). | 314 // Panel can only be created using PanelManager::CreatePanel(). |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 AttentionMode attention_mode_; | 361 AttentionMode attention_mode_; |
| 365 | 362 |
| 366 ExpansionState expansion_state_; | 363 ExpansionState expansion_state_; |
| 367 | 364 |
| 368 content::NotificationRegistrar registrar_; | 365 content::NotificationRegistrar registrar_; |
| 369 | 366 |
| 370 DISALLOW_COPY_AND_ASSIGN(Panel); | 367 DISALLOW_COPY_AND_ASSIGN(Panel); |
| 371 }; | 368 }; |
| 372 | 369 |
| 373 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 370 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| OLD | NEW |