| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef UI_ANDROID_EDGE_EFFECT_H_ | 5 #ifndef UI_ANDROID_EDGE_EFFECT_H_ |
| 6 #define UI_ANDROID_EDGE_EFFECT_H_ | 6 #define UI_ANDROID_EDGE_EFFECT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "ui/android/edge_effect_base.h" | 11 #include "ui/android/edge_effect_base.h" |
| 11 #include "ui/android/ui_android_export.h" | 12 #include "ui/android/ui_android_export.h" |
| 12 | 13 |
| 13 namespace cc { | 14 namespace cc { |
| 14 class Layer; | 15 class Layer; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace ui { | 18 namespace ui { |
| 18 class ResourceManager; | 19 class ResourceManager; |
| 19 } | 20 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 44 void ApplyToLayers(Edge edge, | 45 void ApplyToLayers(Edge edge, |
| 45 const gfx::SizeF& viewport_size, | 46 const gfx::SizeF& viewport_size, |
| 46 float offset) override; | 47 float offset) override; |
| 47 void SetParent(cc::Layer* parent) override; | 48 void SetParent(cc::Layer* parent) override; |
| 48 | 49 |
| 49 // Thread-safe trigger to load resources. | 50 // Thread-safe trigger to load resources. |
| 50 static void PreloadResources(ui::ResourceManager* resource_manager); | 51 static void PreloadResources(ui::ResourceManager* resource_manager); |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 class EffectLayer; | 54 class EffectLayer; |
| 54 scoped_ptr<EffectLayer> edge_; | 55 std::unique_ptr<EffectLayer> edge_; |
| 55 scoped_ptr<EffectLayer> glow_; | 56 std::unique_ptr<EffectLayer> glow_; |
| 56 | 57 |
| 57 float base_edge_height_; | 58 float base_edge_height_; |
| 58 float base_glow_height_; | 59 float base_glow_height_; |
| 59 | 60 |
| 60 float edge_alpha_; | 61 float edge_alpha_; |
| 61 float edge_scale_y_; | 62 float edge_scale_y_; |
| 62 float glow_alpha_; | 63 float glow_alpha_; |
| 63 float glow_scale_y_; | 64 float glow_scale_y_; |
| 64 | 65 |
| 65 float edge_alpha_start_; | 66 float edge_alpha_start_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 77 State state_; | 78 State state_; |
| 78 | 79 |
| 79 float pull_distance_; | 80 float pull_distance_; |
| 80 | 81 |
| 81 DISALLOW_COPY_AND_ASSIGN(EdgeEffect); | 82 DISALLOW_COPY_AND_ASSIGN(EdgeEffect); |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace ui | 85 } // namespace ui |
| 85 | 86 |
| 86 #endif // UI_ANDROID_EDGE_EFFECT_H_ | 87 #endif // UI_ANDROID_EDGE_EFFECT_H_ |
| OLD | NEW |