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_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" |
(...skipping 12 matching lines...) Expand all Loading... | |
23 #endif | 23 #endif |
24 | 24 |
25 class Browser; | 25 class Browser; |
26 class PanelMouseWatcher; | 26 class PanelMouseWatcher; |
27 class PanelOverflowStrip; | 27 class PanelOverflowStrip; |
28 class PanelStrip; | 28 class PanelStrip; |
29 | 29 |
30 // This class manages a set of panels. | 30 // This class manages a set of panels. |
31 class PanelManager : public AutoHidingDesktopBar::Observer { | 31 class PanelManager : public AutoHidingDesktopBar::Observer { |
32 public: | 32 public: |
33 typedef std::vector<Panel*> Panels; | 33 typedef std::vector<Panel*> Panels; |
jennb
2011/12/08 23:52:00
Can remove typedef now.
jianli
2011/12/09 22:39:07
Done.
| |
34 | 34 |
35 // Returns a single instance. | 35 // Returns a single instance. |
36 static PanelManager* GetInstance(); | 36 static PanelManager* GetInstance(); |
37 | 37 |
38 // Called when the display is changed, i.e. work area is updated. | 38 // Called when the display is changed, i.e. work area is updated. |
39 void OnDisplayChanged(); | 39 void OnDisplayChanged(); |
40 | 40 |
41 // Creates a panel and returns it. The panel might be queued for display | 41 // Creates a panel and returns it. The panel might be queued for display |
42 // later. | 42 // later. |
43 Panel* CreatePanel(Browser* browser); | 43 Panel* CreatePanel(Browser* browser); |
(...skipping 26 matching lines...) Expand all Loading... | |
70 void BringUpOrDownTitlebars(bool bring_up); | 70 void BringUpOrDownTitlebars(bool bring_up); |
71 | 71 |
72 // Returns the next browser window which could be either panel window or | 72 // Returns the next browser window which could be either panel window or |
73 // tabbed window, to switch to if the given panel is going to be deactivated. | 73 // tabbed window, to switch to if the given panel is going to be deactivated. |
74 // Returns NULL if such window cannot be found. | 74 // Returns NULL if such window cannot be found. |
75 BrowserWindow* GetNextBrowserWindowToActivate(Panel* panel) const; | 75 BrowserWindow* GetNextBrowserWindowToActivate(Panel* panel) const; |
76 | 76 |
77 int num_panels() const; | 77 int num_panels() const; |
78 bool is_dragging_panel() const; | 78 bool is_dragging_panel() const; |
79 int StartingRightPosition() const; | 79 int StartingRightPosition() const; |
80 const Panels& panels() const; | 80 std::vector<Panel*> panels() const; |
81 | 81 |
82 AutoHidingDesktopBar* auto_hiding_desktop_bar() const { | 82 AutoHidingDesktopBar* auto_hiding_desktop_bar() const { |
83 return auto_hiding_desktop_bar_; | 83 return auto_hiding_desktop_bar_; |
84 } | 84 } |
85 | 85 |
86 PanelMouseWatcher* mouse_watcher() const { | 86 PanelMouseWatcher* mouse_watcher() const { |
87 return panel_mouse_watcher_.get(); | 87 return panel_mouse_watcher_.get(); |
88 } | 88 } |
89 | 89 |
90 PanelStrip* panel_strip() const { | 90 PanelStrip* panel_strip() const { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 // Timer used to track if the current active app is in full screen mode. | 182 // Timer used to track if the current active app is in full screen mode. |
183 base::RepeatingTimer<PanelManager> full_screen_mode_timer_; | 183 base::RepeatingTimer<PanelManager> full_screen_mode_timer_; |
184 | 184 |
185 // True if current active app is in full screen mode. | 185 // True if current active app is in full screen mode. |
186 bool is_full_screen_; | 186 bool is_full_screen_; |
187 | 187 |
188 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 188 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
189 }; | 189 }; |
190 | 190 |
191 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 191 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
OLD | NEW |