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

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

Issue 2870253006: Fix WindowTreeHostManager::GetPrimaryRootWindow. (Closed)
Patch Set: 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
« ash/shell.cc ('K') | « ash/shell.cc ('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/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 void DeactivateWindow(aura::Window* window) { 58 void DeactivateWindow(aura::Window* window) {
59 ::wm::DeactivateWindow(window); 59 ::wm::DeactivateWindow(window);
60 } 60 }
61 61
62 bool IsActiveWindow(aura::Window* window) { 62 bool IsActiveWindow(aura::Window* window) {
63 return ::wm::IsActiveWindow(window); 63 return ::wm::IsActiveWindow(window);
64 } 64 }
65 65
66 aura::Window* GetActiveWindow() { 66 aura::Window* GetActiveWindow() {
varkha 2017/05/10 22:23:59 nit: Maybe a comment about when primary root windo
67 return aura::client::GetActivationClient(Shell::GetPrimaryRootWindow()) 67 auto* client =
68 ->GetActiveWindow(); 68 aura::client::GetActivationClient(Shell::GetPrimaryRootWindow());
69 return client ? client->GetActiveWindow() : nullptr;
69 } 70 }
70 71
71 aura::Window* GetActivatableWindow(aura::Window* window) { 72 aura::Window* GetActivatableWindow(aura::Window* window) {
72 return ::wm::GetActivatableWindow(window); 73 return ::wm::GetActivatableWindow(window);
73 } 74 }
74 75
75 bool CanActivateWindow(aura::Window* window) { 76 bool CanActivateWindow(aura::Window* window) {
76 return ::wm::CanActivateWindow(window); 77 return ::wm::CanActivateWindow(window);
77 } 78 }
78 79
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 131 }
131 132
132 void SetSnapsChildrenToPhysicalPixelBoundary(aura::Window* container) { 133 void SetSnapsChildrenToPhysicalPixelBoundary(aura::Window* container) {
133 DCHECK(!container->GetProperty(kSnapChildrenToPixelBoundary)) 134 DCHECK(!container->GetProperty(kSnapChildrenToPixelBoundary))
134 << container->GetName(); 135 << container->GetName();
135 container->SetProperty(kSnapChildrenToPixelBoundary, true); 136 container->SetProperty(kSnapChildrenToPixelBoundary, true);
136 } 137 }
137 138
138 } // namespace wm 139 } // namespace wm
139 } // namespace ash 140 } // namespace ash
OLDNEW
« ash/shell.cc ('K') | « ash/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698