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

Unified Diff: ash/aura/wm_root_window_controller_aura.cc

Issue 2620913003: Removes WmRootWindowController subclasses (Closed)
Patch Set: spelling Created 3 years, 11 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/aura/wm_root_window_controller_aura.h ('k') | ash/aura/wm_window_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/wm_root_window_controller_aura.cc
diff --git a/ash/aura/wm_root_window_controller_aura.cc b/ash/aura/wm_root_window_controller_aura.cc
deleted file mode 100644
index 21964424a5dc01decd82cd9c7d7bb716bc8de349..0000000000000000000000000000000000000000
--- a/ash/aura/wm_root_window_controller_aura.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/aura/wm_root_window_controller_aura.h"
-
-#include "ash/aura/wm_window_aura.h"
-#include "ash/common/shelf/shelf_widget.h"
-#include "ash/common/shelf/wm_shelf.h"
-#include "ash/display/window_tree_host_manager.h"
-#include "ash/root_window_controller.h"
-#include "ash/shell.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_property.h"
-
-DECLARE_WINDOW_PROPERTY_TYPE(ash::WmRootWindowControllerAura*);
-
-namespace ash {
-
-// TODO(sky): it likely makes more sense to hang this off RootWindowSettings.
-DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::WmRootWindowControllerAura,
- kWmRootWindowControllerKey,
- nullptr);
-
-WmRootWindowControllerAura::WmRootWindowControllerAura(
- RootWindowController* root_window_controller)
- : WmRootWindowController(
- WmWindowAura::Get(root_window_controller->GetRootWindow())),
- root_window_controller_(root_window_controller) {
- root_window_controller_->GetRootWindow()->SetProperty(
- kWmRootWindowControllerKey, this);
-}
-
-WmRootWindowControllerAura::~WmRootWindowControllerAura() {}
-
-// static
-const WmRootWindowControllerAura* WmRootWindowControllerAura::Get(
- const aura::Window* window) {
- if (!window)
- return nullptr;
-
- RootWindowController* root_window_controller =
- GetRootWindowController(window);
- if (!root_window_controller)
- return nullptr;
-
- WmRootWindowControllerAura* wm_root_window_controller =
- root_window_controller->GetRootWindow()->GetProperty(
- kWmRootWindowControllerKey);
- if (wm_root_window_controller)
- return wm_root_window_controller;
-
- DCHECK_EQ(aura::Env::Mode::LOCAL, aura::Env::GetInstance()->mode());
- // WmRootWindowControllerAura is owned by the RootWindowController's window.
- return new WmRootWindowControllerAura(root_window_controller);
-}
-
-bool WmRootWindowControllerAura::HasShelf() {
- return root_window_controller_->wm_shelf()->shelf_widget() != nullptr;
-}
-
-WmShelf* WmRootWindowControllerAura::GetShelf() {
- return root_window_controller_->wm_shelf();
-}
-
-WmWindow* WmRootWindowControllerAura::GetWindow() {
- return WmWindowAura::Get(root_window_controller_->GetRootWindow());
-}
-
-void WmRootWindowControllerAura::OnInitialWallpaperAnimationStarted() {
- root_window_controller_->OnInitialWallpaperAnimationStarted();
- WmRootWindowController::OnInitialWallpaperAnimationStarted();
-}
-
-void WmRootWindowControllerAura::OnWallpaperAnimationFinished(
- views::Widget* widget) {
- root_window_controller_->OnWallpaperAnimationFinished(widget);
- WmRootWindowController::OnWallpaperAnimationFinished(widget);
-}
-
-bool WmRootWindowControllerAura::ShouldDestroyWindowInCloseChildWindows(
- WmWindow* window) {
- return WmWindowAura::GetAuraWindow(window)->owned_by_parent();
-}
-
-} // namespace ash
« no previous file with comments | « ash/aura/wm_root_window_controller_aura.h ('k') | ash/aura/wm_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698