• bruthig's avatar
    Added material design mouse hover feedback support. · c657e3be
    bruthig authored
    Overview of changes:
    - Added InkDropHover class that manages animating a Layer to show
      visual feedback for mouse hover.
    - Wired the InkDropHover class in to the InkDropAnimationControllerImpl.
    - Wired some Views up to use the hover animation.
    
    Overview of Hover behavior:
    - Hover will fade in when mouse enters an enabled View
    - Hover will fade out instantly if an ink drop animation is initiated.
    - Hover will fade back in, after a delay, when an ink drop animation
      completes and the mouse is still hovering the View.
    
    TEST=InkDropHoverTest.InitialStateAfterConstruction
    TEST=InkDropHoverTest.IsHoveredStateTransitions
    TEST=InkDropAnimationControllerFactoryTest.HoveredStateAfterAnimateToState
    TEST=HoveredStateAfterHoverTimerFiresWhenHostIsHovered.SetHoveredIsHovered
    TEST=HoveredStateAfterHoverTimerFiresWhenHostIsHovered.HoveredStateAfterHoverTimerFiresWhenHostIsHovered
    TEST=HoveredStateAfterHoverTimerFiresWhenHostIsHovered.HoveredStateAfterHoverTimerFiresWhenHostIsNotHovered
    
    BUG=537238, 518919
    
    Review URL: https://codereview.chromium.org/1390113006
    
    Cr-Commit-Position: refs/heads/master@{#371511}
    c657e3be
ink_drop_animation_controller_impl.cc 7.77 KB