OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ |
6 #define WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // WebKit::WebNotificationPresenter interface | 27 // WebKit::WebNotificationPresenter interface |
28 virtual bool show(const WebKit::WebNotification&); | 28 virtual bool show(const WebKit::WebNotification&); |
29 virtual void cancel(const WebKit::WebNotification&); | 29 virtual void cancel(const WebKit::WebNotification&); |
30 virtual void objectDestroyed(const WebKit::WebNotification&); | 30 virtual void objectDestroyed(const WebKit::WebNotification&); |
31 virtual Permission checkPermission(const WebKit::WebSecurityOrigin& origin); | 31 virtual Permission checkPermission(const WebKit::WebSecurityOrigin& origin); |
32 virtual void requestPermission(const WebKit::WebSecurityOrigin& origin, | 32 virtual void requestPermission(const WebKit::WebSecurityOrigin& origin, |
33 WebKit::WebNotificationPermissionCallback* callback); | 33 WebKit::WebNotificationPermissionCallback* callback); |
34 | 34 |
35 private: | 35 private: |
36 // Non-owned pointer. The NotificationPresenter is owned by the test shell. | |
37 TestShell* shell_; | |
38 | |
39 // List of allowed origins. | 36 // List of allowed origins. |
40 std::set<std::string> allowed_origins_; | 37 std::set<std::string> allowed_origins_; |
41 | 38 |
42 // Map of active replacement IDs to the titles of those notifications | 39 // Map of active replacement IDs to the titles of those notifications |
43 std::map<std::string, std::string> replacements_; | 40 std::map<std::string, std::string> replacements_; |
44 }; | 41 }; |
45 | 42 |
46 #endif // WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ | 43 #endif // WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ |
OLD | NEW |