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

Unified Diff: ash/root_window_controller.cc

Issue 2733303004: Removes WmShell::NewWindow() (Closed)
Patch Set: cleanup 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
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index f621e8057ae19b9a32e3ed749acc0549d112234c..52895be79e06fcc7cc23880fb573f6d6f50894ce 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.

Powered by Google App Engine
This is Rietveld 408576698