Chromium Code Reviews| Index: ios/chrome/browser/ui/bubble/bubble_view.mm |
| diff --git a/ios/chrome/browser/ui/bubble/bubble_view.mm b/ios/chrome/browser/ui/bubble/bubble_view.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4ac773eb71fd72df192614a22bb3914f118889c0 |
| --- /dev/null |
| +++ b/ios/chrome/browser/ui/bubble/bubble_view.mm |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2017 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. |
| + |
| +#import "ios/chrome/browser/ui/bubble/bubble_view.h" |
| + |
| +#include "base/logging.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +@interface BubbleView () |
| +// Label containing the text displayed on the bubble. |
| +@property(nonatomic, readonly, weak) UILabel* label; |
|
edchin
2017/07/08 07:58:26
Please remove the "readonly" attribute here.
I pr
helenlyang
2017/07/10 17:15:23
Done.
|
| +@end |
| + |
| +@implementation BubbleView |
| + |
| +@synthesize label = _label; |
| + |
| +- (instancetype)initWithText:(NSString*)text |
| + direction:(BubbleArrowDirection)arrowDirection |
| + alignment:(BubbleAlignment)alignment { |
| + self = [super initWithFrame:CGRectZero]; |
| + return self; |
| +} |
| + |
| +#pragma mark - UIView overrides |
| + |
| +// Overriding sizeThatFits allows BubbleViewController and |
|
gchatz
2017/07/08 00:46:22
I think the standard practice is to use an imperat
helenlyang
2017/07/10 17:15:22
Done.
|
| +// BubbleViewController's parent to appropriately set the BubbleView's size. |
|
edchin
2017/07/08 07:58:26
This class should not know about BubbleViewControl
helenlyang
2017/07/10 17:15:23
Done.
|
| +- (CGSize)sizeThatFits:(CGSize)size { |
| + NOTIMPLEMENTED(); |
| + return CGSizeZero; |
| +} |
| + |
| +@end |