| 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_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 void Reset(); | 29 void Reset(); |
| 30 | 30 |
| 31 void set_delegate(WebTestDelegate* delegate) { delegate_ = delegate; } | 31 void set_delegate(WebTestDelegate* delegate) { delegate_ = delegate; } |
| 32 | 32 |
| 33 // blink::WebNotificationPresenter interface | 33 // blink::WebNotificationPresenter interface |
| 34 virtual bool show(const blink::WebNotification& notification); | 34 virtual bool show(const blink::WebNotification& notification); |
| 35 virtual void cancel(const blink::WebNotification& notification); | 35 virtual void cancel(const blink::WebNotification& notification); |
| 36 virtual void objectDestroyed(const blink::WebNotification& notification); | 36 virtual void objectDestroyed(const blink::WebNotification& notification); |
| 37 virtual Permission checkPermission( | 37 virtual Permission checkPermission( |
| 38 const blink::WebSecurityOrigin& security_origin); | 38 const blink::WebSecurityOrigin& security_origin); |
| 39 virtual void requestPermission( | |
| 40 const blink::WebSecurityOrigin& security_origin, | |
| 41 blink::WebNotificationPermissionCallback* callback); | |
| 42 | 39 |
| 43 private: | 40 private: |
| 44 WebTestDelegate* delegate_; | 41 WebTestDelegate* delegate_; |
| 45 | 42 |
| 46 // Map of currently active notifications. | 43 // Map of currently active notifications. |
| 47 typedef std::map<std::string, blink::WebNotification> ActiveNotificationMap; | 44 typedef std::map<std::string, blink::WebNotification> ActiveNotificationMap; |
| 48 ActiveNotificationMap active_notifications_; | 45 ActiveNotificationMap active_notifications_; |
| 49 | 46 |
| 50 // Map of replacement identifiers to the titles of those notifications. | 47 // Map of replacement identifiers to the titles of those notifications. |
| 51 std::map<std::string, std::string> replacements_; | 48 std::map<std::string, std::string> replacements_; |
| 52 | 49 |
| 53 DISALLOW_COPY_AND_ASSIGN(NotificationPresenter); | 50 DISALLOW_COPY_AND_ASSIGN(NotificationPresenter); |
| 54 }; | 51 }; |
| 55 | 52 |
| 56 } // namespace content | 53 } // namespace content |
| 57 | 54 |
| 58 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_ | 55 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_ |
| OLD | NEW |