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

Unified Diff: ash/mus/window_manager.cc

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback 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/mus/test/wm_test_base.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index 589769b77be289e2ff70360d39c28678c16acf53..13509d8465987ee47d7acac229e0c3e1a037663f 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -8,10 +8,10 @@
#include <utility>
-#include "ash/aura/wm_window_aura.h"
#include "ash/common/session/session_controller.h"
#include "ash/common/wm/container_finder.h"
#include "ash/common/wm/window_state.h"
+#include "ash/common/wm_window.h"
#include "ash/display/screen_position_controller.h"
#include "ash/mus/accelerators/accelerator_handler.h"
#include "ash/mus/accelerators/accelerator_ids.h"
@@ -153,8 +153,7 @@ aura::Window* WindowManager::NewTopLevelWindow(
root_window_controller->NewTopLevelWindow(window_type, properties);
if (properties->count(
ui::mojom::WindowManager::kWindowIgnoredByShelf_Property)) {
- wm::WindowState* window_state =
- static_cast<WmWindow*>(WmWindowAura::Get(window))->GetWindowState();
+ wm::WindowState* window_state = WmWindow::Get(window)->GetWindowState();
window_state->set_ignored_by_shelf(mojo::ConvertTo<bool>(
(*properties)
[ui::mojom::WindowManager::kWindowIgnoredByShelf_Property]));
@@ -306,10 +305,10 @@ void WindowManager::Shutdown() {
}
RootWindowController* WindowManager::GetPrimaryRootWindowController() {
- return RootWindowController::ForWindow(
- static_cast<WmWindowAura*>(
- WmShell::Get()->GetPrimaryRootWindowController()->GetWindow())
- ->aura_window());
+ return RootWindowController::ForWindow(WmShell::Get()
+ ->GetPrimaryRootWindowController()
+ ->GetWindow()
+ ->aura_window());
}
RootWindowController*
@@ -323,9 +322,7 @@ WindowManager::GetRootWindowControllerForNewTopLevelWindow(
}
return RootWindowController::ForWindow(
- static_cast<WmWindowAura*>(
- WmShellMus::Get()->GetRootWindowForNewWindows())
- ->aura_window());
+ WmShellMus::Get()->GetRootWindowForNewWindows()->aura_window());
}
void WindowManager::OnEmbed(
@@ -368,7 +365,7 @@ void WindowManager::SetWindowManagerClient(aura::WindowManagerClient* client) {
bool WindowManager::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) {
// TODO(sky): this indirectly sets bounds, which is against what
// OnWmSetBounds() recommends doing. Remove that restriction, or fix this.
- WmWindowAura::Get(window)->SetBounds(*bounds);
+ WmWindow::Get(window)->SetBounds(*bounds);
*bounds = window->bounds();
return true;
}
@@ -379,7 +376,7 @@ bool WindowManager::OnWmSetProperty(
std::unique_ptr<std::vector<uint8_t>>* new_data) {
// TODO(sky): constrain this to set of keys we know about, and allowed values.
if (name == ui::mojom::WindowManager::kWindowIgnoredByShelf_Property) {
- wm::WindowState* window_state = WmWindowAura::Get(window)->GetWindowState();
+ wm::WindowState* window_state = WmWindow::Get(window)->GetWindowState();
window_state->set_ignored_by_shelf(
new_data ? mojo::ConvertTo<bool>(**new_data) : false);
return false; // Won't attempt to map through property converter.
@@ -465,7 +462,7 @@ void WindowManager::OnWmPerformMoveLoop(
ui::mojom::MoveLoopSource source,
const gfx::Point& cursor_location,
const base::Callback<void(bool)>& on_done) {
- WmWindowAura* child_window = WmWindowAura::Get(window);
+ WmWindow* child_window = WmWindow::Get(window);
MoveEventHandler* handler = MoveEventHandler::GetForWindow(child_window);
if (!handler) {
on_done.Run(false);
@@ -481,7 +478,7 @@ void WindowManager::OnWmPerformMoveLoop(
}
void WindowManager::OnWmCancelMoveLoop(aura::Window* window) {
- WmWindowAura* child_window = WmWindowAura::Get(window);
+ WmWindow* child_window = WmWindow::Get(window);
MoveEventHandler* handler = MoveEventHandler::GetForWindow(child_window);
if (handler)
handler->RevertDrag();
« no previous file with comments | « ash/mus/test/wm_test_base.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698