| 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/timer.h" | 13 #include "base/timer.h" |
| 14 #include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h" | 14 #include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h" |
| 15 #include "chrome/browser/ui/panels/panel.h" | 15 #include "chrome/browser/ui/panels/panel.h" |
| 16 #include "chrome/browser/ui/panels/panel_strip.h" |
| 16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 17 | 18 |
| 18 class Browser; | 19 class Browser; |
| 19 class DetachedPanelStrip; | 20 class DetachedPanelStrip; |
| 20 class DockedPanelStrip; | 21 class DockedPanelStrip; |
| 21 class OverflowPanelStrip; | 22 class OverflowPanelStrip; |
| 22 class PanelDragController; | 23 class PanelDragController; |
| 23 class PanelMouseWatcher; | 24 class PanelMouseWatcher; |
| 24 | 25 |
| 25 // This class manages a set of panels. | 26 // This class manages a set of panels. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 54 | 55 |
| 55 // Invoked when the preferred window size of the given panel might need to | 56 // Invoked when the preferred window size of the given panel might need to |
| 56 // get changed. | 57 // get changed. |
| 57 void OnPreferredWindowSizeChanged( | 58 void OnPreferredWindowSizeChanged( |
| 58 Panel* panel, const gfx::Size& preferred_window_size); | 59 Panel* panel, const gfx::Size& preferred_window_size); |
| 59 | 60 |
| 60 // Resizes the panel. Explicitly setting the panel size is not allowed | 61 // Resizes the panel. Explicitly setting the panel size is not allowed |
| 61 // for panels that are auto-sized. | 62 // for panels that are auto-sized. |
| 62 void ResizePanel(Panel* panel, const gfx::Size& new_size); | 63 void ResizePanel(Panel* panel, const gfx::Size& new_size); |
| 63 | 64 |
| 65 // Changes the panel's layout to a different type of panel strip. |
| 66 void ChangePanelLayout(Panel* panel, PanelStrip::Type new_layout); |
| 67 |
| 64 // Returns true if we should bring up the titlebars, given the current mouse | 68 // Returns true if we should bring up the titlebars, given the current mouse |
| 65 // point. | 69 // point. |
| 66 bool ShouldBringUpTitlebars(int mouse_x, int mouse_y) const; | 70 bool ShouldBringUpTitlebars(int mouse_x, int mouse_y) const; |
| 67 | 71 |
| 68 // Brings up or down the titlebars for all minimized panels. | 72 // Brings up or down the titlebars for all minimized panels. |
| 69 void BringUpOrDownTitlebars(bool bring_up); | 73 void BringUpOrDownTitlebars(bool bring_up); |
| 70 | 74 |
| 71 // Returns the next browser window which could be either panel window or | 75 // Returns the next browser window which could be either panel window or |
| 72 // tabbed window, to switch to if the given panel is going to be deactivated. | 76 // tabbed window, to switch to if the given panel is going to be deactivated. |
| 73 // Returns NULL if such window cannot be found. | 77 // Returns NULL if such window cannot be found. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // Timer used to track if the current active app is in full screen mode. | 207 // Timer used to track if the current active app is in full screen mode. |
| 204 base::RepeatingTimer<PanelManager> full_screen_mode_timer_; | 208 base::RepeatingTimer<PanelManager> full_screen_mode_timer_; |
| 205 | 209 |
| 206 // True if current active app is in full screen mode. | 210 // True if current active app is in full screen mode. |
| 207 bool is_full_screen_; | 211 bool is_full_screen_; |
| 208 | 212 |
| 209 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 213 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
| 210 }; | 214 }; |
| 211 | 215 |
| 212 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 216 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
| OLD | NEW |