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

Unified Diff: ash/common/wm/dock/docked_window_layout_manager.cc

Issue 2184223002: Makes DockedWindowLayoutManager::UpdateDockBounds() handle null shelf_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and bug Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/dock/docked_window_layout_manager.cc
diff --git a/ash/common/wm/dock/docked_window_layout_manager.cc b/ash/common/wm/dock/docked_window_layout_manager.cc
index e97cc2ac93c13003fac82b9f39899f99551801b0..b4492e6c255a2876e9fc64ff770c687b4041a174 100644
--- a/ash/common/wm/dock/docked_window_layout_manager.cc
+++ b/ash/common/wm/dock/docked_window_layout_manager.cc
@@ -1300,10 +1300,16 @@ void DockedWindowLayoutManager::UpdateDockBounds(
if (shelf_observer_)
background_bounds.Subtract(shelf_observer_->shelf_bounds_in_screen());
if (docked_width > 0) {
- if (!background_widget_)
- background_widget_.reset(new DockedBackgroundWidget(this));
- background_widget_->SetBackgroundBounds(background_bounds, alignment_);
- background_widget_->Show();
+ // TODO: |shelf_| should not be null by the time we get here, but it may
+ // be in mash as startup sequence doesn't yet match that of ash. Once
+ // |shelf_| is created at same time as ash we can remove conditional.
+ // http://crbug.com/632099
+ if (shelf_) {
+ if (!background_widget_)
+ background_widget_.reset(new DockedBackgroundWidget(this));
+ background_widget_->SetBackgroundBounds(background_bounds, alignment_);
+ background_widget_->Show();
+ }
} else if (background_widget_) {
background_widget_->Hide();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698