Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
|
sdefresne
2017/04/03 09:27:17
File need to be named ${something}_ios.{h,mm} to b
lody
2017/04/04 13:42:18
Acknowledged.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IOS_IMPL_H_ | |
| 6 #define COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IOS_IMPL_H_ | |
| 7 | |
| 8 #import <Foundation/Foundation.h> | |
| 9 | |
| 10 #include "base/macros.h" | |
|
sdefresne
2017/04/03 09:27:16
Why this include? You do not use any of the macros
lody
2017/04/04 13:42:18
Done.
| |
| 11 | |
| 12 // A protocol implemented by delegates to handle logging metrics. | |
| 13 @protocol ClipboardRecentContentMetricsDelegate<NSObject> | |
|
sdefresne
2017/04/03 09:27:17
Maybe just ClipboardRecentContentDelegate (or ${Cl
lody
2017/04/04 13:42:18
Done.
| |
| 14 | |
| 15 - (void)onClipboardChanged; | |
| 16 | |
| 17 @end | |
| 18 | |
| 19 // Objective C iOS implementation of ClipboardRecentContent. | |
|
sdefresne
2017/04/03 09:27:16
Describe what this class does without referencing
lody
2017/04/04 13:42:18
Done.
| |
| 20 @interface ClipboardRecentContentIOSImpl : NSObject | |
| 21 | |
| 22 // |delegate| is used for metrics logging and can be nil. |authorizedSchemes| | |
| 23 // should contain all schemes considered valid. |groupUserDefaults| is the | |
| 24 // NSUserDefaults used to store information on pasteboard entry expiration. This | |
| 25 // information will be shared with other applications in the application group. | |
| 26 - (instancetype)initWithDelegate: | |
|
sdefresne
2017/04/03 09:27:16
delegate seems the least important parameter for t
lody
2017/04/04 13:42:18
Done.
| |
| 27 (id<ClipboardRecentContentMetricsDelegate>)delegate | |
| 28 authorizedSchemes:(NSArray*)authorizedSchemes | |
| 29 userDefaults:(NSUserDefaults*)groupUserDefaults | |
| 30 NS_DESIGNATED_INITIALIZER; | |
| 31 | |
| 32 - (instancetype)init NS_UNAVAILABLE; | |
| 33 | |
| 34 // ClipboardRecentContent implementation. | |
|
sdefresne
2017/04/03 09:27:16
Describe the methods without referencing Clipboard
lody
2017/04/04 13:42:18
Done.
| |
| 35 - (NSURL*)getRecentURLFromClipboard; | |
| 36 - (NSTimeInterval)getClipboardContentAge; | |
| 37 - (void)suppressClipboardContent; | |
| 38 | |
| 39 // Methods below are exposed for testing purposes. | |
| 40 | |
| 41 // Estimation of the date when the pasteboard changed. | |
| 42 @property(nonatomic, strong) NSDate* lastPasteboardChangeDate; | |
| 43 | |
| 44 // Saves information to the user defaults about the latest pasteboard entry. | |
| 45 - (void)saveToUserDefaults; | |
| 46 | |
| 47 @end | |
| 48 | |
| 49 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IOS_IMPL_H_ | |
| OLD | NEW |