Unify notification-related permission checks in its PermissionContext
1085568
1085466
This commit is contained in:
parent
2a3a845262
commit
d13e3324c6
2 changed files with 1 additions and 27 deletions
|
@ -49,7 +49,7 @@ class NotificationDelegateImpl final : public brightray::NotificationDelegate {
|
||||||
|
|
||||||
void NotificationClick() override {
|
void NotificationClick() override {
|
||||||
content::NotificationEventDispatcher::GetInstance()
|
content::NotificationEventDispatcher::GetInstance()
|
||||||
->DispatchNonPersistentClickEvent(notification_id_);
|
->DispatchNonPersistentClickEvent(notification_id_, base::DoNothing());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationClosed() override {
|
void NotificationClosed() override {
|
||||||
|
@ -76,24 +76,6 @@ PlatformNotificationService::PlatformNotificationService(
|
||||||
|
|
||||||
PlatformNotificationService::~PlatformNotificationService() {}
|
PlatformNotificationService::~PlatformNotificationService() {}
|
||||||
|
|
||||||
blink::mojom::PermissionStatus
|
|
||||||
PlatformNotificationService::CheckPermissionOnUIThread(
|
|
||||||
content::BrowserContext* browser_context,
|
|
||||||
const GURL& origin,
|
|
||||||
int render_process_id) {
|
|
||||||
render_process_id_ = render_process_id;
|
|
||||||
return blink::mojom::PermissionStatus::GRANTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
blink::mojom::PermissionStatus
|
|
||||||
PlatformNotificationService::CheckPermissionOnIOThread(
|
|
||||||
content::ResourceContext* resource_context,
|
|
||||||
const GURL& origin,
|
|
||||||
int render_process_id) {
|
|
||||||
render_process_id_ = render_process_id;
|
|
||||||
return blink::mojom::PermissionStatus::GRANTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlatformNotificationService::DisplayNotification(
|
void PlatformNotificationService::DisplayNotification(
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
const std::string& notification_id,
|
const std::string& notification_id,
|
||||||
|
|
|
@ -23,14 +23,6 @@ class PlatformNotificationService
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// content::PlatformNotificationService:
|
// content::PlatformNotificationService:
|
||||||
blink::mojom::PermissionStatus CheckPermissionOnUIThread(
|
|
||||||
content::BrowserContext* browser_context,
|
|
||||||
const GURL& origin,
|
|
||||||
int render_process_id) override;
|
|
||||||
blink::mojom::PermissionStatus CheckPermissionOnIOThread(
|
|
||||||
content::ResourceContext* resource_context,
|
|
||||||
const GURL& origin,
|
|
||||||
int render_process_id) override;
|
|
||||||
void DisplayNotification(
|
void DisplayNotification(
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
const std::string& notification_id,
|
const std::string& notification_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue