Chromium Code Reviews| 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_INK_DROP_HOST_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 public: | 32 public: |
| 33 InkDropHost() {} | 33 InkDropHost() {} |
| 34 virtual ~InkDropHost() {} | 34 virtual ~InkDropHost() {} |
| 35 | 35 |
| 36 // Adds the |ink_drop_layer| in to a visible layer tree. | 36 // Adds the |ink_drop_layer| in to a visible layer tree. |
| 37 virtual void AddInkDropLayer(ui::Layer* ink_drop_layer) = 0; | 37 virtual void AddInkDropLayer(ui::Layer* ink_drop_layer) = 0; |
| 38 | 38 |
| 39 // Removes |ink_drop_layer| from the layer tree. | 39 // Removes |ink_drop_layer| from the layer tree. |
| 40 virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0; | 40 virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0; |
| 41 | 41 |
| 42 // Called when an ink drop has started to animate. | |
| 43 virtual void InkDropAnimationStarted() {} | |
|
bruthig
2017/03/08 18:58:24
To enable compos-ability this should be a function
spqchan
2017/03/14 00:07:52
Done, create a InkDropObserver class
| |
| 44 | |
| 42 // Returns a configured InkDrop. In general subclasses will return an | 45 // Returns a configured InkDrop. In general subclasses will return an |
| 43 // InkDropImpl instance that will use the CreateInkDropRipple() and | 46 // InkDropImpl instance that will use the CreateInkDropRipple() and |
| 44 // CreateInkDropHighlight() methods to create the visual effects. | 47 // CreateInkDropHighlight() methods to create the visual effects. |
| 45 // | 48 // |
| 46 // Subclasses should override this if they need to configure any properties | 49 // Subclasses should override this if they need to configure any properties |
| 47 // specific to the InkDrop instance. e.g. the AutoHighlightMode of an | 50 // specific to the InkDrop instance. e.g. the AutoHighlightMode of an |
| 48 // InkDropImpl instance. | 51 // InkDropImpl instance. |
| 49 virtual std::unique_ptr<InkDrop> CreateInkDrop() = 0; | 52 virtual std::unique_ptr<InkDrop> CreateInkDrop() = 0; |
| 50 | 53 |
| 51 // Creates and returns the visual effect used for press. Used by InkDropImpl | 54 // Creates and returns the visual effect used for press. Used by InkDropImpl |
| 52 // instances. | 55 // instances. |
| 53 virtual std::unique_ptr<InkDropRipple> CreateInkDropRipple() const = 0; | 56 virtual std::unique_ptr<InkDropRipple> CreateInkDropRipple() const = 0; |
| 54 | 57 |
| 55 // Creates and returns the visual effect used for hover and focus. Used by | 58 // Creates and returns the visual effect used for hover and focus. Used by |
| 56 // InkDropImpl instances. | 59 // InkDropImpl instances. |
| 57 virtual std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const = 0; | 60 virtual std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const = 0; |
| 58 | 61 |
| 59 private: | 62 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(InkDropHost); | 63 DISALLOW_COPY_AND_ASSIGN(InkDropHost); |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 } // namespace views | 66 } // namespace views |
| 64 | 67 |
| 65 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ | 68 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ |
| OLD | NEW |