Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: content/shell/renderer/test_runner/notification_presenter.h

Issue 184313005: Clean up the TestRunner methods exposed for Web Notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 12 matching lines...) Expand all
23 public: 23 public:
24 NotificationPresenter(); 24 NotificationPresenter();
25 virtual ~NotificationPresenter(); 25 virtual ~NotificationPresenter();
26 26
27 // Called by the TestRunner to simulate a user granting permission. 27 // Called by the TestRunner to simulate a user granting permission.
28 void GrantPermission(const std::string& origin, bool permission_granted); 28 void GrantPermission(const std::string& origin, bool permission_granted);
29 29
30 // Called by the TestRunner to simulate a user clicking on a notification. 30 // Called by the TestRunner to simulate a user clicking on a notification.
31 bool SimulateClick(const std::string& title); 31 bool SimulateClick(const std::string& title);
32 32
33 // Called by the TestRunner to cancel all active notications.
34 void CancelAllActiveNotifications();
35
36 // Called by the TestRunner to reset the presenter to an default state. 33 // Called by the TestRunner to reset the presenter to an default state.
37 void Reset(); 34 void Reset();
38 35
39 void set_delegate(WebTestRunner::WebTestDelegate* delegate) { 36 void set_delegate(WebTestRunner::WebTestDelegate* delegate) {
40 delegate_ = delegate; 37 delegate_ = delegate;
41 } 38 }
42 39
43 // blink::WebNotificationPresenter interface 40 // blink::WebNotificationPresenter interface
44 virtual bool show(const blink::WebNotification& notification); 41 virtual bool show(const blink::WebNotification& notification);
45 virtual void cancel(const blink::WebNotification& notification); 42 virtual void cancel(const blink::WebNotification& notification);
(...skipping 17 matching lines...) Expand all
63 60
64 // Map of replacement identifiers to the titles of those notifications. 61 // Map of replacement identifiers to the titles of those notifications.
65 std::map<std::string, std::string> replacements_; 62 std::map<std::string, std::string> replacements_;
66 63
67 DISALLOW_COPY_AND_ASSIGN(NotificationPresenter); 64 DISALLOW_COPY_AND_ASSIGN(NotificationPresenter);
68 }; 65 };
69 66
70 } // namespace content 67 } // namespace content
71 68
72 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_ 69 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_NOTIFICATION_PRESENTER_H_
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/TestRunner.cpp ('k') | content/shell/renderer/test_runner/notification_presenter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698