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

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

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/aura/window_slider_unittest.cc ('k') | ui/aura/window_unittest.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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 ignore_events_(false), 210 ignore_events_(false),
211 // Don't notify newly added observers during notification. This causes 211 // Don't notify newly added observers during notification. This causes
212 // problems for code that adds an observer as part of an observer 212 // problems for code that adds an observer as part of an observer
213 // notification (such as the workspace code). 213 // notification (such as the workspace code).
214 observers_(ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) { 214 observers_(ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY) {
215 set_target_handler(delegate_); 215 set_target_handler(delegate_);
216 } 216 }
217 217
218 Window::~Window() { 218 Window::~Window() {
219 // |layer()| can be NULL during tests, or if this Window is layerless. 219 // |layer()| can be NULL during tests, or if this Window is layerless.
220 if (layer()) 220 if (layer()) {
221 layer()->CompleteAllAnimations();
ajuma 2014/06/04 16:40:12 I think we have cases where animations are expecte
ajuma 2014/06/04 17:13:12 Sorry, that should be http://crbug.com/341862.
sadrul 2014/06/04 17:39:13 For animating a window closing, we usually clone t
ajuma 2014/06/04 19:14:42 Ah, things may have changed since the last time I
sky 2014/06/04 23:32:45 I think you only want to do this if layer()->owner
sadrul 2014/06/05 01:03:36 Done.
221 layer()->SuppressPaint(); 222 layer()->SuppressPaint();
223 }
222 224
223 // Let the delegate know we're in the processing of destroying. 225 // Let the delegate know we're in the processing of destroying.
224 if (delegate_) 226 if (delegate_)
225 delegate_->OnWindowDestroying(this); 227 delegate_->OnWindowDestroying(this);
226 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroying(this)); 228 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroying(this));
227 229
228 // TODO(beng): See comment in window_event_dispatcher.h. This shouldn't be 230 // TODO(beng): See comment in window_event_dispatcher.h. This shouldn't be
229 // necessary but unfortunately is right now due to ordering 231 // necessary but unfortunately is right now due to ordering
230 // peculiarities. WED must be notified _after_ other observers 232 // peculiarities. WED must be notified _after_ other observers
231 // are notified of pending teardown but before the hierarchy 233 // are notified of pending teardown but before the hierarchy
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 return window; 1430 return window;
1429 if (offset) 1431 if (offset)
1430 *offset += window->bounds().OffsetFromOrigin(); 1432 *offset += window->bounds().OffsetFromOrigin();
1431 } 1433 }
1432 if (offset) 1434 if (offset)
1433 *offset = gfx::Vector2d(); 1435 *offset = gfx::Vector2d();
1434 return NULL; 1436 return NULL;
1435 } 1437 }
1436 1438
1437 } // namespace aura 1439 } // namespace aura
OLDNEW
« no previous file with comments | « content/browser/web_contents/aura/window_slider_unittest.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698