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

Unified Diff: ash/root_window_controller.cc

Issue 2733303004: Removes WmShell::NewWindow() (Closed)
Patch Set: merge and feedback 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/mus/bridge/wm_shell_mus.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index c0cc36aba8d8a485ca572f932112f426e4d1fe8f..87b54b4cbf33f33bf10761afdffb2924e751f28a 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -253,19 +253,18 @@ void ReparentAllWindows(WmWindow* src, WmWindow* dst) {
// Creates a new window for use as a container.
// TODO(sky): This should create an aura::Window. http://crbug.com/671246.
WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) {
- WmWindow* window = WmShell::Get()->NewWindow(ui::wm::WINDOW_TYPE_UNKNOWN,
- ui::LAYER_NOT_DRAWN);
+ aura::Window* window = new aura::Window(nullptr, ui::wm::WINDOW_TYPE_UNKNOWN);
+ window->Init(ui::LAYER_NOT_DRAWN);
if (WmShell::Get()->IsRunningInMash()) {
- aura::WindowPortMus::Get(window->aura_window())
- ->SetEventTargetingPolicy(
- ui::mojom::EventTargetingPolicy::DESCENDANTS_ONLY);
+ aura::WindowPortMus::Get(window)->SetEventTargetingPolicy(
+ ui::mojom::EventTargetingPolicy::DESCENDANTS_ONLY);
}
- window->SetShellWindowId(window_id);
+ window->set_id(window_id);
window->SetName(name);
- parent->AddChild(window);
+ parent->aura_window()->AddChild(window);
if (window_id != kShellWindowId_UnparentedControlContainer)
window->Show();
- return window;
+ return WmWindow::Get(window);
}
// TODO(sky): This should take an aura::Window. http://crbug.com/671246.
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698