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

Side by Side Diff: ash/wm/window_util.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Sync and rebase. Created 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/window_util.h" 5 #include "ash/wm/window_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 void PinWindow(aura::Window* window, bool trusted) { 92 void PinWindow(aura::Window* window, bool trusted) {
93 wm::WMEvent event(trusted ? wm::WM_EVENT_TRUSTED_PIN : wm::WM_EVENT_PIN); 93 wm::WMEvent event(trusted ? wm::WM_EVENT_TRUSTED_PIN : wm::WM_EVENT_PIN);
94 wm::GetWindowState(window)->OnWMEvent(&event); 94 wm::GetWindowState(window)->OnWMEvent(&event);
95 } 95 }
96 96
97 void SetAutoHideShelf(aura::Window* window, bool autohide) { 97 void SetAutoHideShelf(aura::Window* window, bool autohide) {
98 wm::GetWindowState(window)->set_autohide_shelf_when_maximized_or_fullscreen( 98 wm::GetWindowState(window)->set_autohide_shelf_when_maximized_or_fullscreen(
99 autohide); 99 autohide);
100 for (WmWindow* root_window : ShellPort::Get()->GetAllRootWindows()) 100 for (aura::Window* root_window : Shell::GetAllRootWindows())
101 WmShelf::ForWindow(root_window)->UpdateVisibilityState(); 101 WmShelf::ForWindow(root_window)->UpdateVisibilityState();
102 } 102 }
103 103
104 bool MoveWindowToDisplay(aura::Window* window, int64_t display_id) { 104 bool MoveWindowToDisplay(aura::Window* window, int64_t display_id) {
105 DCHECK(window); 105 DCHECK(window);
106 WmWindow* root = ShellPort::Get()->GetRootWindowForDisplayId(display_id); 106 WmWindow* root = ShellPort::Get()->GetRootWindowForDisplayId(display_id);
107 return root && MoveWindowToRoot(window, root->aura_window()); 107 return root && MoveWindowToRoot(window, root->aura_window());
108 } 108 }
109 109
110 bool MoveWindowToEventRoot(aura::Window* window, const ui::Event& event) { 110 bool MoveWindowToEventRoot(aura::Window* window, const ui::Event& event) {
(...skipping 19 matching lines...) Expand all
130 } 130 }
131 131
132 void SetSnapsChildrenToPhysicalPixelBoundary(aura::Window* container) { 132 void SetSnapsChildrenToPhysicalPixelBoundary(aura::Window* container) {
133 DCHECK(!container->GetProperty(kSnapChildrenToPixelBoundary)) 133 DCHECK(!container->GetProperty(kSnapChildrenToPixelBoundary))
134 << container->GetName(); 134 << container->GetName();
135 container->SetProperty(kSnapChildrenToPixelBoundary, true); 135 container->SetProperty(kSnapChildrenToPixelBoundary, true);
136 } 136 }
137 137
138 } // namespace wm 138 } // namespace wm
139 } // namespace ash 139 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698