Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: chrome/browser/ui/panels/panel_manager.h

Issue 9560002: Cleanup to keep panel from manipulating its panel strip assignment directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unneeded includes Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
jianli 2012/03/02 00:11:41 The name ChangePanelLayout seems to get easily con
jennb 2012/03/02 01:26:32 I was trying to avoid Strip in the name, but oh we
67
68 // Moves as many panels from overflow back to the dock as space allows.
69 void MovePanelsOutOfOverflowIfCanFit();
70
64 // Returns true if we should bring up the titlebars, given the current mouse 71 // Returns true if we should bring up the titlebars, given the current mouse
65 // point. 72 // point.
66 bool ShouldBringUpTitlebars(int mouse_x, int mouse_y) const; 73 bool ShouldBringUpTitlebars(int mouse_x, int mouse_y) const;
67 74
68 // Brings up or down the titlebars for all minimized panels. 75 // Brings up or down the titlebars for all minimized panels.
69 void BringUpOrDownTitlebars(bool bring_up); 76 void BringUpOrDownTitlebars(bool bring_up);
70 77
71 // Returns the next browser window which could be either panel window or 78 // 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. 79 // tabbed window, to switch to if the given panel is going to be deactivated.
73 // Returns NULL if such window cannot be found. 80 // Returns NULL if such window cannot be found.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // Timer used to track if the current active app is in full screen mode. 210 // Timer used to track if the current active app is in full screen mode.
204 base::RepeatingTimer<PanelManager> full_screen_mode_timer_; 211 base::RepeatingTimer<PanelManager> full_screen_mode_timer_;
205 212
206 // True if current active app is in full screen mode. 213 // True if current active app is in full screen mode.
207 bool is_full_screen_; 214 bool is_full_screen_;
208 215
209 DISALLOW_COPY_AND_ASSIGN(PanelManager); 216 DISALLOW_COPY_AND_ASSIGN(PanelManager);
210 }; 217 };
211 218
212 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ 219 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698