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

Unified Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_button.mm

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/tab_switcher/tab_switcher_button.mm
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_button.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_button.mm
new file mode 100644
index 0000000000000000000000000000000000000000..fbb1adaf77edb0820277b5aa4526851f1874b5cf
--- /dev/null
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_button.mm
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ios/chrome/browser/ui/tab_switcher/tab_switcher_button.h"
+
+#include "base/mac/scoped_nsobject.h"
+#import "ios/third_party/material_components_ios/src/components/Ink/src/MaterialInk.h"
+
+@interface TabSwitcherButton () {
+ base::scoped_nsobject<MDCInkTouchController> _inkTouchController;
+}
+@end
+
+@implementation TabSwitcherButton
+
+- (instancetype)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ _inkTouchController.reset(
+ [[MDCInkTouchController alloc] initWithView:self]);
+ [_inkTouchController addInkView];
+ // TODO(crbug.com/606807): Adjust the desired ink color.
+ [_inkTouchController defaultInkView].inkColor =
+ [[UIColor whiteColor] colorWithAlphaComponent:0.4];
+ }
+ return self;
+}
+
+- (void)resetState {
+ [_inkTouchController cancelInkTouchProcessing];
+}
+
+@end
« no previous file with comments | « ios/chrome/browser/ui/tab_switcher/tab_switcher_button.h ('k') | ios/chrome/browser/ui/tab_switcher/tab_switcher_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698