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

Side by Side Diff: ios/chrome/widget_extension/widget_view_controller.mm

Issue 2643723006: Add a fake cursor (blinking UIView) to the widget extension. (Closed)
Patch Set: nit 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/widget_extension/widget_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/widget_extension/widget_view_controller.h" 5 #import "ios/chrome/widget_extension/widget_view_controller.h"
6 6
7 #import <NotificationCenter/NotificationCenter.h> 7 #import <NotificationCenter/NotificationCenter.h>
8 8
9 #import "ios/chrome/widget_extension/widget_view.h" 9 #import "ios/chrome/widget_extension/widget_view.h"
10 10
(...skipping 12 matching lines...) Expand all
23 #pragma mark - UIViewController 23 #pragma mark - UIViewController
24 24
25 - (void)viewDidLoad { 25 - (void)viewDidLoad {
26 [super viewDidLoad]; 26 [super viewDidLoad];
27 27
28 // A local variable is necessary here as the property is declared weak and the 28 // A local variable is necessary here as the property is declared weak and the
29 // object would be deallocated before being retained by the addSubview call. 29 // object would be deallocated before being retained by the addSubview call.
30 WidgetView* widgetView = [[WidgetView alloc] init]; 30 WidgetView* widgetView = [[WidgetView alloc] init];
31 self.widgetView = widgetView; 31 self.widgetView = widgetView;
32 [self.view addSubview:self.widgetView]; 32 [self.view addSubview:self.widgetView];
33
34 [self.widgetView setTranslatesAutoresizingMaskIntoConstraints:NO];
35 [NSLayoutConstraint activateConstraints:@[
36 [self.widgetView.leadingAnchor
37 constraintEqualToAnchor:[self.view leadingAnchor]],
38 [self.widgetView.trailingAnchor
39 constraintEqualToAnchor:[self.view trailingAnchor]],
40 [self.widgetView.heightAnchor
41 constraintEqualToAnchor:[self.view heightAnchor]],
42 [self.widgetView.widthAnchor
43 constraintEqualToAnchor:[self.view widthAnchor]]
44 ]];
33 } 45 }
34 46
35 @end 47 @end
OLDNEW
« no previous file with comments | « ios/chrome/widget_extension/widget_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698