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

Side by Side Diff: ui/views/animation/test/test_ink_drop_host.cc

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: sky review Created 4 years, 9 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 #include "ui/gfx/geometry/size.h" 5 #include "ui/gfx/geometry/size.h"
6 #include "ui/views/animation/ink_drop_hover.h" 6 #include "ui/views/animation/ink_drop_hover.h"
7 #include "ui/views/animation/square_ink_drop_animation.h" 7 #include "ui/views/animation/square_ink_drop_animation.h"
8 #include "ui/views/animation/test/test_ink_drop_host.h" 8 #include "ui/views/animation/test/test_ink_drop_host.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 TestInkDropHost::TestInkDropHost() 12 TestInkDropHost::TestInkDropHost()
13 : num_ink_drop_layers_(0), should_show_hover_(false) {} 13 : num_ink_drop_layers_(0), should_show_hover_(false) {}
14 14
15 TestInkDropHost::~TestInkDropHost() {} 15 TestInkDropHost::~TestInkDropHost() {}
16 16
17 void TestInkDropHost::AddInkDropLayer(ui::Layer* ink_drop_layer) { 17 void TestInkDropHost::AddInkDropLayer(ui::Layer* ink_drop_layer) {
18 ++num_ink_drop_layers_; 18 ++num_ink_drop_layers_;
19 } 19 }
20 20
21 void TestInkDropHost::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { 21 void TestInkDropHost::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
22 --num_ink_drop_layers_; 22 --num_ink_drop_layers_;
23 } 23 }
24 24
25 scoped_ptr<InkDropAnimation> TestInkDropHost::CreateInkDropAnimation() const { 25 scoped_ptr<InkDropAnimation> TestInkDropHost::CreateInkDropAnimation() const {
26 gfx::Size size(10, 10); 26 gfx::Size size(10, 10);
27 return make_scoped_ptr(new SquareInkDropAnimation(size, 5, size, 5)); 27 return make_scoped_ptr(new SquareInkDropAnimation(
28 size, 5, size, 5, gfx::Point(), SK_ColorBLACK));
28 } 29 }
29 30
30 scoped_ptr<InkDropHover> TestInkDropHost::CreateInkDropHover() const { 31 scoped_ptr<InkDropHover> TestInkDropHost::CreateInkDropHover() const {
31 return should_show_hover_ 32 return should_show_hover_
32 ? make_scoped_ptr(new InkDropHover(gfx::Size(10, 10), 4)) 33 ? make_scoped_ptr(new InkDropHover(gfx::Size(10, 10), 4,
34 gfx::Point(), SK_ColorBLACK))
33 : nullptr; 35 : nullptr;
34 } 36 }
35 37
36 } // namespace views 38 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/square_ink_drop_animation_unittest.cc ('k') | ui/views/controls/button/custom_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698