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

Side by Side Diff: ui/aura/window.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 years, 9 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 | « remoting/signaling/xmpp_signal_strategy.cc ('k') | ui/compositor/layer_animation_sequence.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 "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // Then destroy the children. 255 // Then destroy the children.
256 RemoveOrDestroyChildren(); 256 RemoveOrDestroyChildren();
257 257
258 // The window needs to be removed from the parent before calling the 258 // The window needs to be removed from the parent before calling the
259 // WindowDestroyed callbacks of delegate and the observers. 259 // WindowDestroyed callbacks of delegate and the observers.
260 if (parent_) 260 if (parent_)
261 parent_->RemoveChild(this); 261 parent_->RemoveChild(this);
262 262
263 if (delegate_) 263 if (delegate_)
264 delegate_->OnWindowDestroyed(this); 264 delegate_->OnWindowDestroyed(this);
265 ObserverListBase<WindowObserver>::Iterator iter(observers_); 265 ObserverListBase<WindowObserver>::Iterator iter(&observers_);
266 for (WindowObserver* observer = iter.GetNext(); observer; 266 for (WindowObserver* observer = iter.GetNext(); observer;
267 observer = iter.GetNext()) { 267 observer = iter.GetNext()) {
268 RemoveObserver(observer); 268 RemoveObserver(observer);
269 observer->OnWindowDestroyed(this); 269 observer->OnWindowDestroyed(this);
270 } 270 }
271 271
272 // Clear properties. 272 // Clear properties.
273 for (std::map<const void*, Value>::const_iterator iter = prop_map_.begin(); 273 for (std::map<const void*, Value>::const_iterator iter = prop_map_.begin();
274 iter != prop_map_.end(); 274 iter != prop_map_.end();
275 ++iter) { 275 ++iter) {
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 return window; 1464 return window;
1465 if (offset) 1465 if (offset)
1466 *offset += window->bounds().OffsetFromOrigin(); 1466 *offset += window->bounds().OffsetFromOrigin();
1467 } 1467 }
1468 if (offset) 1468 if (offset)
1469 *offset = gfx::Vector2d(); 1469 *offset = gfx::Vector2d();
1470 return NULL; 1470 return NULL;
1471 } 1471 }
1472 1472
1473 } // namespace aura 1473 } // namespace aura
OLDNEW
« no previous file with comments | « remoting/signaling/xmpp_signal_strategy.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698