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

Side by Side Diff: webkit/tools/test_shell/notification_presenter.h

Issue 15028002: Delete test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dummy test_shell build target. Created 7 years, 7 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_
6 #define WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_
7
8 #include <map>
9 #include <set>
10 #include <string>
11
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h"
13 #include "webkit/tools/test_shell/test_shell.h"
14
15 // A class that implements NotificationPresenter for the test shell.
16 class TestNotificationPresenter : public WebKit::WebNotificationPresenter {
17 public:
18 explicit TestNotificationPresenter(TestShell* shell);
19 virtual ~TestNotificationPresenter();
20
21 void Reset();
22
23 // Called by the testRunner to simulate a user granting
24 // permission.
25 void grantPermission(const std::string& origin);
26
27 // WebKit::WebNotificationPresenter interface
28 virtual bool show(const WebKit::WebNotification&);
29 virtual void cancel(const WebKit::WebNotification&);
30 virtual void objectDestroyed(const WebKit::WebNotification&);
31 virtual Permission checkPermission(const WebKit::WebSecurityOrigin& origin);
32 virtual void requestPermission(const WebKit::WebSecurityOrigin& origin,
33 WebKit::WebNotificationPermissionCallback* callback);
34
35 private:
36 // List of allowed origins.
37 std::set<std::string> allowed_origins_;
38
39 // Map of active replacement IDs to the titles of those notifications
40 std::map<std::string, std::string> replacements_;
41 };
42
43 #endif // WEBKIT_TOOLS_TEST_SHELL_NOTIFICATION_PRESENTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698