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

Side by Side Diff: components/open_from_clipboard/clipboard_recent_content_ios_impl.h

Issue 2782823003: Rewrite implementation of ClipboardRecentContent in Objective C. (Closed)
Patch Set: address comments Created 3 years, 8 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698