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

Side by Side Diff: content/public/browser/push_messaging_service.h

Issue 1133083002: Reject the permissionState promise with NotSupported Exception (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_
6 #define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ 6 #define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // Checks the permission status for the requesting origin. Permission is only 71 // Checks the permission status for the requesting origin. Permission is only
72 // ever granted when the requesting origin matches the top level embedding 72 // ever granted when the requesting origin matches the top level embedding
73 // origin. The |user_visible| boolean indicates whether the permission status 73 // origin. The |user_visible| boolean indicates whether the permission status
74 // only has to cover push messages resulting in visible effects to the user. 74 // only has to cover push messages resulting in visible effects to the user.
75 virtual blink::WebPushPermissionStatus GetPermissionStatus( 75 virtual blink::WebPushPermissionStatus GetPermissionStatus(
76 const GURL& requesting_origin, 76 const GURL& requesting_origin,
77 const GURL& embedding_origin, 77 const GURL& embedding_origin,
78 bool user_visible) = 0; 78 bool user_visible) = 0;
79 79
80 // Returns true if silent push messages are accepted
Peter Beverloo 2015/05/11 12:56:07 Punctuation - it's a sentence. Also, "true" is imp
Miguel Garcia 2015/05/11 13:50:38 Done.
81 virtual bool SupportNonVisibleMessages();
Peter Beverloo 2015/05/11 12:56:07 nit: This should be pure virtual, like the rest of
Miguel Garcia 2015/05/11 13:50:38 Done.
82
80 protected: 83 protected:
81 // Provide a storage mechanism to read/write an opaque 84 // Provide a storage mechanism to read/write an opaque
82 // "notifications_shown_by_last_few_pushes" string associated with a Service 85 // "notifications_shown_by_last_few_pushes" string associated with a Service
83 // Worker registration. Stored data is deleted when the associated 86 // Worker registration. Stored data is deleted when the associated
84 // registration is deleted. 87 // registration is deleted.
85 static void GetNotificationsShownByLastFewPushes( 88 static void GetNotificationsShownByLastFewPushes(
86 ServiceWorkerContext* service_worker_context, 89 ServiceWorkerContext* service_worker_context,
87 int64 service_worker_registration_id, 90 int64 service_worker_registration_id,
88 const StringCallback& callback); 91 const StringCallback& callback);
89 static void SetNotificationsShownByLastFewPushes( 92 static void SetNotificationsShownByLastFewPushes(
(...skipping 12 matching lines...) Expand all
102 // |service_worker_registration_id| for the given |origin|. 105 // |service_worker_registration_id| for the given |origin|.
103 static void ClearPushRegistrationID(BrowserContext* browser_context, 106 static void ClearPushRegistrationID(BrowserContext* browser_context,
104 const GURL& origin, 107 const GURL& origin,
105 int64 service_worker_registration_id, 108 int64 service_worker_registration_id,
106 const base::Closure& callback); 109 const base::Closure& callback);
107 }; 110 };
108 111
109 } // namespace content 112 } // namespace content
110 113
111 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ 114 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698