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

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

Issue 9195003: Move IN_OVERFLOW from Panel::ExpansionState to new enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 8 years, 11 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
« no previous file with comments | « chrome/browser/ui/panels/panel_overflow_strip.h ('k') | chrome/browser/ui/panels/panel_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_overflow_strip.cc
diff --git a/chrome/browser/ui/panels/panel_overflow_strip.cc b/chrome/browser/ui/panels/panel_overflow_strip.cc
index d56bcd4886096b9f8950f371f80b2c728a83ca30..37109dfa4b748bca2f50c17c09caf5f326273d03 100644
--- a/chrome/browser/ui/panels/panel_overflow_strip.cc
+++ b/chrome/browser/ui/panels/panel_overflow_strip.cc
@@ -81,7 +81,7 @@ void PanelOverflowStrip::UpdateCurrentWidth() {
void PanelOverflowStrip::AddPanel(Panel* panel) {
// TODO(jianli): consider using other container to improve the perf for
// inserting to the front. http://crbug.com/106222
- DCHECK_EQ(Panel::IN_OVERFLOW, panel->expansion_state());
+ DCHECK_EQ(Panel::IN_OVERFLOW, panel->layout_state());
// Newly created panels that were temporarily in the panel strip
// are added to the back of the overflow, whereas panels that are
// bumped from the panel strip by other panels go to the front
@@ -146,9 +146,10 @@ void PanelOverflowStrip::RemoveAll() {
(*iter)->Close();
}
-void PanelOverflowStrip::OnPanelExpansionStateChanged(Panel* panel) {
+void PanelOverflowStrip::OnPanelLayoutStateChanged(
+ Panel* panel, Panel::LayoutState old_state) {
// Only care about new state being overflow.
- if (panel->expansion_state() != Panel::IN_OVERFLOW)
+ if (panel->layout_state() != Panel::IN_OVERFLOW)
return;
panel_manager_->panel_strip()->Remove(panel);
@@ -158,7 +159,7 @@ void PanelOverflowStrip::OnPanelExpansionStateChanged(Panel* panel) {
}
void PanelOverflowStrip::OnPanelAttentionStateChanged(Panel* panel) {
- DCHECK(panel->expansion_state() == Panel::IN_OVERFLOW);
+ DCHECK_EQ(Panel::IN_OVERFLOW, panel->layout_state());
UpdateOverflowIndicatorAttention();
}
« no previous file with comments | « chrome/browser/ui/panels/panel_overflow_strip.h ('k') | chrome/browser/ui/panels/panel_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698