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

Side by Side Diff: content/browser/android/edge_effect.h

Issue 755643004: Replace SystemUIResourceManager with ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang build failure Created 6 years 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 unified diff | Download patch
OLDNEW
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 CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_
6 #define CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_ 6 #define CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/android/edge_effect_base.h" 9 #include "content/browser/android/edge_effect_base.h"
10 10
11 namespace cc { 11 namespace cc {
12 class Layer; 12 class Layer;
13 } 13 }
14 14
15 namespace ui { 15 namespace ui {
16 class SystemUIResourceManager; 16 class ResourceManager;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 20
21 // |EdgeEffect| mirrors its Android counterpart, EdgeEffect.java. 21 // |EdgeEffect| mirrors its Android counterpart, EdgeEffect.java.
22 // Conscious tradeoffs were made to align this as closely as possible with the 22 // Conscious tradeoffs were made to align this as closely as possible with the
23 // the original Android java version. 23 // the original Android java version.
24 // All coordinates and dimensions are in device pixels. 24 // All coordinates and dimensions are in device pixels.
25 class EdgeEffect : public EdgeEffectBase { 25 class EdgeEffect : public EdgeEffectBase {
26 public: 26 public:
27 explicit EdgeEffect(ui::SystemUIResourceManager* resource_manager, 27 explicit EdgeEffect(ui::ResourceManager* resource_manager,
28 float device_scale_factor); 28 float device_scale_factor);
29 virtual ~EdgeEffect(); 29 virtual ~EdgeEffect();
30 30
31 virtual void Pull(base::TimeTicks current_time, 31 virtual void Pull(base::TimeTicks current_time,
32 float delta_distance, 32 float delta_distance,
33 float displacement) override; 33 float displacement) override;
34 virtual void Absorb(base::TimeTicks current_time, float velocity) override; 34 virtual void Absorb(base::TimeTicks current_time, float velocity) override;
35 virtual bool Update(base::TimeTicks current_time) override; 35 virtual bool Update(base::TimeTicks current_time) override;
36 virtual void Release(base::TimeTicks current_time) override; 36 virtual void Release(base::TimeTicks current_time) override;
37 37
38 virtual void Finish() override; 38 virtual void Finish() override;
39 virtual bool IsFinished() const override; 39 virtual bool IsFinished() const override;
40 40
41 virtual void ApplyToLayers(const gfx::SizeF& size, 41 virtual void ApplyToLayers(const gfx::SizeF& size,
42 const gfx::Transform& transform) override; 42 const gfx::Transform& transform) override;
43 virtual void SetParent(cc::Layer* parent) override; 43 virtual void SetParent(cc::Layer* parent) override;
44 44
45 // Thread-safe trigger to load resources. 45 // Thread-safe trigger to load resources.
46 static void PreloadResources(ui::SystemUIResourceManager* resource_manager); 46 static void PreloadResources(ui::ResourceManager* resource_manager);
47 47
48 private: 48 private:
49 class EffectLayer; 49 class EffectLayer;
50 scoped_ptr<EffectLayer> edge_; 50 scoped_ptr<EffectLayer> edge_;
51 scoped_ptr<EffectLayer> glow_; 51 scoped_ptr<EffectLayer> glow_;
52 52
53 float base_edge_height_; 53 float base_edge_height_;
54 float base_glow_height_; 54 float base_glow_height_;
55 55
56 float edge_alpha_; 56 float edge_alpha_;
(...skipping 16 matching lines...) Expand all
73 State state_; 73 State state_;
74 74
75 float pull_distance_; 75 float pull_distance_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(EdgeEffect); 77 DISALLOW_COPY_AND_ASSIGN(EdgeEffect);
78 }; 78 };
79 79
80 } // namespace content 80 } // namespace content
81 81
82 #endif // CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_ 82 #endif // CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_render_view.cc ('k') | content/browser/android/edge_effect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698