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

Side by Side Diff: ui/views/animation/test/test_ink_drop_host.h

Issue 2396133005: [ash-md] Animates ToggleButton highlight to move it in sync with the thumb (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_ 5 #ifndef UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_
6 #define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_ 6 #define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/geometry/vector2d.h"
9 #include "ui/views/animation/ink_drop_host.h" 10 #include "ui/views/animation/ink_drop_host.h"
10 11
11 namespace views { 12 namespace views {
12 13
13 // A non-functional implementation of an InkDropHost that can be used during 14 // A non-functional implementation of an InkDropHost that can be used during
14 // tests. Tracks the number of hosted ink drop layers. 15 // tests. Tracks the number of hosted ink drop layers.
15 class TestInkDropHost : public InkDropHost { 16 class TestInkDropHost : public InkDropHost {
16 public: 17 public:
17 TestInkDropHost(); 18 TestInkDropHost();
18 ~TestInkDropHost() override; 19 ~TestInkDropHost() override;
(...skipping 10 matching lines...) Expand all
29 30
30 void set_ripple_overrides_highlight(bool overrides_highlight) { 31 void set_ripple_overrides_highlight(bool overrides_highlight) {
31 ripple_overrides_highlight_ = overrides_highlight; 32 ripple_overrides_highlight_ = overrides_highlight;
32 } 33 }
33 34
34 // TestInkDropHost: 35 // TestInkDropHost:
35 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; 36 void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
36 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; 37 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
37 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override; 38 std::unique_ptr<InkDropRipple> CreateInkDropRipple() const override;
38 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override; 39 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override;
40 void OffsetInkDropRipple(const gfx::Vector2d& offset) override;
39 41
40 private: 42 private:
41 int num_ink_drop_layers_; 43 int num_ink_drop_layers_;
42 44
43 bool should_show_highlight_; 45 bool should_show_highlight_;
44 46
45 bool ripple_overrides_highlight_; 47 bool ripple_overrides_highlight_;
46 48
47 // When true, the InkDropRipple/InkDropHighlight instances will have their 49 // When true, the InkDropRipple/InkDropHighlight instances will have their
48 // timers disabled after creation. 50 // timers disabled after creation.
49 bool disable_timers_for_test_; 51 bool disable_timers_for_test_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(TestInkDropHost); 53 DISALLOW_COPY_AND_ASSIGN(TestInkDropHost);
52 }; 54 };
53 55
54 } // namespace views 56 } // namespace views
55 57
56 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_ 58 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698