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

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

Issue 8362006: Reland r107720 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable framework for aura Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 9 #include "base/logging.h"
10 #include "ui/aura/desktop.h" 10 #include "ui/aura/desktop.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 for (Windows::const_iterator it = children_.begin(); 404 for (Windows::const_iterator it = children_.begin();
405 it != children_.end(); ++it) { 405 it != children_.end(); ++it) {
406 if ((*it)->IsOrContainsFullscreenWindow()) 406 if ((*it)->IsOrContainsFullscreenWindow())
407 return true; 407 return true;
408 } 408 }
409 return false; 409 return false;
410 } 410 }
411 411
412 // static 412 // static
413 ui::Animation* Window::CreateDefaultAnimation() { 413 void Window::ApplyDefaultAnimationSettings(
414 std::vector<ui::MultiAnimation::Part> parts; 414 ui::LayerAnimator::TransientSettings* settings) {
415 parts.push_back(ui::MultiAnimation::Part(200, ui::Tween::LINEAR)); 415 settings->SetTransitionDuration(base::TimeDelta::FromMilliseconds(200));
416 ui::MultiAnimation* multi_animation = new ui::MultiAnimation(parts);
417 multi_animation->set_continuous(false);
418 return multi_animation;
419 } 416 }
420 417
421 Desktop* Window::GetDesktop() { 418 Desktop* Window::GetDesktop() {
422 return parent_ ? parent_->GetDesktop() : NULL; 419 return parent_ ? parent_->GetDesktop() : NULL;
423 } 420 }
424 421
425 void Window::SetBoundsInternal(const gfx::Rect& new_bounds) { 422 void Window::SetBoundsInternal(const gfx::Rect& new_bounds) {
426 const gfx::Rect old_bounds = bounds(); 423 const gfx::Rect old_bounds = bounds();
427 bool was_move = old_bounds.size() == new_bounds.size(); 424 bool was_move = old_bounds.size() == new_bounds.size();
428 layer_->SetBounds(new_bounds); 425 layer_->SetBounds(new_bounds);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 break; 503 break;
507 } 504 }
508 505
509 return delegate_ ? this : NULL; 506 return delegate_ ? this : NULL;
510 } 507 }
511 508
512 void Window::OnPaintLayer(gfx::Canvas* canvas) { 509 void Window::OnPaintLayer(gfx::Canvas* canvas) {
513 delegate_->OnPaint(canvas); 510 delegate_->OnPaint(canvas);
514 } 511 }
515 512
516 void Window::OnLayerAnimationEnded(const ui::Animation* animation) { 513 void Window::OnLayerAnimationEnded(
514 const ui::LayerAnimationSequence* animation) {
517 } 515 }
518 516
519 } // namespace aura 517 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura_shell/shell.cc » ('j') | ui/gfx/compositor/layer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698