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

Side by Side Diff: content/shell/browser/layout_test/layout_test_notification_manager.h

Issue 622793002: Group the different permission related methods in the content api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
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_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 // Checks whether |origin| has permission to display notifications in tests. 28 // Checks whether |origin| has permission to display notifications in tests.
29 // Must be called on the IO thread. 29 // Must be called on the IO thread.
30 blink::WebNotificationPermission CheckPermission( 30 blink::WebNotificationPermission CheckPermission(
31 const GURL& origin); 31 const GURL& origin);
32 32
33 // Requests permission for |origin| to display notifications in layout tests. 33 // Requests permission for |origin| to display notifications in layout tests.
34 // Must be called on the IO thread. 34 // Must be called on the IO thread.
35 void RequestPermission( 35 void RequestPermission(
36 const GURL& origin, 36 const GURL& origin,
37 const base::Callback<void(blink::WebNotificationPermission)>& callback); 37 const base::Callback<void(bool)>& callback);
38 38
39 // Sets the permission to display notifications for |origin| to |permission|. 39 // Sets the permission to display notifications for |origin| to |permission|.
40 // Must be called on the IO thread. 40 // Must be called on the IO thread.
41 void SetPermission(const GURL& origin, 41 void SetPermission(const GURL& origin,
42 blink::WebNotificationPermission permission); 42 blink::WebNotificationPermission permission);
43 43
44 // Clears the currently granted permissions. Must be called on the IO thread. 44 // Clears the currently granted permissions. Must be called on the IO thread.
45 void ClearPermissions(); 45 void ClearPermissions();
46 46
47 // Pretends to show the given notification for testing, storing a delegate so 47 // Pretends to show the given notification for testing, storing a delegate so
(...skipping 19 matching lines...) Expand all
67 std::map<std::string, std::string> replacements_; 67 std::map<std::string, std::string> replacements_;
68 68
69 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_; 69 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager); 71 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager);
72 }; 72 };
73 73
74 } // content 74 } // content
75 75
76 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 76 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698