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

Unified Diff: ios/chrome/proto_today_extension/widget_view_controller.mm

Issue 2632333002: Add a prototype today extension behind gn flag (Closed)
Patch Set: arc and comments Created 3 years, 11 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/proto_today_extension/widget_view_controller.mm
diff --git a/ios/chrome/proto_today_extension/widget_view_controller.mm b/ios/chrome/proto_today_extension/widget_view_controller.mm
new file mode 100644
index 0000000000000000000000000000000000000000..545060753fef1568258de02c7694300bda1b0c05
--- /dev/null
+++ b/ios/chrome/proto_today_extension/widget_view_controller.mm
@@ -0,0 +1,29 @@
+// 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/proto_today_extension/widget_view_controller.h"
+
+#import <NotificationCenter/NotificationCenter.h>
+
+#import "ios/chrome/proto_today_extension/widget_view.h"
+
+@interface WidgetViewController ()
sdefresne 2017/01/17 17:47:42 Please put ARC guard: #if !defined(__has_feature)
lody 2017/01/18 10:48:41 Done.
+@property(nonatomic, weak) WidgetView* widgetView;
+@end
+
+@implementation WidgetViewController
+
+@synthesize widgetView = _widgetView;
+
+#pragma mark - UIViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ WidgetView* widgetView = [[WidgetView alloc] init];
sdefresne 2017/01/17 17:47:42 nit: you don't need the local variable self.wid
lody 2017/01/18 10:48:41 I do need it! The widgetView property is weak so i
sdefresne 2017/01/18 11:11:35 Ack. Thank you for the explanation. Can you add a
lody 2017/01/18 14:56:39 The same thing is done elsewhere (I copied this fr
+ self.widgetView = widgetView;
+ [self.view addSubview:self.widgetView];
+}
+
+@end

Powered by Google App Engine
This is Rietveld 408576698