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

Unified Diff: ui/views/animation/ink_drop_host.h

Issue 1280953003: Enhance the material design ripple API so the ripple's state can be controlled by it's owning View. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed pkasting@'s comments from patch set 11 Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/animation/ink_drop_host.h
diff --git a/ui/views/animation/ink_drop_host.h b/ui/views/animation/ink_drop_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..e1bea680f96273b1e4e5df7204d42f45d9b3933a
--- /dev/null
+++ b/ui/views/animation/ink_drop_host.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+#define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+
+#include "base/macros.h"
+#include "ui/views/views_export.h"
+
+namespace ui {
+class Layer;
+} // namespace ui
+
+namespace views {
+
+// Used by the InkDropAnimationController to add and remove the ink drop layers
+// from a host's layer tree.
+//
+// Note: Some Views do not own a Layer, but you can use
+// View::SetPaintToLayer(true) to force the View to have a Layer.
sadrul 2015/08/17 14:33:06 Using View::SetPaintToLayer(true) should not be th
bruthig 2015/08/17 17:43:39 Done.
+class VIEWS_EXPORT InkDropHost {
+ public:
+ InkDropHost() {}
+ virtual ~InkDropHost() {}
+
+ // Add the |ink_drop_layer| in to a visible layer tree.
+ virtual void AddInkDropLayer(ui::Layer* ink_drop_layer) = 0;
+
+ // Removes |ink_drop_layer| from the layer tree.
+ virtual void RemoveInkDropLayer(ui::Layer* ink_drop_layer) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(InkDropHost);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698