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

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

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « ash/wm/window_state_unittest.cc ('k') | ash/wm/window_util_unittest.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 (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/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
(...skipping 28 matching lines...) Expand all
39 39
40 void DeactivateWindow(aura::Window* window) { 40 void DeactivateWindow(aura::Window* window) {
41 ::wm::DeactivateWindow(window); 41 ::wm::DeactivateWindow(window);
42 } 42 }
43 43
44 bool IsActiveWindow(aura::Window* window) { 44 bool IsActiveWindow(aura::Window* window) {
45 return ::wm::IsActiveWindow(window); 45 return ::wm::IsActiveWindow(window);
46 } 46 }
47 47
48 aura::Window* GetActiveWindow() { 48 aura::Window* GetActiveWindow() {
49 return aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())-> 49 return aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())
50 GetActiveWindow(); 50 ->GetActiveWindow();
51 } 51 }
52 52
53 aura::Window* GetActivatableWindow(aura::Window* window) { 53 aura::Window* GetActivatableWindow(aura::Window* window) {
54 return ::wm::GetActivatableWindow(window); 54 return ::wm::GetActivatableWindow(window);
55 } 55 }
56 56
57 bool CanActivateWindow(aura::Window* window) { 57 bool CanActivateWindow(aura::Window* window) {
58 return ::wm::CanActivateWindow(window); 58 return ::wm::CanActivateWindow(window);
59 } 59 }
60 60
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void SetSnapsChildrenToPhysicalPixelBoundary(aura::Window* container) { 102 void SetSnapsChildrenToPhysicalPixelBoundary(aura::Window* container) {
103 DCHECK(!container->GetProperty(kSnapChildrenToPixelBoundary)) 103 DCHECK(!container->GetProperty(kSnapChildrenToPixelBoundary))
104 << container->name(); 104 << container->name();
105 container->SetProperty(kSnapChildrenToPixelBoundary, true); 105 container->SetProperty(kSnapChildrenToPixelBoundary, true);
106 } 106 }
107 107
108 void InstallSnapLayoutManagerToContainers(aura::Window* parent) { 108 void InstallSnapLayoutManagerToContainers(aura::Window* parent) {
109 aura::Window::Windows children = parent->children(); 109 aura::Window::Windows children = parent->children();
110 for (aura::Window::Windows::iterator iter = children.begin(); 110 for (aura::Window::Windows::iterator iter = children.begin();
111 iter != children.end(); 111 iter != children.end(); ++iter) {
112 ++iter) {
113 aura::Window* container = *iter; 112 aura::Window* container = *iter;
114 if (container->id() < 0) // not a container 113 if (container->id() < 0) // not a container
115 continue; 114 continue;
116 if (container->GetProperty(kSnapChildrenToPixelBoundary)) { 115 if (container->GetProperty(kSnapChildrenToPixelBoundary)) {
117 if (!container->layout_manager()) 116 if (!container->layout_manager())
118 container->SetLayoutManager(new SnapToPixelLayoutManager(container)); 117 container->SetLayoutManager(new SnapToPixelLayoutManager(container));
119 } else { 118 } else {
120 InstallSnapLayoutManagerToContainers(container); 119 InstallSnapLayoutManagerToContainers(container);
121 } 120 }
122 } 121 }
123 } 122 }
124 123
125 } // namespace wm 124 } // namespace wm
126 } // namespace ash 125 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_state_unittest.cc ('k') | ash/wm/window_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698