| OLD | NEW |
| (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 #import "ios/chrome/browser/ui/bubble/bubble_view_controller.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
| 13 @interface BubbleViewController () |
| 14 @property(nonatomic, readonly) NSString* text; |
| 15 @property(nonatomic, readonly) BubbleArrowDirection arrowDirection; |
| 16 @property(nonatomic, readonly) BubbleAlignment alignment; |
| 17 @end |
| 18 |
| 19 @implementation BubbleViewController |
| 20 |
| 21 @synthesize text = _text; |
| 22 @synthesize arrowDirection = _arrowDirection; |
| 23 @synthesize alignment = _alignment; |
| 24 |
| 25 - (instancetype)initWithText:(NSString*)text |
| 26 direction:(BubbleArrowDirection)arrowDirection |
| 27 alignment:(BubbleAlignment)alignment { |
| 28 self = [super initWithNibName:nil bundle:nil]; |
| 29 _text = text; |
| 30 _arrowDirection = arrowDirection; |
| 31 _alignment = alignment; |
| 32 return self; |
| 33 } |
| 34 |
| 35 - (void)loadView { |
| 36 self.view = [[BubbleView alloc] initWithText:self.text |
| 37 direction:self.arrowDirection |
| 38 alignment:self.alignment]; |
| 39 } |
| 40 |
| 41 - (void)animateContentIn { |
| 42 NOTIMPLEMENTED(); |
| 43 } |
| 44 |
| 45 - (void)dismissAnimated:(BOOL)animated { |
| 46 NOTIMPLEMENTED(); |
| 47 } |
| 48 |
| 49 @end |
| OLD | NEW |