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

Unified Diff: ash/shell.cc

Issue 2041423002: Moves MruWindowTracker to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_mru_window_tracker
Patch Set: comment Created 4 years, 6 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: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index dccdd24e3fd87f447a87dee819584a55b23449af..ebe9f533427c2bc4c7e4b737a89136a4e43e88cf 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -19,6 +19,7 @@
#include "ash/common/shelf/shelf_item_delegate.h"
#include "ash/common/shelf/shelf_item_delegate_manager.h"
#include "ash/common/shelf/shelf_model.h"
+#include "ash/common/shell_common.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/mru_window_tracker.h"
#include "ash/common/wm/root_window_finder.h"
@@ -772,7 +773,7 @@ Shell::~Shell() {
// MruWindowTracker must be destroyed after all windows have been deleted to
// avoid a possible crash when Shell is destroyed from a non-normal shutdown
// path. (crbug.com/485438).
- mru_window_tracker_.reset();
+ shell_common_->DeleteMruWindowTracker();
// Chrome implementation of shelf delegate depends on FocusClient,
// so must be deleted before |focus_client_| (below).
@@ -825,6 +826,9 @@ Shell::~Shell() {
// also needs to be destroyed before |instance_| reset to null.
wm_shell_.reset();
+ // Must happen after |wm_shell_| is deleted.
+ shell_common_.reset();
+
// Depends on |focus_client_|, so must be destroyed before.
window_tree_host_manager_->Shutdown();
window_tree_host_manager_.reset();
@@ -867,7 +871,8 @@ void Shell::Init(const ShellInitParams& init_params) {
DCHECK(in_mus_) << "linux desktop does not support ash.";
#endif
- wm_shell_.reset(new WmShellAura);
+ shell_common_.reset(new ShellCommon);
+ wm_shell_.reset(new WmShellAura(shell_common_.get()));
scoped_overview_animation_settings_factory_.reset(
new ScopedOverviewAnimationSettingsFactoryAura);
window_positioner_.reset(new WindowPositioner(wm_shell_.get()));
@@ -1048,7 +1053,7 @@ void Shell::Init(const ShellInitParams& init_params) {
magnification_controller_.reset(
MagnificationController::CreateInstance());
- mru_window_tracker_.reset(new MruWindowTracker);
+ shell_common_->CreateMruWindowTracker();
partial_magnification_controller_.reset(
new PartialMagnificationController());
« ash/common/shell_common.h ('K') | « ash/shell.h ('k') | ash/wm/overview/window_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698