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

Side by Side Diff: ios/chrome/browser/ui/bubble/bubble_view.h

Issue 2964233002: [ios] BubbleViewController and BubbleView stubs. (Closed)
Patch Set: Move view initialization to loadView, rebase Created 3 years, 5 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
« no previous file with comments | « ios/chrome/browser/ui/bubble/OWNERS ('k') | ios/chrome/browser/ui/bubble/bubble_view.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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_BROWSER_UI_BUBBLE_BUBBLE_VIEW_H_
6 #define IOS_CHROME_BROWSER_UI_BUBBLE_BUBBLE_VIEW_H_
7
8 #import <UIKit/UIKit.h>
9
10 // Direction for the bubble to point.
11 typedef NS_ENUM(NSInteger, BubbleArrowDirection) {
12 // Bubble is below the target UI element and the arrow is pointing up.
13 BubbleArrowDirectionUp,
marq (ping after 24h) 2017/07/11 12:21:26 nit: Provide an initial value for enums: BubbleAr
14 // Bubble is above the target UI element and the arrow is pointing down.
15 BubbleArrowDirectionDown,
16 };
17
18 // Alignment of the bubble relative to the arrow.
19 typedef NS_ENUM(NSInteger, BubbleAlignment) {
20 BubbleAlignmentLeading,
21 BubbleAlignmentCenter,
22 BubbleAlignmentTrailing,
23 };
24
25 // Speech bubble shaped view that displays a message.
26 @interface BubbleView : UIView
27
28 // Initializes with the given text, direction that the bubble should point, and
29 // alignment of the bubble.
30 - (instancetype)initWithText:(NSString*)text
31 direction:(BubbleArrowDirection)arrowDirection
32 alignment:(BubbleAlignment)alignment
33 NS_DESIGNATED_INITIALIZER;
34
35 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
36
37 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
38
39 - (instancetype)init NS_UNAVAILABLE;
40
41 @end
42
43 #endif // IOS_CHROME_BROWSER_UI_BUBBLE_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/bubble/OWNERS ('k') | ios/chrome/browser/ui/bubble/bubble_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698