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

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

Issue 9560002: Cleanup to keep panel from manipulating its panel strip assignment directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 8e08f364448f60eccb174968c11a378eb89bc606..8701beb582cf450b0b99c437d4a123bc22185b33 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -68,7 +68,6 @@ void Panel::Initialize(const gfx::Rect& bounds) {
void Panel::OnNativePanelClosed() {
if (auto_resizable_)
native_panel_->GetPanelBrowser()->tabstrip_model()->RemoveObserver(this);
- panel_strip_->RemovePanel(this);
manager()->OnPanelClosed(this);
}
@@ -77,7 +76,7 @@ PanelManager* Panel::manager() const {
}
bool Panel::draggable() const {
- return panel_strip()->CanDragPanel(this);
+ return panel_strip_->CanDragPanel(this);
}
const Extension* Panel::GetExtension() const {
@@ -149,18 +148,8 @@ void Panel::SetAppIconVisibility(bool visible) {
native_panel_->SetPanelAppIconVisibility(visible);
}
-void Panel::MoveToStrip(PanelStrip* new_strip) {
- DCHECK_NE(panel_strip_, new_strip);
- if (panel_strip_)
- panel_strip_->RemovePanel(this);
-
+void Panel::SetPanelStrip(PanelStrip* new_strip) {
Andrei 2012/03/01 00:08:50 Yes!!!
panel_strip_ = new_strip;
- panel_strip_->AddPanel(this);
-
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_PANEL_CHANGED_LAYOUT_MODE,
- content::Source<Panel>(this),
- content::NotificationService::NoDetails());
}
void Panel::SetExpansionState(ExpansionState new_state) {

Powered by Google App Engine
This is Rietveld 408576698