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

Unified Diff: ios/chrome/browser/ui/bubble/bubble_view.mm

Issue 2964233002: [ios] BubbleViewController and BubbleView stubs. (Closed)
Patch Set: Rename directory, add unit test dep, other comments 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698