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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
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
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_tree_host.h » ('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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 delegate_(delegate), 190 delegate_(delegate),
191 parent_(NULL), 191 parent_(NULL),
192 visible_(false), 192 visible_(false),
193 id_(-1), 193 id_(-1),
194 transparent_(false), 194 transparent_(false),
195 user_data_(NULL), 195 user_data_(NULL),
196 ignore_events_(false), 196 ignore_events_(false),
197 // Don't notify newly added observers during notification. This causes 197 // Don't notify newly added observers during notification. This causes
198 // problems for code that adds an observer as part of an observer 198 // problems for code that adds an observer as part of an observer
199 // notification (such as the workspace code). 199 // notification (such as the workspace code).
200 observers_(ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) { 200 observers_(base::ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) {
201 set_target_handler(delegate_); 201 set_target_handler(delegate_);
202 } 202 }
203 203
204 Window::~Window() { 204 Window::~Window() {
205 if (layer()->owner() == this) 205 if (layer()->owner() == this)
206 layer()->CompleteAllAnimations(); 206 layer()->CompleteAllAnimations();
207 layer()->SuppressPaint(); 207 layer()->SuppressPaint();
208 208
209 // Let the delegate know we're in the processing of destroying. 209 // Let the delegate know we're in the processing of destroying.
210 if (delegate_) 210 if (delegate_)
(...skipping 1190 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 | « ui/aura/window.h ('k') | ui/aura/window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698