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

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

Issue 2024993002: Makes RootWindowController window creation in terms of common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 4 years, 6 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/non_client_frame_controller.cc ('k') | ui/wm/core/visibility_controller.h » ('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>
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 layout_managers_[status].reset(new StatusLayoutManager(status)); 313 layout_managers_[status].reset(new StatusLayoutManager(status));
314 314
315 mus::Window* user_private_windows = 315 mus::Window* user_private_windows =
316 GetWindowForContainer(mojom::Container::USER_PRIVATE_WINDOWS); 316 GetWindowForContainer(mojom::Container::USER_PRIVATE_WINDOWS);
317 // WorkspaceLayoutManager is not a mash::wm::LayoutManager (it's an 317 // WorkspaceLayoutManager is not a mash::wm::LayoutManager (it's an
318 // ash::wm::LayoutManager), so it can't be in |layout_managers_|. 318 // ash::wm::LayoutManager), so it can't be in |layout_managers_|.
319 layout_managers_.erase(user_private_windows); 319 layout_managers_.erase(user_private_windows);
320 std::unique_ptr<WorkspaceLayoutManagerDelegateImpl> 320 std::unique_ptr<WorkspaceLayoutManagerDelegateImpl>
321 workspace_layout_manager_delegate(new WorkspaceLayoutManagerDelegateImpl( 321 workspace_layout_manager_delegate(new WorkspaceLayoutManagerDelegateImpl(
322 wm_root_window_controller_.get())); 322 wm_root_window_controller_.get()));
323 WmWindowMus::Get(user_private_windows) 323 WmWindowMus* user_private_windows_wm = WmWindowMus::Get(user_private_windows);
324 ->SetLayoutManager(base::WrapUnique(new ash::WorkspaceLayoutManager( 324 user_private_windows_wm->SetSnapsChildrenToPhysicalPixelBoundary();
325 WmWindowMus::Get(user_private_windows), 325 user_private_windows_wm->SetChildrenUseExtendedHitRegion();
326 user_private_windows_wm->SetLayoutManager(
327 base::WrapUnique(new ash::WorkspaceLayoutManager(
328 user_private_windows_wm,
326 std::move(workspace_layout_manager_delegate)))); 329 std::move(workspace_layout_manager_delegate))));
327 330
328 mus::Window* user_private_docked_windows = 331 mus::Window* user_private_docked_windows =
329 GetWindowForContainer(mojom::Container::USER_PRIVATE_DOCKED_WINDOWS); 332 GetWindowForContainer(mojom::Container::USER_PRIVATE_DOCKED_WINDOWS);
330 WmWindowMus* user_private_docked_windows_wm = 333 WmWindowMus* user_private_docked_windows_wm =
331 WmWindowMus::Get(user_private_docked_windows); 334 WmWindowMus::Get(user_private_docked_windows);
335 user_private_docked_windows_wm->SetSnapsChildrenToPhysicalPixelBoundary();
332 layout_managers_.erase(user_private_docked_windows); 336 layout_managers_.erase(user_private_docked_windows);
337 user_private_docked_windows_wm->SetChildrenUseExtendedHitRegion();
333 user_private_docked_windows_wm->SetLayoutManager(base::WrapUnique( 338 user_private_docked_windows_wm->SetLayoutManager(base::WrapUnique(
334 new ash::DockedWindowLayoutManager(user_private_docked_windows_wm))); 339 new ash::DockedWindowLayoutManager(user_private_docked_windows_wm)));
335 340
336 mus::Window* user_private_panels = 341 mus::Window* user_private_panels =
337 GetWindowForContainer(mojom::Container::USER_PRIVATE_PANELS); 342 GetWindowForContainer(mojom::Container::USER_PRIVATE_PANELS);
338 WmWindowMus* user_private_panels_wm = WmWindowMus::Get(user_private_panels); 343 WmWindowMus* user_private_panels_wm = WmWindowMus::Get(user_private_panels);
344 user_private_panels_wm->SetSnapsChildrenToPhysicalPixelBoundary();
339 layout_managers_.erase(user_private_panels); 345 layout_managers_.erase(user_private_panels);
346 user_private_panels_wm->SetChildrenUseExtendedHitRegion();
340 user_private_panels_wm->SetLayoutManager( 347 user_private_panels_wm->SetLayoutManager(
341 base::WrapUnique(new ash::PanelLayoutManager(user_private_panels_wm))); 348 base::WrapUnique(new ash::PanelLayoutManager(user_private_panels_wm)));
349
350 mus::Window* user_private_always_on_top = GetWindowForContainer(
351 mojom::Container::USER_PRIVATE_ALWAYS_ON_TOP_WINDOWS);
352 WmWindowMus* user_private_always_on_top_wm =
353 WmWindowMus::Get(user_private_always_on_top);
354 user_private_always_on_top_wm->SetChildrenUseExtendedHitRegion();
355 user_private_always_on_top_wm->SetSnapsChildrenToPhysicalPixelBoundary();
342 } 356 }
343 357
344 } // namespace wm 358 } // namespace wm
345 } // namespace mash 359 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/non_client_frame_controller.cc ('k') | ui/wm/core/visibility_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698