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

Side by Side Diff: ui/views/animation/ink_drop_host.h

Issue 1550443002: Pushed InkDropHost inheritence up to CustomButton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed whitespace in toolbar_action_view.h Created 4 years, 11 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_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 "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/geometry/point.h" 9 #include "ui/gfx/geometry/point.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
11 11
12 namespace ui { 12 namespace ui {
13 class Layer; 13 class Layer;
14 } // namespace ui 14 } // namespace ui
15 15
16 namespace views { 16 namespace views {
17 17
18 // Used by the InkDropAnimationController to add and remove the ink drop layers 18 // Used by the InkDropAnimationController to add and remove the ink drop layers
19 // from a host's layer tree. Typically the ink drop layer is added to a View's 19 // from a host's layer tree. Typically the ink drop layer is added to a View's
20 // layer but it can also be added to a View's ancestor layer. 20 // layer but it can also be added to a View's ancestor layer.
21 // 21 //
22 // Note: Some Views do not own a Layer, but you can use 22 // Note: Some Views do not own a Layer, but you can use
23 // View::SetLayer(new ui::Layer(ui::LAYER_NOT_DRAWN)) to force the View to have 23 // View::SetLayer(new ui::Layer(ui::LAYER_NOT_DRAWN)) to force the View to have
24 // a lightweight Layer that can parent the ink drop layer. 24 // a lightweight Layer that can parent the ink drop layer.
25 class VIEWS_EXPORT InkDropHost { 25 class VIEWS_EXPORT InkDropHost {
26 public: 26 public:
27 InkDropHost() {} 27 InkDropHost() {}
28 virtual ~InkDropHost() {} 28 virtual ~InkDropHost() {}
29 29
30 // Add the |ink_drop_layer| in to a visible layer tree. 30 // Adds the |ink_drop_layer| in to a visible layer tree.
31 virtual void AddInkDropLayer(ui::Layer* ink_drop_layer) = 0; 31 virtual void AddInkDropLayer(ui::Layer* ink_drop_layer) = 0;
32 32
33 // Removes |ink_drop_layer| from the layer tree. 33 // Removes |ink_drop_layer| from the layer tree.
34 virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0; 34 virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0;
35 35
36 // Returns the Point where the ink drop should be centered. 36 // Returns the Point where the ink drop should be centered.
37 // TODO(varkha): This should be moved to InkDropConsumer. 37 // TODO(varkha): This should be moved to InkDropConsumer.
38 virtual gfx::Point CalculateInkDropCenter() const = 0; 38 virtual gfx::Point CalculateInkDropCenter() const = 0;
39 39
40 private: 40 private:
41 DISALLOW_COPY_AND_ASSIGN(InkDropHost); 41 DISALLOW_COPY_AND_ASSIGN(InkDropHost);
42 }; 42 };
43 43
44 } // namespace views 44 } // namespace views
45 45
46 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_ 46 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698