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

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

Issue 2230983002: Stop using UIPasteboardChangedNotification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unittest. Created 4 years, 4 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 | « no previous file | components/open_from_clipboard/clipboard_recent_content_ios.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_ 5 #ifndef COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
6 #define COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_ 6 #define COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 13 matching lines...) Expand all
24 // method does *not* create the singleton and will return null if no instance 24 // method does *not* create the singleton and will return null if no instance
25 // was registered via SetInstance(). 25 // was registered via SetInstance().
26 static ClipboardRecentContent* GetInstance(); 26 static ClipboardRecentContent* GetInstance();
27 27
28 // Sets the global instance of ClipboardRecentContent singleton. 28 // Sets the global instance of ClipboardRecentContent singleton.
29 static void SetInstance(ClipboardRecentContent* instance); 29 static void SetInstance(ClipboardRecentContent* instance);
30 30
31 // Returns true if the clipboard contains a recent URL that has not been 31 // Returns true if the clipboard contains a recent URL that has not been
32 // supressed, and copies it in |url|. Otherwise, returns false. |url| must not 32 // supressed, and copies it in |url|. Otherwise, returns false. |url| must not
33 // be null. 33 // be null.
34 virtual bool GetRecentURLFromClipboard(GURL* url) const = 0; 34 virtual bool GetRecentURLFromClipboard(GURL* url) = 0;
35
36 // Reports that the URL contained in the pasteboard was displayed.
37 virtual void RecentURLDisplayed() = 0;
38 35
39 // Returns how old the content of the clipboard is. 36 // Returns how old the content of the clipboard is.
40 virtual base::TimeDelta GetClipboardContentAge() const = 0; 37 virtual base::TimeDelta GetClipboardContentAge() const = 0;
41 38
42 // Prevent GetRecentURLFromClipboard from returning anything until the 39 // Prevent GetRecentURLFromClipboard from returning anything until the
43 // clipboard's content changed. 40 // clipboard's content changed.
44 virtual void SuppressClipboardContent() = 0; 41 virtual void SuppressClipboardContent() = 0;
45 42
46 private: 43 private:
47 DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent); 44 DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent);
48 }; 45 };
49 46
50 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_ 47 #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
OLDNEW
« no previous file with comments | « no previous file | components/open_from_clipboard/clipboard_recent_content_ios.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698