Commit b920e7d7 authored by oshima@chromium.org's avatar oshima@chromium.org

Don't try to re-layout shelf if the widget has already been deleted.

 Shelf widget's ownership is WIDGET_OWNS_NATIVE_WIDGET, and native view can be NULL when re-layouing due to activation change after deletion.

BUG=230869

Review URL: https://chromiumcodereview.appspot.com/14076009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195070 0039d316-1c4b-4281-b951-d872f2087c98
parent 46a5c75c
...@@ -204,8 +204,6 @@ bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) { ...@@ -204,8 +204,6 @@ bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) {
} }
gfx::Rect ShelfLayoutManager::GetIdealBounds() { 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( gfx::Rect bounds(
ScreenAsh::GetDisplayBoundsInParent(shelf_->GetNativeView())); ScreenAsh::GetDisplayBoundsInParent(shelf_->GetNativeView()));
int width = 0, height = 0; int width = 0, height = 0;
...@@ -514,6 +512,9 @@ ShelfLayoutManager::TargetBounds::TargetBounds() : opacity(0.0f) {} ...@@ -514,6 +512,9 @@ ShelfLayoutManager::TargetBounds::TargetBounds() : opacity(0.0f) {}
ShelfLayoutManager::TargetBounds::~TargetBounds() {} ShelfLayoutManager::TargetBounds::~TargetBounds() {}
void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) { void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) {
if (!shelf_->GetNativeView())
return;
State state; State state;
state.visibility_state = visibility_state; state.visibility_state = visibility_state;
state.auto_hide_state = CalculateAutoHideState(visibility_state); state.auto_hide_state = CalculateAutoHideState(visibility_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment