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

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

Issue 1724963002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review and format Created 4 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_INK_DROP_HOST_VIEW_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/views/animation/ink_drop_host.h" 10 #include "ui/views/animation/ink_drop_host.h"
10 #include "ui/views/view.h" 11 #include "ui/views/view.h"
11 12
12 namespace views { 13 namespace views {
13 14
14 class InkDropAnimation; 15 class InkDropAnimation;
15 class InkDropHover; 16 class InkDropHover;
16 17
17 // A view that provides InkDropHost functionality. 18 // A view that provides InkDropHost functionality.
18 class VIEWS_EXPORT InkDropHostView : public views::View, public InkDropHost { 19 class VIEWS_EXPORT InkDropHostView : public views::View, public InkDropHost {
19 public: 20 public:
20 InkDropHostView(); 21 InkDropHostView();
21 ~InkDropHostView() override; 22 ~InkDropHostView() override;
22 23
23 // Overridden from views::InkDropHost: 24 // Overridden from views::InkDropHost:
24 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; 25 void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
25 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; 26 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
26 scoped_ptr<InkDropAnimation> CreateInkDropAnimation() const override; 27 scoped_ptr<InkDropAnimation> CreateInkDropAnimation() const override;
27 scoped_ptr<InkDropHover> CreateInkDropHover() const override; 28 scoped_ptr<InkDropHover> CreateInkDropHover() const override;
28 29
29 protected: 30 protected:
30 // Overrideable methods to allow views to provide minor tweaks to the default 31 // Overrideable methods to allow views to provide minor tweaks to the default
31 // ink drop. 32 // ink drop.
32 virtual gfx::Point GetInkDropCenter() const; 33 virtual gfx::Point GetInkDropCenter() const;
34 virtual SkColor GetInkDropBaseColor() const;
sky 2016/02/25 00:38:32 As your implementation has a NOTREACHED, is there
Evan Stade 2016/02/25 01:34:28 yes, originally it was pure virtual, but there was
33 35
34 private: 36 private:
35 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); 37 DISALLOW_COPY_AND_ASSIGN(InkDropHostView);
36 }; 38 };
37 } 39 }
38 40
39 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ 41 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698