OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ |
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // PlatformNotificationService implementation. | 47 // PlatformNotificationService implementation. |
48 blink::WebNotificationPermission CheckPermission( | 48 blink::WebNotificationPermission CheckPermission( |
49 ResourceContext* resource_context, | 49 ResourceContext* resource_context, |
50 const GURL& origin, | 50 const GURL& origin, |
51 int render_process_id) override; | 51 int render_process_id) override; |
52 void DisplayNotification(BrowserContext* browser_context, | 52 void DisplayNotification(BrowserContext* browser_context, |
53 const GURL& origin, | 53 const GURL& origin, |
54 const SkBitmap& icon, | 54 const SkBitmap& icon, |
55 const PlatformNotificationData& notification_data, | 55 const PlatformNotificationData& notification_data, |
56 scoped_ptr<DesktopNotificationDelegate> delegate, | 56 scoped_ptr<DesktopNotificationDelegate> delegate, |
57 int render_process_id, | |
58 base::Closure* cancel_callback) override; | 57 base::Closure* cancel_callback) override; |
59 void DisplayPersistentNotification( | 58 void DisplayPersistentNotification( |
60 BrowserContext* browser_context, | 59 BrowserContext* browser_context, |
61 int64 service_worker_registration_id, | 60 int64 service_worker_registration_id, |
62 const GURL& origin, | 61 const GURL& origin, |
63 const SkBitmap& icon, | 62 const SkBitmap& icon, |
64 const PlatformNotificationData& notification_data, | 63 const PlatformNotificationData& notification_data) override; |
65 int render_process_id) override; | |
66 void ClosePersistentNotification( | 64 void ClosePersistentNotification( |
67 BrowserContext* browser_context, | 65 BrowserContext* browser_context, |
68 const std::string& persistent_notification_id) override; | 66 const std::string& persistent_notification_id) override; |
69 | 67 |
70 private: | 68 private: |
71 // Closes the notification titled |title|. Must be called on the UI thread. | 69 // Closes the notification titled |title|. Must be called on the UI thread. |
72 void Close(const std::string& title); | 70 void Close(const std::string& title); |
73 | 71 |
74 // Fakes replacing the notification identified by |params| when it has a tag | 72 // Fakes replacing the notification identified by |params| when it has a tag |
75 // and a previous notification has been displayed using the same tag. All | 73 // and a previous notification has been displayed using the same tag. All |
(...skipping 20 matching lines...) Expand all Loading... |
96 std::map<std::string, std::string> replacements_; | 94 std::map<std::string, std::string> replacements_; |
97 | 95 |
98 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_; | 96 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_; |
99 | 97 |
100 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager); | 98 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager); |
101 }; | 99 }; |
102 | 100 |
103 } // content | 101 } // content |
104 | 102 |
105 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ | 103 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ |
OLD | NEW |