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

Unified Diff: ui/gfx/compositor/scoped_layer_animation_settings.cc

Issue 10365007: ui: Move compositor/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DEPS Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/compositor/scoped_layer_animation_settings.h ('k') | ui/gfx/compositor/screen_rotation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/scoped_layer_animation_settings.cc
diff --git a/ui/gfx/compositor/scoped_layer_animation_settings.cc b/ui/gfx/compositor/scoped_layer_animation_settings.cc
deleted file mode 100644
index 9897949d20776a0c891cd4416ee30f923ef9f346..0000000000000000000000000000000000000000
--- a/ui/gfx/compositor/scoped_layer_animation_settings.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/gfx/compositor/scoped_layer_animation_settings.h"
-
-#include "ui/gfx/compositor/layer_animation_observer.h"
-#include "ui/gfx/compositor/layer_animator.h"
-
-namespace {
-
-static const base::TimeDelta kDefaultTransitionDuration =
- base::TimeDelta::FromMilliseconds(200);
-
-} // namespace;
-
-namespace ui {
-
-ScopedLayerAnimationSettings::ScopedLayerAnimationSettings(
- LayerAnimator* animator)
- : animator_(animator),
- old_transition_duration_(animator->transition_duration_),
- old_tween_type_(animator->tween_type()),
- old_preemption_strategy_(animator->preemption_strategy()) {
- SetTransitionDuration(kDefaultTransitionDuration);
-}
-
-ScopedLayerAnimationSettings::~ScopedLayerAnimationSettings() {
- animator_->transition_duration_ = old_transition_duration_;
- animator_->set_tween_type(old_tween_type_);
- animator_->set_preemption_strategy(old_preemption_strategy_);
-
- for (std::set<ImplicitAnimationObserver*>::const_iterator i =
- observers_.begin(); i != observers_.end(); ++i) {
- animator_->observers_.RemoveObserver(*i);
- (*i)->SetActive(true);
- }
-}
-
-void ScopedLayerAnimationSettings::AddObserver(
- ImplicitAnimationObserver* observer) {
- observers_.insert(observer);
- animator_->AddObserver(observer);
-}
-
-void ScopedLayerAnimationSettings::SetTransitionDuration(
- base::TimeDelta duration) {
- animator_->transition_duration_ = duration;
-}
-
-base::TimeDelta ScopedLayerAnimationSettings::GetTransitionDuration() const {
- return animator_->transition_duration_;
-}
-
-void ScopedLayerAnimationSettings::SetTweenType(Tween::Type tween_type) {
- animator_->set_tween_type(tween_type);
-}
-
-Tween::Type ScopedLayerAnimationSettings::GetTweenType() const {
- return animator_->tween_type();
-}
-
-void ScopedLayerAnimationSettings::SetPreemptionStrategy(
- LayerAnimator::PreemptionStrategy strategy) {
- animator_->set_preemption_strategy(strategy);
-}
-
-LayerAnimator::PreemptionStrategy
-ScopedLayerAnimationSettings::GetPreemptionStrategy() const {
- return animator_->preemption_strategy();
-}
-
-} // namespace ui
-
« no previous file with comments | « ui/gfx/compositor/scoped_layer_animation_settings.h ('k') | ui/gfx/compositor/screen_rotation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698