| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |