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

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

Issue 10173035: Add key modifier on minimize/restore button click to minimize/restore all Panels for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed IsActive checks from new test Created 8 years, 7 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_DOCKED_PANEL_STRIP_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_STRIP_H_
6 #define CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_STRIP_H_ 6 #define CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_STRIP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual panel::Resizability GetPanelResizability( 53 virtual panel::Resizability GetPanelResizability(
54 const Panel* panel) const OVERRIDE; 54 const Panel* panel) const OVERRIDE;
55 virtual void OnPanelResizedByMouse(Panel* panel, 55 virtual void OnPanelResizedByMouse(Panel* panel,
56 const gfx::Rect& new_bounds) OVERRIDE; 56 const gfx::Rect& new_bounds) OVERRIDE;
57 virtual void OnPanelAttentionStateChanged(Panel* panel) OVERRIDE; 57 virtual void OnPanelAttentionStateChanged(Panel* panel) OVERRIDE;
58 virtual void OnPanelTitlebarClicked(Panel* panel, 58 virtual void OnPanelTitlebarClicked(Panel* panel,
59 panel::ClickModifier modifier) OVERRIDE; 59 panel::ClickModifier modifier) OVERRIDE;
60 virtual void ActivatePanel(Panel* panel) OVERRIDE; 60 virtual void ActivatePanel(Panel* panel) OVERRIDE;
61 virtual void MinimizePanel(Panel* panel) OVERRIDE; 61 virtual void MinimizePanel(Panel* panel) OVERRIDE;
62 virtual void RestorePanel(Panel* panel) OVERRIDE; 62 virtual void RestorePanel(Panel* panel) OVERRIDE;
63 virtual void MinimizeAll() OVERRIDE;
64 virtual void RestoreAll() OVERRIDE;
63 virtual bool CanMinimizePanel(const Panel* panel) const OVERRIDE; 65 virtual bool CanMinimizePanel(const Panel* panel) const OVERRIDE;
64 virtual bool IsPanelMinimized(const Panel* panel) const OVERRIDE; 66 virtual bool IsPanelMinimized(const Panel* panel) const OVERRIDE;
65 virtual void SavePanelPlacement(Panel* panel) OVERRIDE; 67 virtual void SavePanelPlacement(Panel* panel) OVERRIDE;
66 virtual void RestorePanelToSavedPlacement() OVERRIDE; 68 virtual void RestorePanelToSavedPlacement() OVERRIDE;
67 virtual void DiscardSavedPanelPlacement() OVERRIDE; 69 virtual void DiscardSavedPanelPlacement() OVERRIDE;
68 virtual void StartDraggingPanelWithinStrip(Panel* panel) OVERRIDE; 70 virtual void StartDraggingPanelWithinStrip(Panel* panel) OVERRIDE;
69 virtual void DragPanelWithinStrip(Panel* panel, 71 virtual void DragPanelWithinStrip(Panel* panel,
70 int delta_x, 72 int delta_x,
71 int delta_y) OVERRIDE; 73 int delta_y) OVERRIDE;
72 virtual void EndDraggingPanelWithinStrip(Panel* panel, 74 virtual void EndDraggingPanelWithinStrip(Panel* panel,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 151
150 // Keep track of the minimized panels to control mouse watching. 152 // Keep track of the minimized panels to control mouse watching.
151 void UpdateMinimizedPanelCount(); 153 void UpdateMinimizedPanelCount();
152 154
153 // Makes sure the panel's bounds reflect its expansion state and the 155 // Makes sure the panel's bounds reflect its expansion state and the
154 // panel is aligned at the bottom of the strip. Does not touch the x 156 // panel is aligned at the bottom of the strip. Does not touch the x
155 // coordinate. 157 // coordinate.
156 void AdjustPanelBoundsPerExpansionState(Panel* panel, 158 void AdjustPanelBoundsPerExpansionState(Panel* panel,
157 gfx::Rect* panel_bounds); 159 gfx::Rect* panel_bounds);
158 160
159 // Minimizes/Restores all panels in the strip depending on the current
160 // state of |panel|.
161 void ToggleMinimizeAll(Panel* panel);
162
163 // Help functions to drag the given panel. 161 // Help functions to drag the given panel.
164 void DragLeft(Panel* dragging_panel); 162 void DragLeft(Panel* dragging_panel);
165 void DragRight(Panel* dragging_panel); 163 void DragRight(Panel* dragging_panel);
166 164
167 // Does the real job of bringing up or down the titlebars. 165 // Does the real job of bringing up or down the titlebars.
168 void DoBringUpOrDownTitlebars(bool bring_up); 166 void DoBringUpOrDownTitlebars(bool bring_up);
169 // The callback for a delyed task, checks if it still need to perform 167 // The callback for a delyed task, checks if it still need to perform
170 // the delayed action. 168 // the delayed action.
171 void DelayedBringUpOrDownTitlebarsCheck(); 169 void DelayedBringUpOrDownTitlebarsCheck();
172 170
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Absolute minimum width and height for panels, including non-client area. 204 // Absolute minimum width and height for panels, including non-client area.
207 // Should only be big enough to accomodate a close button on the reasonably 205 // Should only be big enough to accomodate a close button on the reasonably
208 // recognisable titlebar. 206 // recognisable titlebar.
209 static const int kPanelMinWidth; 207 static const int kPanelMinWidth;
210 static const int kPanelMinHeight; 208 static const int kPanelMinHeight;
211 209
212 DISALLOW_COPY_AND_ASSIGN(DockedPanelStrip); 210 DISALLOW_COPY_AND_ASSIGN(DockedPanelStrip);
213 }; 211 };
214 212
215 #endif // CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_STRIP_H_ 213 #endif // CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_STRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/detached_panel_strip.cc ('k') | chrome/browser/ui/panels/docked_panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698