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

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

Issue 9547007: Fix handling of minimized panel count (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 void OnFullScreenModeChanged(bool is_full_screen); 94 void OnFullScreenModeChanged(bool is_full_screen);
95 95
96 // Returns |true| if panel can fit in the dock strip. 96 // Returns |true| if panel can fit in the dock strip.
97 bool CanFitPanel(const Panel* panel) const; 97 bool CanFitPanel(const Panel* panel) const;
98 98
99 #ifdef UNIT_TEST 99 #ifdef UNIT_TEST
100 int num_temporary_layout_panels() const { 100 int num_temporary_layout_panels() const {
101 return panels_in_temporary_layout_.size(); 101 return panels_in_temporary_layout_.size();
102 } 102 }
103
104 int minimized_panel_count() { return minimized_panel_count_; }
jianli 2012/03/12 18:08:56 nit: add const modifier.
103 #endif 105 #endif
104 106
105 private: 107 private:
106 enum TitlebarAction { 108 enum TitlebarAction {
107 NO_ACTION, 109 NO_ACTION,
108 BRING_UP, 110 BRING_UP,
109 BRING_DOWN 111 BRING_DOWN
110 }; 112 };
111 113
112 // Overridden from PanelMouseWatcherObserver: 114 // Overridden from PanelMouseWatcherObserver:
113 virtual void OnMouseMove(const gfx::Point& mouse_position) OVERRIDE; 115 virtual void OnMouseMove(const gfx::Point& mouse_position) OVERRIDE;
114 116
115 // Keep track of the minimized panels to control mouse watching. 117 // Keep track of the minimized panels to control mouse watching.
116 void IncrementMinimizedPanels(); 118 void UpdateMinimizedPanelCount();
117 void DecrementMinimizedPanels();
118 119
119 // Help functions to drag the given panel. 120 // Help functions to drag the given panel.
120 void DragLeft(Panel* dragging_panel); 121 void DragLeft(Panel* dragging_panel);
121 void DragRight(Panel* dragging_panel); 122 void DragRight(Panel* dragging_panel);
122 123
123 // Does the real job of bringing up or down the titlebars. 124 // Does the real job of bringing up or down the titlebars.
124 void DoBringUpOrDownTitlebars(bool bring_up); 125 void DoBringUpOrDownTitlebars(bool bring_up);
125 // The callback for a delyed task, checks if it still need to perform 126 // The callback for a delyed task, checks if it still need to perform
126 // the delayed action. 127 // the delayed action.
127 void DelayedBringUpOrDownTitlebarsCheck(); 128 void DelayedBringUpOrDownTitlebarsCheck();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Absolute minimum width and height for panels, including non-client area. 178 // Absolute minimum width and height for panels, including non-client area.
178 // Should only be big enough to accomodate a close button on the reasonably 179 // Should only be big enough to accomodate a close button on the reasonably
179 // recognisable titlebar. 180 // recognisable titlebar.
180 static const int kPanelMinWidth; 181 static const int kPanelMinWidth;
181 static const int kPanelMinHeight; 182 static const int kPanelMinHeight;
182 183
183 DISALLOW_COPY_AND_ASSIGN(DockedPanelStrip); 184 DISALLOW_COPY_AND_ASSIGN(DockedPanelStrip);
184 }; 185 };
185 186
186 #endif // CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_STRIP_H_ 187 #endif // CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_STRIP_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('j') | chrome/browser/ui/panels/docked_panel_strip.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698