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

Unified Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 7242017: Support minimizing the panel into 3-pixel line on Windows. Also support bringing up/down the titl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/panels/panel_manager.cc
===================================================================
--- chrome/browser/ui/panels/panel_manager.cc (revision 90982)
+++ chrome/browser/ui/panels/panel_manager.cc (working copy)
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/window_sizer.h"
namespace {
@@ -270,6 +269,29 @@
DelayedRemove();
}
+bool PanelManager::ShouldBringUpTitleBarForAllMinimizedPanels(
jennb 2011/06/29 23:17:54 Rather than ask every panel if it should bring up
jianli 2011/06/30 01:28:33 I've thought about providing the iteration API but
+ int mouse_x, int mouse_y) const {
+ for (ActivePanels::const_iterator iter = active_panels_.begin();
+ iter != active_panels_.end(); ++iter) {
+ if ((*iter)->ShouldBringUpTitleBar(mouse_x, mouse_y))
+ return true;
+ }
+ return false;
+}
+
+void PanelManager::BringUpOrDownTitleBarForAllMinimizedPanels(bool bring_up) {
+ for (ActivePanels::const_iterator iter = active_panels_.begin();
+ iter != active_panels_.end(); ++iter) {
+ if (bring_up) {
+ if ((*iter)->expansion_state() == Panel::MINIMIZED)
+ (*iter)->SetExpansionState(Panel::TITLE_ONLY);
+ } else {
+ if ((*iter)->expansion_state() == Panel::TITLE_ONLY)
+ (*iter)->SetExpansionState(Panel::MINIMIZED);
+ }
+ }
+}
+
void PanelManager::Rearrange(ActivePanels::iterator iter_to_start) {
if (iter_to_start == active_panels_.end())
return;
@@ -318,20 +340,6 @@
return true;
}
-void PanelManager::MinimizeAll() {
- for (ActivePanels::const_iterator iter = active_panels_.begin();
- iter != active_panels_.end(); ++iter) {
- (*iter)->Minimize();
- }
-}
-
-void PanelManager::RestoreAll() {
- for (ActivePanels::const_iterator iter = active_panels_.begin();
- iter != active_panels_.end(); ++iter) {
- (*iter)->Restore();
- }
-}
-
void PanelManager::RemoveAllActive() {
// This should not be called when we're in the process of dragging.
DCHECK(dragging_panel_index_ == kInvalidPanelIndex);

Powered by Google App Engine
This is Rietveld 408576698