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

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: more 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..5481e91e6d3b62d11b2b66905d957a84c6425471 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 remove_delays_for_testing() {
+ remove_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);
@@ -164,6 +163,8 @@ class PanelManager : public PanelMouseWatcher::Observer,
int GetMaxPanelHeight() const;
int GetRightMostAvailablePosition() const;
+ void DelayedBringUpOrDownTitlebarsCheck();
jennb 2011/10/29 00:16:51 If old comment is no longer correct, could you put
Dmitry Titov 2011/10/29 00:41:58 Done.
+
Panels panels_;
// Stores the panels that are pending to remove. We want to delay the removal
@@ -201,8 +202,11 @@ 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 remove_delays_for_testing_;
+ CancelableTask* bring_up_down_task_; // Owned by MessageLoop after posting.
jianli 2011/10/29 00:19:18 For consistency, perhaps we can rename it somethin
Dmitry Titov 2011/10/29 00:41:58 Done.
ScopedRunnableMethodFactory<PanelManager> method_factory_;
jianli 2011/10/29 00:19:18 Seems that this is not needed any more. Also, do
Dmitry Titov 2011/10/29 00:41:58 Removed factory and refcounting. Added DISABLE_RUN
// Whether or not bounds will be updated when the preferred content size is
@@ -223,4 +227,6 @@ class PanelManager : public PanelMouseWatcher::Observer,
DISALLOW_COPY_AND_ASSIGN(PanelManager);
};
+DISABLE_RUNNABLE_METHOD_REFCOUNT(PanelManager);
jennb 2011/10/29 00:16:51 Could you add comment explaining why we need this?
Dmitry Titov 2011/10/29 00:41:58 Done.
+
#endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698