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

Side by Side Diff: ash/mus/user_window_controller_impl.cc

Issue 2110643002: ash: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/mus/layout_manager.cc ('k') | ash/mus/window_manager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/user_window_controller_impl.h" 5 #include "ash/mus/user_window_controller_impl.h"
6 6
7 #include "ash/common/shell_window_ids.h" 7 #include "ash/common/shell_window_ids.h"
8 #include "ash/mus/bridge/wm_window_mus.h" 8 #include "ash/mus/bridge/wm_window_mus.h"
9 #include "ash/mus/property_util.h" 9 #include "ash/mus/property_util.h"
10 #include "ash/mus/root_window_controller.h" 10 #include "ash/mus/root_window_controller.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 void UserWindowControllerImpl::AssignIdIfNecessary(::mus::Window* window) { 120 void UserWindowControllerImpl::AssignIdIfNecessary(::mus::Window* window) {
121 if (window->GetLocalProperty(kUserWindowIdKey) == 0u) 121 if (window->GetLocalProperty(kUserWindowIdKey) == 0u)
122 window->SetLocalProperty(kUserWindowIdKey, next_id_++); 122 window->SetLocalProperty(kUserWindowIdKey, next_id_++);
123 } 123 }
124 124
125 void UserWindowControllerImpl::RemoveObservers(::mus::Window* user_container) { 125 void UserWindowControllerImpl::RemoveObservers(::mus::Window* user_container) {
126 user_container->RemoveObserver(this); 126 user_container->RemoveObserver(this);
127 user_container->window_tree()->RemoveObserver(this); 127 user_container->window_tree()->RemoveObserver(this);
128 for (auto iter : user_container->children()) 128 for (auto* iter : user_container->children())
129 iter->RemoveObserver(window_property_observer_.get()); 129 iter->RemoveObserver(window_property_observer_.get());
130 } 130 }
131 131
132 ::mus::Window* UserWindowControllerImpl::GetUserWindowById(uint32_t id) { 132 ::mus::Window* UserWindowControllerImpl::GetUserWindowById(uint32_t id) {
133 for (::mus::Window* window : GetUserWindowContainer()->children()) { 133 for (::mus::Window* window : GetUserWindowContainer()->children()) {
134 if (window->GetLocalProperty(kUserWindowIdKey) == id) 134 if (window->GetLocalProperty(kUserWindowIdKey) == id)
135 return window; 135 return window;
136 } 136 }
137 return nullptr; 137 return nullptr;
138 } 138 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 void UserWindowControllerImpl::FocusUserWindow(uint32_t window_id) { 201 void UserWindowControllerImpl::FocusUserWindow(uint32_t window_id) {
202 ::mus::Window* window = GetUserWindowById(window_id); 202 ::mus::Window* window = GetUserWindowById(window_id);
203 if (window) 203 if (window)
204 window->SetFocus(); 204 window->SetFocus();
205 } 205 }
206 206
207 } // namespace mus 207 } // namespace mus
208 } // namespace ash 208 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/layout_manager.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698