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

Side by Side Diff: ash/shelf/shelf_layout_manager.cc

Issue 2000393003: ash: Reorder shutdown of ShelfLayoutManager and StatusAreaWidget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 Shell::GetInstance()-> 254 Shell::GetInstance()->
255 session_state_delegate()->RemoveSessionStateObserver(this); 255 session_state_delegate()->RemoveSessionStateObserver(this);
256 if (root_window_controller_observer_) { 256 if (root_window_controller_observer_) {
257 wm::WmWindowAura::Get(root_window_) 257 wm::WmWindowAura::Get(root_window_)
258 ->GetRootWindowController() 258 ->GetRootWindowController()
259 ->RemoveObserver(root_window_controller_observer_.get()); 259 ->RemoveObserver(root_window_controller_observer_.get());
260 } 260 }
261 } 261 }
262 262
263 void ShelfLayoutManager::PrepareForShutdown() { 263 void ShelfLayoutManager::PrepareForShutdown() {
264 if (in_shutdown_)
265 return;
266 in_shutdown_ = true;
oshima 2016/05/24 20:49:10 did you actually need this? resetting/removing obs
James Cook 2016/05/24 21:18:14 I will need the in_shutdown_ variable in a future
264 // Clear all event filters, otherwise sometimes those filters may catch 267 // Clear all event filters, otherwise sometimes those filters may catch
265 // synthesized mouse event and cause crashes during the shutdown. 268 // synthesized mouse event and cause crashes during the shutdown.
266 set_workspace_controller(NULL); 269 set_workspace_controller(NULL);
267 auto_hide_event_filter_.reset(); 270 auto_hide_event_filter_.reset();
268 bezel_event_filter_.reset(); 271 bezel_event_filter_.reset();
269 // Stop observing window change, otherwise we can attempt to update a 272 // Stop observing window change, otherwise we can attempt to update a
270 // partially destructed shelf. 273 // partially destructed shelf.
271 aura::client::GetActivationClient(root_window_)->RemoveObserver(this); 274 aura::client::GetActivationClient(root_window_)->RemoveObserver(this);
272 } 275 }
273 276
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 UpdateBoundsAndOpacity(target_bounds, true, NULL); 1148 UpdateBoundsAndOpacity(target_bounds, true, NULL);
1146 UpdateVisibilityState(); 1149 UpdateVisibilityState();
1147 } 1150 }
1148 1151
1149 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { 1152 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() {
1150 UpdateVisibilityState(); 1153 UpdateVisibilityState();
1151 LayoutShelf(); 1154 LayoutShelf();
1152 } 1155 }
1153 1156
1154 } // namespace ash 1157 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698