OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ios/chrome/browser/ui/tab_switcher/tab_switcher_button.h" |
| 6 |
| 7 #include "base/mac/scoped_nsobject.h" |
| 8 #import "ios/third_party/material_components_ios/src/components/Ink/src/Material
Ink.h" |
| 9 |
| 10 @interface TabSwitcherButton () { |
| 11 base::scoped_nsobject<MDCInkTouchController> _inkTouchController; |
| 12 } |
| 13 @end |
| 14 |
| 15 @implementation TabSwitcherButton |
| 16 |
| 17 - (instancetype)initWithFrame:(CGRect)frame { |
| 18 self = [super initWithFrame:frame]; |
| 19 if (self) { |
| 20 _inkTouchController.reset( |
| 21 [[MDCInkTouchController alloc] initWithView:self]); |
| 22 [_inkTouchController addInkView]; |
| 23 // TODO(crbug.com/606807): Adjust the desired ink color. |
| 24 [_inkTouchController defaultInkView].inkColor = |
| 25 [[UIColor whiteColor] colorWithAlphaComponent:0.4]; |
| 26 } |
| 27 return self; |
| 28 } |
| 29 |
| 30 - (void)resetState { |
| 31 [_inkTouchController cancelInkTouchProcessing]; |
| 32 } |
| 33 |
| 34 @end |
OLD | NEW |