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

Unified Diff: ui/views/animation/ink_drop_animation_controller_factory.cc

Issue 1298513003: Implemented prototype for new ink drop specs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Working prototype. 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_animation_controller_factory.cc
diff --git a/ui/views/animation/ink_drop_animation_controller_factory.cc b/ui/views/animation/ink_drop_animation_controller_factory.cc
index 747561dc42f45a0df7f511c95fd17a86889e2bf0..6cee667612a8b4ea92cf21f54e431e5f882640fc 100644
--- a/ui/views/animation/ink_drop_animation_controller_factory.cc
+++ b/ui/views/animation/ink_drop_animation_controller_factory.cc
@@ -24,16 +24,17 @@ class VIEWS_EXPORT InkDropAnimationControllerStub
~InkDropAnimationControllerStub() override;
// InkDropAnimationController:
+ InkDropState GetInkDropState() const override;
void AnimateToState(InkDropState state) override;
- void SetInkDropSize(const gfx::Size& size) override;
- gfx::Rect GetInkDropBounds() const override;
- void SetInkDropBounds(const gfx::Rect& bounds) override;
+ gfx::Size GetInkDropLargeSize() const override;
+ void SetInkDropSize(const gfx::Size& large_size,
+ int large_corner_radius,
+ const gfx::Size& small_size,
+ int small_corner_radius) override;
+ gfx::Point GetInkDropOrigin() const override;
+ void SetInkDropOrigin(const gfx::Point& origin) override;
private:
- // The bounds of the ink drop layers. Defined in the coordinate space of the
- // parent ui::Layer that the ink drop layers were added to.
- gfx::Rect ink_drop_bounds_;
-
DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerStub);
};
@@ -42,20 +43,28 @@ InkDropAnimationControllerStub::InkDropAnimationControllerStub(
InkDropAnimationControllerStub::~InkDropAnimationControllerStub() {}
+InkDropState InkDropAnimationControllerStub::GetInkDropState() const {
+ return InkDropState::HIDDEN;
+}
+
void InkDropAnimationControllerStub::AnimateToState(InkDropState state) {}
-void InkDropAnimationControllerStub::SetInkDropSize(const gfx::Size& size) {
- ink_drop_bounds_.set_size(size);
+gfx::Size InkDropAnimationControllerStub::GetInkDropLargeSize() const {
+ return gfx::Size();
}
-gfx::Rect InkDropAnimationControllerStub::GetInkDropBounds() const {
- return ink_drop_bounds_;
-}
+void InkDropAnimationControllerStub::SetInkDropSize(const gfx::Size& large_size,
+ int large_corner_radius,
+ const gfx::Size& small_size,
+ int small_corner_radius) {}
-void InkDropAnimationControllerStub::SetInkDropBounds(const gfx::Rect& bounds) {
- ink_drop_bounds_ = bounds;
+gfx::Point InkDropAnimationControllerStub::GetInkDropOrigin() const {
+ return gfx::Point();
}
+void InkDropAnimationControllerStub::SetInkDropOrigin(
+ const gfx::Point& origin) {}
+
} // namespace
InkDropAnimationControllerFactory::InkDropAnimationControllerFactory() {}
@@ -66,6 +75,8 @@ scoped_ptr<InkDropAnimationController>
InkDropAnimationControllerFactory::CreateInkDropAnimationController(
InkDropHost* ink_drop_host) {
#if defined(OS_CHROMEOS)
+ // The ink drop animation is only targeted at ChromeOS because there is
+ // concern it will conflict with OS level touch feedback in a bad way.
tdanderson 2015/08/19 22:11:19 Since this is behind a flag anyway, I don't think
bruthig 2015/08/20 20:35:35 This was the request of the designers. If we do c
if (ui::MaterialDesignController::IsModeMaterial()) {
return scoped_ptr<InkDropAnimationController>(
new InkDropAnimationControllerImpl(ink_drop_host));

Powered by Google App Engine
This is Rietveld 408576698