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

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

Issue 1152983004: Move ObserverList to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Then destroy the children. 237 // Then destroy the children.
238 RemoveOrDestroyChildren(); 238 RemoveOrDestroyChildren();
239 239
240 // The window needs to be removed from the parent before calling the 240 // The window needs to be removed from the parent before calling the
241 // WindowDestroyed callbacks of delegate and the observers. 241 // WindowDestroyed callbacks of delegate and the observers.
242 if (parent_) 242 if (parent_)
243 parent_->RemoveChild(this); 243 parent_->RemoveChild(this);
244 244
245 if (delegate_) 245 if (delegate_)
246 delegate_->OnWindowDestroyed(this); 246 delegate_->OnWindowDestroyed(this);
247 ObserverListBase<WindowObserver>::Iterator iter(&observers_); 247 base::ObserverListBase<WindowObserver>::Iterator iter(&observers_);
248 for (WindowObserver* observer = iter.GetNext(); observer; 248 for (WindowObserver* observer = iter.GetNext(); observer;
249 observer = iter.GetNext()) { 249 observer = iter.GetNext()) {
250 RemoveObserver(observer); 250 RemoveObserver(observer);
251 observer->OnWindowDestroyed(this); 251 observer->OnWindowDestroyed(this);
252 } 252 }
253 253
254 // Clear properties. 254 // Clear properties.
255 for (std::map<const void*, Value>::const_iterator iter = prop_map_.begin(); 255 for (std::map<const void*, Value>::const_iterator iter = prop_map_.begin();
256 iter != prop_map_.end(); 256 iter != prop_map_.end();
257 ++iter) { 257 ++iter) {
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 return window; 1401 return window;
1402 if (offset) 1402 if (offset)
1403 *offset += window->bounds().OffsetFromOrigin(); 1403 *offset += window->bounds().OffsetFromOrigin();
1404 } 1404 }
1405 if (offset) 1405 if (offset)
1406 *offset = gfx::Vector2d(); 1406 *offset = gfx::Vector2d();
1407 return NULL; 1407 return NULL;
1408 } 1408 }
1409 1409
1410 } // namespace aura 1410 } // namespace aura
OLDNEW
« no previous file with comments | « tools/valgrind/drmemory/suppressions_full.txt ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698