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

Side by Side Diff: ios/chrome/browser/ui/fancy_ui/primary_action_button.mm

Issue 2838213002: [ObjC ARC] Converts ios/chrome/browser/ui/fancy_ui:fancy_ui to ARC. (Closed)
Patch Set: Remove scoped object header Created 3 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #import "ios/chrome/browser/ui/fancy_ui/primary_action_button.h" 5 #import "ios/chrome/browser/ui/fancy_ui/primary_action_button.h"
6 6
7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" 7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 @implementation PrimaryActionButton 13 @implementation PrimaryActionButton
10 14
11 - (id)initWithFrame:(CGRect)frame { 15 - (id)initWithFrame:(CGRect)frame {
12 self = [super initWithFrame:frame]; 16 self = [super initWithFrame:frame];
13 if (self) 17 if (self)
14 [self initializeStyling]; 18 [self initializeStyling];
15 return self; 19 return self;
16 } 20 }
17 21
18 - (id)initWithCoder:(NSCoder*)aDecoder { 22 - (id)initWithCoder:(NSCoder*)aDecoder {
(...skipping 14 matching lines...) Expand all
33 self.inkColor = 37 self.inkColor =
34 [[[MDCPalette cr_bluePalette] tint300] colorWithAlphaComponent:0.5f]; 38 [[[MDCPalette cr_bluePalette] tint300] colorWithAlphaComponent:0.5f];
35 [self setBackgroundColor:[[MDCPalette cr_bluePalette] tint500] 39 [self setBackgroundColor:[[MDCPalette cr_bluePalette] tint500]
36 forState:UIControlStateNormal]; 40 forState:UIControlStateNormal];
37 [self setBackgroundColor:[UIColor colorWithWhite:0.6f alpha:1.0f] 41 [self setBackgroundColor:[UIColor colorWithWhite:0.6f alpha:1.0f]
38 forState:UIControlStateDisabled]; 42 forState:UIControlStateDisabled];
39 self.customTitleColor = [UIColor whiteColor]; 43 self.customTitleColor = [UIColor whiteColor];
40 } 44 }
41 45
42 @end 46 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698