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

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

Issue 1157843009: Added wm::IsWindowUserPositionable(...) method in window_util.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated callsites to use WindowState::IsUserPositionable(). Created 5 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 | « ash/wm/window_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 bool CanActivateWindow(aura::Window* window) { 72 bool CanActivateWindow(aura::Window* window) {
73 return ::wm::CanActivateWindow(window); 73 return ::wm::CanActivateWindow(window);
74 } 74 }
75 75
76 bool IsWindowMinimized(aura::Window* window) { 76 bool IsWindowMinimized(aura::Window* window) {
77 return ash::wm::GetWindowState(window)->IsMinimized(); 77 return ash::wm::GetWindowState(window)->IsMinimized();
78 } 78 }
79 79
80 bool IsWindowUserPositionable(aura::Window* window) {
81 return GetWindowState(window)->IsUserPositionable();
82 }
83
80 void CenterWindow(aura::Window* window) { 84 void CenterWindow(aura::Window* window) {
81 wm::WMEvent event(wm::WM_EVENT_CENTER); 85 wm::WMEvent event(wm::WM_EVENT_CENTER);
82 wm::GetWindowState(window)->OnWMEvent(&event); 86 wm::GetWindowState(window)->OnWMEvent(&event);
83 } 87 }
84 88
85 gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(aura::Window* window) { 89 gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(aura::Window* window) {
86 gfx::Rect work_area_in_parent(ScreenUtil::GetDisplayWorkAreaBoundsInParent( 90 gfx::Rect work_area_in_parent(ScreenUtil::GetDisplayWorkAreaBoundsInParent(
87 window)); 91 window));
88 return gfx::Rect(work_area_in_parent.x(), 92 return gfx::Rect(work_area_in_parent.x(),
89 work_area_in_parent.y(), 93 work_area_in_parent.y(),
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (!container->layout_manager()) 205 if (!container->layout_manager())
202 container->SetLayoutManager(new SnapToPixelLayoutManager(container)); 206 container->SetLayoutManager(new SnapToPixelLayoutManager(container));
203 } else { 207 } else {
204 InstallSnapLayoutManagerToContainers(container); 208 InstallSnapLayoutManagerToContainers(container);
205 } 209 }
206 } 210 }
207 } 211 }
208 212
209 } // namespace wm 213 } // namespace wm
210 } // namespace ash 214 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698