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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 14076009: Don't try to re-layout shelf if the widget has already been deleted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index e257ff34e039f9208de3e640462301ad4f48b374..aa3ab2f23ace794786c43d683555bd5b762e6c35 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -204,8 +204,6 @@ bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) {
}
gfx::Rect ShelfLayoutManager::GetIdealBounds() {
- // TODO(oshima): this is wrong. Figure out what display shelf is on
- // and everything should be based on it.
gfx::Rect bounds(
ScreenAsh::GetDisplayBoundsInParent(shelf_->GetNativeView()));
int width = 0, height = 0;
@@ -514,6 +512,9 @@ ShelfLayoutManager::TargetBounds::TargetBounds() : opacity(0.0f) {}
ShelfLayoutManager::TargetBounds::~TargetBounds() {}
void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) {
+ if (!shelf_->GetNativeView())
+ return;
+
State state;
state.visibility_state = visibility_state;
state.auto_hide_state = CalculateAutoHideState(visibility_state);
« 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