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

Unified Diff: ash/mus/root_window_controller.cc

Issue 2430593002: mash: Use ash shell window container ids instead of ash::mojom::Container (Closed)
Patch Set: rebase Created 4 years, 2 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/root_window_controller.h ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/root_window_controller.cc
diff --git a/ash/mus/root_window_controller.cc b/ash/mus/root_window_controller.cc
index a201bac4e0b49197062c724bcdd69de660387bf0..def83f68ac71d3476c037e94174445d704ddea0c 100644
--- a/ash/mus/root_window_controller.cc
+++ b/ash/mus/root_window_controller.cc
@@ -14,7 +14,6 @@
#include <vector>
#include "ash/common/shelf/shelf_layout_manager.h"
-#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/container_finder.h"
#include "ash/common/wm/dock/docked_window_layout_manager.h"
#include "ash/common/wm/panels/panel_layout_manager.h"
@@ -23,11 +22,11 @@
#include "ash/mus/bridge/wm_shelf_mus.h"
#include "ash/mus/bridge/wm_shell_mus.h"
#include "ash/mus/bridge/wm_window_mus.h"
-#include "ash/mus/container_ids.h"
#include "ash/mus/non_client_frame_controller.h"
#include "ash/mus/property_util.h"
#include "ash/mus/screenlock_layout.h"
#include "ash/mus/window_manager.h"
+#include "ash/public/cpp/shell_window_ids.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
@@ -42,8 +41,6 @@
#include "ui/display/display_list.h"
#include "ui/display/screen_base.h"
-using ash::mojom::Container;
-
namespace ash {
namespace mus {
@@ -101,9 +98,9 @@ ui::Window* RootWindowController::NewTopLevelWindow(
window->SetBounds(CalculateDefaultBounds(window));
ui::Window* container_window = nullptr;
- mojom::Container container;
- if (GetRequestedContainer(window, &container)) {
- container_window = GetWindowForContainer(container);
+ int container_id = kShellWindowId_Invalid;
+ if (GetRequestedContainer(window, &container_id)) {
+ container_window = GetWindowByShellWindowId(container_id)->mus_window();
} else {
// TODO(sky): window->bounds() isn't quite right.
container_window = WmWindowMus::GetMusWindow(wm::GetDefaultParent(
@@ -123,13 +120,6 @@ ui::Window* RootWindowController::NewTopLevelWindow(
return window;
}
-ui::Window* RootWindowController::GetWindowForContainer(Container container) {
- WmWindowMus* wm_window =
- GetWindowByShellWindowId(MashContainerToAshShellWindowId(container));
- DCHECK(wm_window);
- return wm_window->mus_window();
-}
-
WmWindowMus* RootWindowController::GetWindowByShellWindowId(int id) {
return WmWindowMus::AsWmWindowMus(
WmWindowMus::Get(root_)->GetChildByShellWindowId(id));
« no previous file with comments | « ash/mus/root_window_controller.h ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698