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" |
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 "chrome/browser/ui/panels/auto_hiding_desktop_bar.h" | 14 #include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h" |
14 #include "chrome/browser/ui/panels/panel.h" | 15 #include "chrome/browser/ui/panels/panel.h" |
15 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
16 | 17 |
17 // TODO(jennb): Clean up by removing functions below that cause this | 18 // TODO(jennb): Clean up by removing functions below that cause this |
18 // to be required. | 19 // to be required. |
19 #ifdef UNIT_TEST | 20 #ifdef UNIT_TEST |
20 #include "chrome/browser/ui/panels/panel_strip.h" | 21 #include "chrome/browser/ui/panels/panel_strip.h" |
21 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" | 22 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
22 #endif | 23 #endif |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 } | 94 } |
94 | 95 |
95 PanelMouseWatcher* mouse_watcher() const { | 96 PanelMouseWatcher* mouse_watcher() const { |
96 return panel_mouse_watcher_.get(); | 97 return panel_mouse_watcher_.get(); |
97 } | 98 } |
98 | 99 |
99 PanelStrip* panel_strip() const { | 100 PanelStrip* panel_strip() const { |
100 return panel_strip_.get(); | 101 return panel_strip_.get(); |
101 } | 102 } |
102 | 103 |
104 bool is_full_screen_mode_on() const { return is_full_screen_mode_on_; } | |
jianli
2011/12/02 00:04:45
nit: extra space.
prasadt
2011/12/02 00:29:39
Done.
| |
105 | |
103 #ifdef UNIT_TEST | 106 #ifdef UNIT_TEST |
104 static int horizontal_spacing() { return PanelStrip::horizontal_spacing(); } | 107 static int horizontal_spacing() { return PanelStrip::horizontal_spacing(); } |
105 | 108 |
106 const gfx::Rect& work_area() const { | 109 const gfx::Rect& work_area() const { |
107 return work_area_; | 110 return work_area_; |
108 } | 111 } |
109 | 112 |
110 void set_auto_hiding_desktop_bar( | 113 void set_auto_hiding_desktop_bar( |
111 AutoHidingDesktopBar* auto_hiding_desktop_bar) { | 114 AutoHidingDesktopBar* auto_hiding_desktop_bar) { |
112 auto_hiding_desktop_bar_ = auto_hiding_desktop_bar; | 115 auto_hiding_desktop_bar_ = auto_hiding_desktop_bar; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 // right of the screen edges) when they become fully visible. | 175 // right of the screen edges) when they become fully visible. |
173 gfx::Rect adjusted_work_area_; | 176 gfx::Rect adjusted_work_area_; |
174 | 177 |
175 scoped_refptr<AutoHidingDesktopBar> auto_hiding_desktop_bar_; | 178 scoped_refptr<AutoHidingDesktopBar> auto_hiding_desktop_bar_; |
176 | 179 |
177 // Whether or not bounds will be updated when the preferred content size is | 180 // Whether or not bounds will be updated when the preferred content size is |
178 // changed. The testing code could set this flag to false so that other tests | 181 // changed. The testing code could set this flag to false so that other tests |
179 // will not be affected. | 182 // will not be affected. |
180 bool auto_sizing_enabled_; | 183 bool auto_sizing_enabled_; |
181 | 184 |
185 // Timer used to track if the current active app is in full screen mode. | |
186 base::RepeatingTimer<PanelManager> full_screen_mode_timer_; | |
187 void CheckFullScreenMode(); | |
jianli
2011/12/02 00:04:45
nit: it'd better to move this declaration to the a
prasadt
2011/12/02 00:29:39
Done.
| |
188 bool is_full_screen_mode_on_; | |
189 | |
182 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 190 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
183 }; | 191 }; |
184 | 192 |
185 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 193 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
OLD | NEW |