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

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

Issue 2964233002: [ios] BubbleViewController and BubbleView stubs. (Closed)
Patch Set: Add initial values for enums 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_controller.mm
diff --git a/ios/chrome/browser/ui/bubble/bubble_view_controller.mm b/ios/chrome/browser/ui/bubble/bubble_view_controller.mm
new file mode 100644
index 0000000000000000000000000000000000000000..be4eb9c6d66c2e94fff102c212a7db3a9e3714d3
--- /dev/null
+++ b/ios/chrome/browser/ui/bubble/bubble_view_controller.mm
@@ -0,0 +1,49 @@
+// 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_controller.h"
+
+#include "base/logging.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@interface BubbleViewController ()
+@property(nonatomic, readonly) NSString* text;
+@property(nonatomic, readonly) BubbleArrowDirection arrowDirection;
+@property(nonatomic, readonly) BubbleAlignment alignment;
+@end
+
+@implementation BubbleViewController
+
+@synthesize text = _text;
+@synthesize arrowDirection = _arrowDirection;
+@synthesize alignment = _alignment;
+
+- (instancetype)initWithText:(NSString*)text
+ direction:(BubbleArrowDirection)arrowDirection
+ alignment:(BubbleAlignment)alignment {
+ self = [super initWithNibName:nil bundle:nil];
+ _text = text;
+ _arrowDirection = arrowDirection;
+ _alignment = alignment;
+ return self;
+}
+
+- (void)loadView {
+ self.view = [[BubbleView alloc] initWithText:self.text
+ direction:self.arrowDirection
+ alignment:self.alignment];
+}
+
+- (void)animateContentIn {
+ NOTIMPLEMENTED();
+}
+
+- (void)dismissAnimated:(BOOL)animated {
+ NOTIMPLEMENTED();
+}
+
+@end
« no previous file with comments | « ios/chrome/browser/ui/bubble/bubble_view_controller.h ('k') | ios/chrome/browser/ui/bubble/bubble_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698