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

Side by Side Diff: mash/wm/root_window_controller.cc

Issue 2002243002: Gets mash to use WmToplevelWindowEventHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « mash/wm/frame/move_loop_unittest.cc ('k') | mash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mash/wm/root_window_controller.h" 5 #include "mash/wm/root_window_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <sstream> 10 #include <sstream>
11 11
12 #include "ash/wm/common/always_on_top_controller.h" 12 #include "ash/wm/common/always_on_top_controller.h"
13 #include "ash/wm/common/dock/docked_window_layout_manager.h"
14 #include "ash/wm/common/panels/panel_layout_manager.h"
13 #include "ash/wm/common/wm_shell_window_ids.h" 15 #include "ash/wm/common/wm_shell_window_ids.h"
14 #include "ash/wm/common/workspace/workspace_layout_manager.h" 16 #include "ash/wm/common/workspace/workspace_layout_manager.h"
15 #include "ash/wm/common/workspace/workspace_layout_manager_delegate.h" 17 #include "ash/wm/common/workspace/workspace_layout_manager_delegate.h"
16 #include "base/bind.h" 18 #include "base/bind.h"
17 #include "base/command_line.h" 19 #include "base/command_line.h"
18 #include "base/memory/ptr_util.h" 20 #include "base/memory/ptr_util.h"
19 #include "components/mus/common/event_matcher_util.h" 21 #include "components/mus/common/event_matcher_util.h"
20 #include "components/mus/common/switches.h" 22 #include "components/mus/common/switches.h"
21 #include "components/mus/common/util.h" 23 #include "components/mus/common/util.h"
22 #include "components/mus/public/cpp/property_type_converters.h" 24 #include "components/mus/public/cpp/property_type_converters.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // WorkspaceLayoutManager is not a mash::wm::LayoutManager (it's an 306 // WorkspaceLayoutManager is not a mash::wm::LayoutManager (it's an
305 // ash::wm::LayoutManager), so it can't be in |layout_managers_|. 307 // ash::wm::LayoutManager), so it can't be in |layout_managers_|.
306 layout_managers_.erase(user_private_windows); 308 layout_managers_.erase(user_private_windows);
307 std::unique_ptr<WorkspaceLayoutManagerDelegateImpl> 309 std::unique_ptr<WorkspaceLayoutManagerDelegateImpl>
308 workspace_layout_manager_delegate(new WorkspaceLayoutManagerDelegateImpl( 310 workspace_layout_manager_delegate(new WorkspaceLayoutManagerDelegateImpl(
309 wm_root_window_controller_.get())); 311 wm_root_window_controller_.get()));
310 WmWindowMus::Get(user_private_windows) 312 WmWindowMus::Get(user_private_windows)
311 ->SetLayoutManager(base::WrapUnique(new ash::WorkspaceLayoutManager( 313 ->SetLayoutManager(base::WrapUnique(new ash::WorkspaceLayoutManager(
312 WmWindowMus::Get(user_private_windows), 314 WmWindowMus::Get(user_private_windows),
313 std::move(workspace_layout_manager_delegate)))); 315 std::move(workspace_layout_manager_delegate))));
316
317 mus::Window* user_private_docked_windows =
318 GetWindowForContainer(mojom::Container::USER_PRIVATE_DOCKED_WINDOWS);
319 WmWindowMus* user_private_docked_windows_wm =
320 WmWindowMus::Get(user_private_docked_windows);
321 layout_managers_.erase(user_private_docked_windows);
322 user_private_docked_windows_wm->SetLayoutManager(base::WrapUnique(
323 new ash::DockedWindowLayoutManager(user_private_docked_windows_wm)));
324
325 mus::Window* user_private_panels =
326 GetWindowForContainer(mojom::Container::USER_PRIVATE_PANELS);
327 WmWindowMus* user_private_panels_wm = WmWindowMus::Get(user_private_panels);
328 layout_managers_.erase(user_private_panels);
329 user_private_panels_wm->SetLayoutManager(
330 base::WrapUnique(new ash::PanelLayoutManager(user_private_panels_wm)));
314 } 331 }
315 332
316 } // namespace wm 333 } // namespace wm
317 } // namespace mash 334 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/frame/move_loop_unittest.cc ('k') | mash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698