| OLD | NEW | 
|    1 // Copyright 2014 The Chromium Authors. All rights reserved. |    1 // Copyright 2014 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 "ash/display/display_configurator_animation.h" |    5 #include "ash/display/display_configurator_animation.h" | 
|    6  |    6  | 
|    7 #include "ash/shell.h" |    7 #include "ash/shell.h" | 
|    8 #include "ash/shell_window_ids.h" |    8 #include "ash/shell_window_ids.h" | 
|    9 #include "base/bind.h" |    9 #include "base/bind.h" | 
|   10 #include "base/stl_util.h" |   10 #include "base/stl_util.h" | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   57   class Observer : public ui::LayerAnimationObserver { |   57   class Observer : public ui::LayerAnimationObserver { | 
|   58    public: |   58    public: | 
|   59     Observer(ui::LayerAnimator* animator, |   59     Observer(ui::LayerAnimator* animator, | 
|   60              CallbackRunningObserver* observer) |   60              CallbackRunningObserver* observer) | 
|   61         : animator_(animator), |   61         : animator_(animator), | 
|   62           observer_(observer) {} |   62           observer_(observer) {} | 
|   63  |   63  | 
|   64    protected: |   64    protected: | 
|   65     // ui::LayerAnimationObserver overrides: |   65     // ui::LayerAnimationObserver overrides: | 
|   66     virtual void OnLayerAnimationEnded( |   66     virtual void OnLayerAnimationEnded( | 
|   67         ui::LayerAnimationSequence* sequence) OVERRIDE { |   67         ui::LayerAnimationSequence* sequence) override { | 
|   68       animator_->RemoveObserver(this); |   68       animator_->RemoveObserver(this); | 
|   69       observer_->OnSingleTaskCompleted(); |   69       observer_->OnSingleTaskCompleted(); | 
|   70     } |   70     } | 
|   71     virtual void OnLayerAnimationAborted( |   71     virtual void OnLayerAnimationAborted( | 
|   72         ui::LayerAnimationSequence* sequence) OVERRIDE { |   72         ui::LayerAnimationSequence* sequence) override { | 
|   73       animator_->RemoveObserver(this); |   73       animator_->RemoveObserver(this); | 
|   74       observer_->OnSingleTaskAborted(); |   74       observer_->OnSingleTaskAborted(); | 
|   75     } |   75     } | 
|   76     virtual void OnLayerAnimationScheduled( |   76     virtual void OnLayerAnimationScheduled( | 
|   77         ui::LayerAnimationSequence* sequence) OVERRIDE { |   77         ui::LayerAnimationSequence* sequence) override { | 
|   78     } |   78     } | 
|   79     virtual bool RequiresNotificationWhenAnimatorDestroyed() const OVERRIDE { |   79     virtual bool RequiresNotificationWhenAnimatorDestroyed() const override { | 
|   80       return true; |   80       return true; | 
|   81     } |   81     } | 
|   82  |   82  | 
|   83    private: |   83    private: | 
|   84     ui::LayerAnimator* animator_; |   84     ui::LayerAnimator* animator_; | 
|   85     CallbackRunningObserver* observer_; |   85     CallbackRunningObserver* observer_; | 
|   86  |   86  | 
|   87     DISALLOW_COPY_AND_ASSIGN(Observer); |   87     DISALLOW_COPY_AND_ASSIGN(Observer); | 
|   88   }; |   88   }; | 
|   89  |   89  | 
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  219   if (timer_) { |  219   if (timer_) { | 
|  220     timer_->Stop(); |  220     timer_->Stop(); | 
|  221     timer_.reset(); |  221     timer_.reset(); | 
|  222   } |  222   } | 
|  223   STLDeleteContainerPairSecondPointers( |  223   STLDeleteContainerPairSecondPointers( | 
|  224       hiding_layers_.begin(), hiding_layers_.end()); |  224       hiding_layers_.begin(), hiding_layers_.end()); | 
|  225   hiding_layers_.clear(); |  225   hiding_layers_.clear(); | 
|  226 } |  226 } | 
|  227  |  227  | 
|  228 }  // namespace ash |  228 }  // namespace ash | 
| OLD | NEW |