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

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

Issue 2632333002: Add a prototype today extension behind gn flag (Closed)
Patch Set: rebase + owner 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
« no previous file with comments | « ios/chrome/widget_extension/widget_view_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/widget_extension/widget_view_controller.mm
diff --git a/ios/chrome/widget_extension/widget_view_controller.mm b/ios/chrome/widget_extension/widget_view_controller.mm
new file mode 100644
index 0000000000000000000000000000000000000000..dfe050a6a5c0766cc0e7d3564151b35788ff1729
--- /dev/null
+++ b/ios/chrome/widget_extension/widget_view_controller.mm
@@ -0,0 +1,35 @@
+// 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/widget_extension/widget_view_controller.h"
+
+#import <NotificationCenter/NotificationCenter.h>
+
+#import "ios/chrome/widget_extension/widget_view.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@interface WidgetViewController ()
+@property(nonatomic, weak) WidgetView* widgetView;
+@end
+
+@implementation WidgetViewController
+
+@synthesize widgetView = _widgetView;
+
+#pragma mark - UIViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ // A local variable is necessary here as the property is declared weak and the
+ // object would be deallocated before being retained by the addSubview call.
+ WidgetView* widgetView = [[WidgetView alloc] init];
+ self.widgetView = widgetView;
+ [self.view addSubview:self.widgetView];
+}
+
+@end
« no previous file with comments | « ios/chrome/widget_extension/widget_view_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698