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

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

Issue 8341098: Mac: Added a delay before panels go to minimized state from title-only state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr feedback Created 9 years, 2 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.h
diff --git a/chrome/browser/ui/panels/panel_manager.h b/chrome/browser/ui/panels/panel_manager.h
index b419c8f91116cf1955e58a794e86f0fa770af259..a782b3f0da2f50b1b8a57e3c2554c7fbc975fa87 100644
--- a/chrome/browser/ui/panels/panel_manager.h
+++ b/chrome/browser/ui/panels/panel_manager.h
@@ -101,6 +101,10 @@ class PanelManager : public PanelMouseWatcher::Observer,
SetWorkArea(work_area);
}
+ void reduce_delays_for_testing() {
+ reduced_delays_for_testing_ = true;
+ }
+
int minimized_panel_count() {
return minimized_panel_count_;
}
@@ -152,11 +156,6 @@ class PanelManager : public PanelMouseWatcher::Observer,
void DragLeft();
void DragRight();
- // Checks if the titlebars have been brought up or down. If not, do not wait
- // for the notifications to trigger it any more, and start to bring them up or
- // down immediately.
- void DelayedBringUpOrDownTitlebarsCheck();
-
// Does the real job of bringing up or down the titlebars.
void DoBringUpOrDownTitlebars(bool bring_up);
@@ -201,9 +200,13 @@ class PanelManager : public PanelMouseWatcher::Observer,
scoped_refptr<AutoHidingDesktopBar> auto_hiding_desktop_bar_;
+ // Delayed transitions support. Sometimes transitions between minimized and
+ // title-only states are delayed, for better usability with Taskbars/Docks.
TitlebarAction delayed_titlebar_action_;
-
+ bool reduced_delays_for_testing_;
+ static int s_last_task_index;
ScopedRunnableMethodFactory<PanelManager> method_factory_;
+ void DelayedBringUpOrDownTitlebarsCheck(int task_index);
jianli 2011/10/28 21:31:33 This method should stay with all other methods.
Dmitry Titov 2011/10/29 00:04:56 Done.
// Whether or not bounds will be updated when the preferred content size is
// changed. The testing code could set this flag to false so that other tests

Powered by Google App Engine
This is Rietveld 408576698