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

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

Issue 10832228: Changes aura::Window::observers_ to not notify observers that are (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« 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 (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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 Window::Window(WindowDelegate* delegate) 59 Window::Window(WindowDelegate* delegate)
60 : type_(client::WINDOW_TYPE_UNKNOWN), 60 : type_(client::WINDOW_TYPE_UNKNOWN),
61 owned_by_parent_(true), 61 owned_by_parent_(true),
62 delegate_(delegate), 62 delegate_(delegate),
63 parent_(NULL), 63 parent_(NULL),
64 transient_parent_(NULL), 64 transient_parent_(NULL),
65 visible_(false), 65 visible_(false),
66 id_(-1), 66 id_(-1),
67 transparent_(false), 67 transparent_(false),
68 user_data_(NULL), 68 user_data_(NULL),
69 ignore_events_(false) { 69 ignore_events_(false),
70 // Don't notify newly added observers during notification. This causes
71 // problems for code that adds an observer as part of an observer
72 // notification (such as the workspace code).
73 observers_(ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) {
70 } 74 }
71 75
72 Window::~Window() { 76 Window::~Window() {
73 // layer_ can be NULL if Init() wasn't invoked, which can happen 77 // layer_ can be NULL if Init() wasn't invoked, which can happen
74 // only in tests. 78 // only in tests.
75 if (layer_) 79 if (layer_)
76 layer_->SuppressPaint(); 80 layer_->SuppressPaint();
77 81
78 // Let the delegate know we're in the processing of destroying. 82 // Let the delegate know we're in the processing of destroying.
79 if (delegate_) 83 if (delegate_)
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 for (Windows::const_reverse_iterator it = children_.rbegin(), 945 for (Windows::const_reverse_iterator it = children_.rbegin(),
942 rend = children_.rend(); 946 rend = children_.rend();
943 it != rend; ++it) { 947 it != rend; ++it) {
944 Window* child = *it; 948 Window* child = *it;
945 child->PrintWindowHierarchy(depth + 1); 949 child->PrintWindowHierarchy(depth + 1);
946 } 950 }
947 } 951 }
948 #endif 952 #endif
949 953
950 } // namespace aura 954 } // namespace aura
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