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

Unified Diff: ui/views/animation/test/test_ink_drop.h

Issue 2041033002: Moved ButtonInkDropDelegate logic into InkDropHostView and deleted InkDropDelegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed merge conflict in custom_button.cc Created 4 years, 6 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
« no previous file with comments | « ui/views/animation/test/ink_drop_host_view_test_api.cc ('k') | ui/views/animation/test/test_ink_drop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/test/test_ink_drop.h
diff --git a/ui/views/animation/test/test_ink_drop.h b/ui/views/animation/test/test_ink_drop.h
new file mode 100644
index 0000000000000000000000000000000000000000..c34b79b732a68e23cacba4d7a4efb79de7bfe442
--- /dev/null
+++ b/ui/views/animation/test/test_ink_drop.h
@@ -0,0 +1,40 @@
+// Copyright 2016 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_TEST_INK_DROP_H_
+#define UI_VIEWS_ANIMATION_TEST_INK_DROP_H_
+
+#include "ui/views/animation/ink_drop.h"
+
+namespace views {
+namespace test {
+
+// A InkDrop test double that tracks the last requested state changes.
+//
+// NOTE: This does not auto transition between any of the InkDropStates.
+//
+class TestInkDrop : public InkDrop {
+ public:
+ TestInkDrop();
+ ~TestInkDrop() override;
+
+ bool is_hovered() const { return is_hovered_; }
+
+ InkDropState GetTargetInkDropState() const override;
+ void AnimateToState(InkDropState ink_drop_state) override;
+ void SnapToActivated() override;
+ void SetHovered(bool is_hovered) override;
+ void SetFocused(bool is_focused) override;
+
+ private:
+ InkDropState state_;
+ bool is_hovered_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestInkDrop);
+};
+
+} // namespace test
+} // namespace views
+
+#endif // UI_VIEWS_ANIMATION_TEST_INK_DROP_H_
« no previous file with comments | « ui/views/animation/test/ink_drop_host_view_test_api.cc ('k') | ui/views/animation/test/test_ink_drop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698