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

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

Issue 8827011: Panel strip refactor cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 9 years 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
« no previous file with comments | « chrome/browser/ui/panels/panel_overflow_strip.cc ('k') | chrome/browser/ui/panels/panel_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_strip.h
diff --git a/chrome/browser/ui/panels/panel_strip.h b/chrome/browser/ui/panels/panel_strip.h
index 992e5659e1e7e625f473c9f2b0b94edf7e1f4fd5..5b6a1a29310e4f0b44a475839c54d1fb99ebca23 100644
--- a/chrome/browser/ui/panels/panel_strip.h
+++ b/chrome/browser/ui/panels/panel_strip.h
@@ -82,18 +82,6 @@ class PanelStrip : public PanelMouseWatcherObserver {
void OnFullScreenModeChanged(bool is_full_screen);
-#ifdef UNIT_TEST
- static int horizontal_spacing() { return kPanelsHorizontalSpacing; }
-
- void remove_delays_for_testing() {
- remove_delays_for_testing_ = true;
- }
-
- int minimized_panel_count() {
- return minimized_panel_count_;
- }
-#endif
-
private:
enum TitlebarAction {
NO_ACTION,
@@ -134,19 +122,12 @@ class PanelStrip : public PanelMouseWatcherObserver {
int GetRightMostAvailablePosition() const;
- // Moves the panel from the panel strip to the overflow area because
- // the panel will not fit within the bounds of the panel strip.
- // Overflow may occur when new panels are added, the bounds of the strip
- // changes, a panel's size grows, a panel is moved from overflow into
- // the strip, etc.
- void MovePanelToOverflow(Panel* panel, bool is_new);
-
- // Moves panels to the overflow area, starting from the last panel.
- // |overflow_point| is the index of the first panel to oveflow.
- void MovePanelsToOverflow(size_t overflow_point);
-
- // Adds zero or more panels from overflow as will fit in the panel strip.
- void MovePanelsFromOverflowIfNeeded();
+ // Called by AddPanel() after a delay to move a newly created panel from
+ // the panel strip to overflow because the panel could not fit
+ // within the bounds of the panel strip. New panels are first displayed
+ // in the panel strip, then moved to overflow so that all created
+ // panels are (at least briefly) visible before entering overflow.
+ void DelayedMovePanelToOverflow(Panel* panel);
PanelManager* panel_manager_; // Weak, owns us.
@@ -177,7 +158,7 @@ class PanelStrip : public PanelMouseWatcherObserver {
// 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_;
+
// Owned by MessageLoop after posting.
base::WeakPtrFactory<PanelStrip> titlebar_action_factory_;
« no previous file with comments | « chrome/browser/ui/panels/panel_overflow_strip.cc ('k') | chrome/browser/ui/panels/panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698