| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> | |
| 9 #include <set> | 8 #include <set> |
| 10 #include <string> | 9 #include <string> |
| 11 | 10 |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" |
| 13 #include "webkit/tools/test_shell/test_shell.h" | 12 #include "webkit/tools/test_shell/test_shell.h" |
| 14 | 13 |
| 15 // A class that implements NotificationPresenter for the test shell. | 14 // A class that implements NotificationPresenter for the test shell. |
| 16 class TestNotificationPresenter : public WebKit::WebNotificationPresenter { | 15 class TestNotificationPresenter : public WebKit::WebNotificationPresenter { |
| 17 public: | 16 public: |
| 18 explicit TestNotificationPresenter(TestShell* shell) | 17 explicit TestNotificationPresenter(TestShell* shell) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 34 void Reset() { | 33 void Reset() { |
| 35 allowed_origins_.clear(); | 34 allowed_origins_.clear(); |
| 36 } | 35 } |
| 37 | 36 |
| 38 private: | 37 private: |
| 39 // Non-owned pointer. The NotificationPresenter is owned by the test shell. | 38 // Non-owned pointer. The NotificationPresenter is owned by the test shell. |
| 40 TestShell* shell_; | 39 TestShell* shell_; |
| 41 | 40 |
| 42 // List of allowed origins. | 41 // List of allowed origins. |
| 43 std::set<std::string> allowed_origins_; | 42 std::set<std::string> allowed_origins_; |
| 44 | |
| 45 // Map of active replacement IDs to the titles of those notifications | |
| 46 std::map<std::string, std::string> replacements_; | |
| 47 }; | 43 }; |
| 48 | 44 |
| 49 #endif // WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ | 45 #endif // WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_ |
| OLD | NEW |