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

Unified Diff: ash/common/wm_shell.cc

Issue 2739553005: Moves maintaining root_window_for_new_windows_ to Shell (Closed)
Patch Set: remove ash:: Created 3 years, 9 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 | « ash/common/wm_shell.h ('k') | ash/drag_drop/drag_drop_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index 6e141731fb9ae84631e261e609c388fd2de94c4d..238cf16dcbbdd2d2455c44952b37fd5381821f1a 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -60,7 +60,6 @@
#include "ui/app_list/presenter/app_list.h"
#include "ui/display/display.h"
#include "ui/views/focus/focus_manager_factory.h"
-#include "ui/wm/public/activation_client.h"
namespace ash {
@@ -114,8 +113,6 @@ void WmShell::Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool) {
}
void WmShell::Shutdown() {
- Shell::GetInstance()->activation_client()->RemoveObserver(this);
-
// These members access WmShell in their destructors.
wallpaper_controller_.reset();
accessibility_delegate_.reset();
@@ -298,12 +295,6 @@ RootWindowController* WmShell::GetPrimaryRootWindowController() {
return GetPrimaryRootWindow()->GetRootWindowController();
}
-WmWindow* WmShell::GetRootWindowForNewWindows() {
- if (scoped_root_window_for_new_windows_)
- return scoped_root_window_for_new_windows_;
- return root_window_for_new_windows_;
-}
-
bool WmShell::IsForceMaximizeOnFirstRun() {
return delegate()->IsForceMaximizeOnFirstRun();
}
@@ -354,7 +345,8 @@ void WmShell::OnModalWindowRemoved(WmWindow* removed) {
void WmShell::ShowAppList() {
// Show the app list on the default display for new windows.
- app_list_->Show(GetRootWindowForNewWindows()->GetDisplayNearestWindow().id());
+ app_list_->Show(
+ Shell::GetWmRootWindowForNewWindows()->GetDisplayNearestWindow().id());
}
void WmShell::DismissAppList() {
@@ -364,7 +356,7 @@ void WmShell::DismissAppList() {
void WmShell::ToggleAppList() {
// Toggle the app list on the default display for new windows.
app_list_->ToggleAppList(
- GetRootWindowForNewWindows()->GetDisplayNearestWindow().id());
+ Shell::GetWmRootWindowForNewWindows()->GetDisplayNearestWindow().id());
}
bool WmShell::IsApplistVisible() const {
@@ -437,14 +429,4 @@ void WmShell::SessionStateChanged(session_manager::SessionState state) {
CreateShelfView();
}
-void WmShell::OnWindowActivated(
- aura::client::ActivationChangeObserver::ActivationReason reason,
- aura::Window* gained_active,
- aura::Window* lost_active) {
- // TODO(sky): Shell should implement ActivationChangeObserver, not WmShell.
- WmWindow* gained_active_wm = WmWindow::Get(gained_active);
- if (gained_active_wm)
- set_root_window_for_new_windows(gained_active_wm->GetRootWindow());
-}
-
} // namespace ash
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/drag_drop/drag_drop_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698