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

Side by Side Diff: ios/chrome/today_extension/notification_center_button.h

Issue 2586713002: Upstream code and resources for Chrome on iOS extensions. (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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_TODAY_EXTENSION_NOTIFICATION_CENTER_BUTTON_H_
6 #define IOS_CHROME_TODAY_EXTENSION_NOTIFICATION_CENTER_BUTTON_H_
7
8 #import <UIKit/UIKit.h>
9
10 #import "ios/chrome/today_extension/transparent_button.h"
11
12 // A button with a separated view background. This is needed as background
13 // objects in notification center must be subviews of a UIVisualEffectView.
14 @interface NotificationCenterButton : TransparentButton
15
16 // Designated initializer.
17 // Initializes a button with |title|, normal icon with asset named |icon|,
18 // calling [target action] on UIControlEventTouchUpInside
19 // event. |backgroundColor|, |inkColor|, |titleColor| are respectively the
20 // background inactive color, the background pressed color, and the title color.
21 - (instancetype)initWithTitle:(NSString*)title
22 icon:(NSString*)icon
23 target:(id)target
24 action:(SEL)action
25 backgroundColor:(UIColor*)backgroundColor
26 inkColor:(UIColor*)inkColor
27 titleColor:(UIColor*)titleColor;
28
29 // Sets the different spaces of the button.
30 // |separator| is the distance between the left of the icon and the left of the
31 // text (in LTR),
32 // |frontShift| shifts the center of the button to the front by |frontShift|/2,
33 // (front is left in LTR, right in RTL).
34 // |horizontalPadding| sets the left and right paddings,
35 // |verticalPadding| sets the top and bottom paddings.
36 - (void)setButtonSpacesSeparator:(const CGFloat)separator
37 frontShift:(const CGFloat)frontShift
38 horizontalPadding:(const CGFloat)horizontalPadding
39 verticalPadding:(const CGFloat)verticalPadding;
40
41 @end
42
43 #endif // IOS_CHROME_TODAY_EXTENSION_NOTIFICATION_CENTER_BUTTON_H_
OLDNEW
« no previous file with comments | « ios/chrome/today_extension/lock_screen_state.mm ('k') | ios/chrome/today_extension/notification_center_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698