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

Side by Side Diff: services/ui/ws/window_tree.cc

Issue 2229273003: services: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « services/ui/ws/server_window.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 // don't have to worry about whether |created_window_map_| changes or not. 976 // don't have to worry about whether |created_window_map_| changes or not.
977 base::hash_map<WindowId, ServerWindow*> created_window_map_copy; 977 base::hash_map<WindowId, ServerWindow*> created_window_map_copy;
978 created_window_map_.swap(created_window_map_copy); 978 created_window_map_.swap(created_window_map_copy);
979 // A sibling can be a transient parent of another window so we detach windows 979 // A sibling can be a transient parent of another window so we detach windows
980 // from their transient parents to avoid double deletes. 980 // from their transient parents to avoid double deletes.
981 for (auto& pair : created_window_map_copy) { 981 for (auto& pair : created_window_map_copy) {
982 ServerWindow* transient_parent = pair.second->transient_parent(); 982 ServerWindow* transient_parent = pair.second->transient_parent();
983 if (transient_parent) 983 if (transient_parent)
984 transient_parent->RemoveTransientWindow(pair.second); 984 transient_parent->RemoveTransientWindow(pair.second);
985 } 985 }
986 STLDeleteValues(&created_window_map_copy); 986 base::STLDeleteValues(&created_window_map_copy);
987 } 987 }
988 988
989 bool WindowTree::CanEmbed(const ClientWindowId& window_id) const { 989 bool WindowTree::CanEmbed(const ClientWindowId& window_id) const {
990 const ServerWindow* window = GetWindowByClientId(window_id); 990 const ServerWindow* window = GetWindowByClientId(window_id);
991 return window && access_policy_->CanEmbed(window); 991 return window && access_policy_->CanEmbed(window);
992 } 992 }
993 993
994 void WindowTree::PrepareForEmbed(ServerWindow* window) { 994 void WindowTree::PrepareForEmbed(ServerWindow* window) {
995 DCHECK(window); 995 DCHECK(window);
996 996
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 } 1674 }
1675 1675
1676 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( 1676 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy(
1677 const ServerWindow* window) const { 1677 const ServerWindow* window) const {
1678 WindowTree* tree = window_server_->GetTreeWithRoot(window); 1678 WindowTree* tree = window_server_->GetTreeWithRoot(window);
1679 return tree && tree != this; 1679 return tree && tree != this;
1680 } 1680 }
1681 1681
1682 } // namespace ws 1682 } // namespace ws
1683 } // namespace ui 1683 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698