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

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

Issue 2001843002: Use ink drop hover for focus states on toolbar buttons and location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout 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 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_BUTTON_INK_DROP_DELEGATE_H_ 5 #ifndef UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
6 #define UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ 6 #define UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 void set_last_ink_drop_location(const gfx::Point& point) { 36 void set_last_ink_drop_location(const gfx::Point& point) {
37 last_ink_drop_location_ = point; 37 last_ink_drop_location_ = point;
38 } 38 }
39 39
40 // InkDropDelegate: 40 // InkDropDelegate:
41 void OnAction(InkDropState state) override; 41 void OnAction(InkDropState state) override;
42 void SnapToActivated() override; 42 void SnapToActivated() override;
43 void SetHovered(bool is_hovered) override; 43 void SetHovered(bool is_hovered) override;
44 InkDropState GetTargetInkDropState() const override; 44 InkDropState GetTargetInkDropState() const override;
45 InkDrop* GetInkDrop() override;
45 46
46 // ui::EventHandler: 47 // ui::EventHandler:
47 void OnMouseEvent(ui::MouseEvent* event) override; 48 void OnMouseEvent(ui::MouseEvent* event) override;
48 void OnGestureEvent(ui::GestureEvent* event) override; 49 void OnGestureEvent(ui::GestureEvent* event) override;
49 50
50 private: 51 private:
51 // An instance of ScopedTargetHandler allowing |this| to handle events. 52 // An instance of ScopedTargetHandler allowing |this| to handle events.
52 std::unique_ptr<ui::ScopedTargetHandler> target_handler_; 53 std::unique_ptr<ui::ScopedTargetHandler> target_handler_;
53 54
54 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. 55 // Parent InkDropHost (typically a View) that hosts the ink ripple animations.
55 InkDropHost* ink_drop_host_; 56 InkDropHost* ink_drop_host_;
56 57
57 // Location of the last ink drop triggering event in coordinate system of the 58 // Location of the last ink drop triggering event in coordinate system of the
58 // ctor argument |view|. 59 // ctor argument |view|.
59 gfx::Point last_ink_drop_location_; 60 gfx::Point last_ink_drop_location_;
60 61
61 // Animation controller for the ink drop ripple effect. 62 // Animation controller for the ink drop ripple effect.
62 std::unique_ptr<InkDrop> ink_drop_; 63 std::unique_ptr<InkDrop> ink_drop_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate); 65 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate);
65 }; 66 };
66 67
67 } // namespace views 68 } // namespace views
68 69
69 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ 70 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button.cc ('k') | ui/views/animation/button_ink_drop_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698