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

Side by Side Diff: mojo/services/window_manager/window_manager_app.cc

Issue 401263002: [build-fix] [gcc 4.6.*] Use iterator instead of const_iterator while using std::map::erase(...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | 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 "mojo/services/window_manager/window_manager_app.h" 5 #include "mojo/services/window_manager/window_manager_app.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "mojo/aura/aura_init.h" 9 #include "mojo/aura/aura_init.h"
10 #include "mojo/aura/window_tree_host_mojo.h" 10 #include "mojo/aura/window_tree_host_mojo.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 window->SetProperty(kNodeKey, node); 254 window->SetProperty(kNodeKey, node);
255 parent->AddChild(window); 255 parent->AddChild(window);
256 node_id_to_window_map_[id] = window; 256 node_id_to_window_map_[id] = window;
257 view_manager::Node::Children::const_iterator it = node->children().begin(); 257 view_manager::Node::Children::const_iterator it = node->children().begin();
258 for (; it != node->children().end(); ++it) 258 for (; it != node->children().end(); ++it)
259 RegisterSubtree((*it)->id(), window); 259 RegisterSubtree((*it)->id(), window);
260 } 260 }
261 261
262 void WindowManagerApp::UnregisterSubtree(view_manager::Id id) { 262 void WindowManagerApp::UnregisterSubtree(view_manager::Id id) {
263 view_manager::Node* node = view_manager_->GetNodeById(id); 263 view_manager::Node* node = view_manager_->GetNodeById(id);
264 NodeIdToWindowMap::const_iterator it = node_id_to_window_map_.find(id); 264 NodeIdToWindowMap::iterator it = node_id_to_window_map_.find(id);
265 DCHECK(it != node_id_to_window_map_.end()); 265 DCHECK(it != node_id_to_window_map_.end());
266 scoped_ptr<aura::Window> window(it->second); 266 scoped_ptr<aura::Window> window(it->second);
267 node_id_to_window_map_.erase(it); 267 node_id_to_window_map_.erase(it);
268 view_manager::Node::Children::const_iterator child = node->children().begin(); 268 view_manager::Node::Children::const_iterator child = node->children().begin();
269 for (; child != node->children().end(); ++child) 269 for (; child != node->children().end(); ++child)
270 UnregisterSubtree((*child)->id()); 270 UnregisterSubtree((*child)->id());
271 } 271 }
272 272
273 //////////////////////////////////////////////////////////////////////////////// 273 ////////////////////////////////////////////////////////////////////////////////
274 // ApplicationDelegate, public: 274 // ApplicationDelegate, public:
275 275
276 // static 276 // static
277 ApplicationDelegate* ApplicationDelegate::Create() { 277 ApplicationDelegate* ApplicationDelegate::Create() {
278 return new WindowManagerApp; 278 return new WindowManagerApp;
279 } 279 }
280 280
281 } // namespace mojo 281 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698