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

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

Issue 1390113006: Added material design mouse hover feedback support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed the InkDropAnimationControllerImpl to destroy its timer when not running. Created 4 years, 10 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/views/animation/ink_drop_host.h" 9 #include "ui/views/animation/ink_drop_host.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 // A non-functional implementation of an InkDropHost that can be used during 13 // A non-functional implementation of an InkDropHost that can be used during
14 // tests. Tracks the number of hosted ink drop layers. 14 // tests. Tracks the number of hosted ink drop layers.
15 class TestInkDropHost : public InkDropHost { 15 class TestInkDropHost : public InkDropHost {
16 public: 16 public:
17 TestInkDropHost(); 17 TestInkDropHost();
18 ~TestInkDropHost() override; 18 ~TestInkDropHost() override;
19 19
20 int num_ink_drop_layers() const { return num_ink_drop_layers_; } 20 int num_ink_drop_layers() const { return num_ink_drop_layers_; }
21 21
22 void set_should_show_hover(bool should_show_hover) {
23 should_show_hover_ = should_show_hover;
24 }
25
22 // TestInkDropHost: 26 // TestInkDropHost:
23 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; 27 void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
24 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; 28 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
25 gfx::Point CalculateInkDropCenter() const override; 29 gfx::Point CalculateInkDropCenter() const override;
30 bool ShouldShowInkDropHover() const override;
26 31
27 private: 32 private:
28 int num_ink_drop_layers_; 33 int num_ink_drop_layers_;
29 34
35 bool should_show_hover_;
36
30 DISALLOW_COPY_AND_ASSIGN(TestInkDropHost); 37 DISALLOW_COPY_AND_ASSIGN(TestInkDropHost);
31 }; 38 };
32 39
33 } // namespace views 40 } // namespace views
34 41
35 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_ 42 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_painted_layer_delegates.cc ('k') | ui/views/animation/test/test_ink_drop_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698