OLD | NEW |
---|---|
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, dummy implementation of an InkDropHost that can be used as | 13 // A non-functional, implementation of an InkDropHost that can be used as during |
Peter Kasting
2015/12/18 18:44:02
Nit: While here: Remove comma; remove "as"
bruthig
2015/12/21 16:54:34
Done.
| |
14 // a placeholder during tests. | 14 // tests. Tracks the current number of ink drop layers being hosted. |
Peter Kasting
2015/12/18 18:44:02
Nit: "Tracks the number of hosted ink drop layers"
bruthig
2015/12/21 16:54:34
Done.
| |
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 current_number_of_ink_drop_layers() const { | |
Peter Kasting
2015/12/18 18:44:02
Nit: I would name all these like "num_ink_drop_lay
bruthig
2015/12/21 16:54:34
Done.
| |
21 return current_number_of_ink_drop_layers_; | |
22 } | |
23 | |
20 // TestInkDropHost: | 24 // TestInkDropHost: |
21 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 25 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
22 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 26 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
23 gfx::Point CalculateInkDropCenter() const override; | 27 gfx::Point CalculateInkDropCenter() const override; |
24 | 28 |
25 private: | 29 private: |
30 // The number of ink drop layers currently hosted by this. | |
Peter Kasting
2015/12/18 18:44:02
Nit: Comment adds nothing to the code, remove.
bruthig
2015/12/21 16:54:34
Done.
| |
31 int current_number_of_ink_drop_layers_; | |
32 | |
26 DISALLOW_COPY_AND_ASSIGN(TestInkDropHost); | 33 DISALLOW_COPY_AND_ASSIGN(TestInkDropHost); |
27 }; | 34 }; |
28 | 35 |
29 } // namespace views | 36 } // namespace views |
30 | 37 |
31 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_ | 38 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_ |
OLD | NEW |