OLD | NEW |
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 <map> | 5 #include <map> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2866 // Test implementation of LayerAnimator. | 2866 // Test implementation of LayerAnimator. |
2867 class TestLayerAnimator : public ui::LayerAnimator { | 2867 class TestLayerAnimator : public ui::LayerAnimator { |
2868 public: | 2868 public: |
2869 TestLayerAnimator(); | 2869 TestLayerAnimator(); |
2870 | 2870 |
2871 const gfx::Rect& last_bounds() const { return last_bounds_; } | 2871 const gfx::Rect& last_bounds() const { return last_bounds_; } |
2872 | 2872 |
2873 // LayerAnimator. | 2873 // LayerAnimator. |
2874 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 2874 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
2875 | 2875 |
2876 protected: | |
2877 ~TestLayerAnimator() { } | |
2878 | |
2879 private: | 2876 private: |
2880 gfx::Rect last_bounds_; | 2877 gfx::Rect last_bounds_; |
2881 | 2878 |
2882 DISALLOW_COPY_AND_ASSIGN(TestLayerAnimator); | 2879 DISALLOW_COPY_AND_ASSIGN(TestLayerAnimator); |
2883 }; | 2880 }; |
2884 | 2881 |
2885 TestLayerAnimator::TestLayerAnimator() | 2882 TestLayerAnimator::TestLayerAnimator() |
2886 : ui::LayerAnimator(base::TimeDelta::FromMilliseconds(0)) { | 2883 : ui::LayerAnimator(base::TimeDelta::FromMilliseconds(0)) { |
2887 } | 2884 } |
2888 | 2885 |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3383 // Set to non default value. | 3380 // Set to non default value. |
3384 v->layer()->set_scale_content(false); | 3381 v->layer()->set_scale_content(false); |
3385 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); | 3382 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); |
3386 ui::Layer* new_layer = v->layer(); | 3383 ui::Layer* new_layer = v->layer(); |
3387 EXPECT_FALSE(new_layer->scale_content()); | 3384 EXPECT_FALSE(new_layer->scale_content()); |
3388 } | 3385 } |
3389 | 3386 |
3390 #endif // USE_AURA | 3387 #endif // USE_AURA |
3391 | 3388 |
3392 } // namespace views | 3389 } // namespace views |
OLD | NEW |