OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ |
6 #define CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ | 6 #define CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/time/time.h" |
12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
13 | 14 |
14 namespace gfx { | 15 namespace gfx { |
15 class Image; | 16 class Image; |
16 } // namespace gfx | 17 } // namespace gfx |
17 | 18 |
18 namespace ntp_snippets { | 19 namespace ntp_snippets { |
19 | 20 |
20 class ContentSuggestionsNotificationHelper { | 21 class ContentSuggestionsNotificationHelper { |
21 public: | 22 public: |
22 static void OpenURL(const GURL& url); | 23 static void OpenURL(const GURL& url); |
23 static void SendNotification(const GURL& url, | 24 static void SendNotification(const GURL& url, |
24 const base::string16& title, | 25 const base::string16& title, |
25 const base::string16& text, | 26 const base::string16& text, |
26 const gfx::Image& image); | 27 const gfx::Image& image, |
27 static void HideNotification(); | 28 base::Time timeout_at); |
| 29 static void HideAllNotifications(); |
28 | 30 |
29 private: | 31 private: |
30 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSuggestionsNotificationHelper); | 32 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSuggestionsNotificationHelper); |
31 }; | 33 }; |
32 | 34 |
33 } // namespace ntp_snippets | 35 } // namespace ntp_snippets |
34 | 36 |
35 #endif // CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ | 37 #endif // CHROME_BROWSER_ANDROID_NTP_CONTENT_SUGGESTIONS_NOTIFICATION_HELPER_H_ |
OLD | NEW |