OLD | NEW |
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 #include "base/ios/ios_util.h" | 9 #include "base/ios/ios_util.h" |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 @implementation WidgetViewController | 48 @implementation WidgetViewController |
49 | 49 |
50 @synthesize widgetView = _widgetView; | 50 @synthesize widgetView = _widgetView; |
51 @synthesize copiedURL = _copiedURL; | 51 @synthesize copiedURL = _copiedURL; |
52 @synthesize clipboardRecentContent = _clipboardRecentContent; | 52 @synthesize clipboardRecentContent = _clipboardRecentContent; |
53 | 53 |
54 - (instancetype)init { | 54 - (instancetype)init { |
55 self = [super init]; | 55 self = [super init]; |
56 if (self) { | 56 if (self) { |
57 _clipboardRecentContent = [[ClipboardRecentContentImplIOS alloc] | 57 _clipboardRecentContent = [[ClipboardRecentContentImplIOS alloc] |
58 initWithAuthorizedSchemes:[NSSet setWithObjects:@"http", @"https", nil] | 58 initWithMaxAge:1 * 60 * 60 |
59 userDefaults:app_group::GetGroupUserDefaults() | 59 authorizedSchemes:[NSSet setWithObjects:@"http", @"https", nil] |
60 delegate:nil]; | 60 userDefaults:app_group::GetGroupUserDefaults() |
| 61 delegate:nil]; |
61 } | 62 } |
62 return self; | 63 return self; |
63 } | 64 } |
64 | 65 |
65 #pragma mark - UIViewController | 66 #pragma mark - UIViewController |
66 | 67 |
67 - (void)viewDidLoad { | 68 - (void)viewDidLoad { |
68 [super viewDidLoad]; | 69 [super viewDidLoad]; |
69 | 70 |
70 // A local variable is necessary here as the property is declared weak and the | 71 // A local variable is necessary here as the property is declared weak and the |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 }; | 213 }; |
213 } | 214 } |
214 return @{ | 215 return @{ |
215 timePrefKey : [NSDate date], | 216 timePrefKey : [NSDate date], |
216 appPrefKey : @"TodayExtension", | 217 appPrefKey : @"TodayExtension", |
217 commandPrefKey : command, | 218 commandPrefKey : command, |
218 }; | 219 }; |
219 } | 220 } |
220 | 221 |
221 @end | 222 @end |
OLD | NEW |