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

Side by Side Diff: content/browser/notifications/page_notification_delegate.h

Issue 1904163002: Move Web Notifications to use Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@skbitmap-blink
Patch Set: it works \o/ Created 4 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_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_
6 #define CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ 6 #define CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_
7 7
8 #include "content/public/browser/desktop_notification_delegate.h" 8 #include "content/public/browser/desktop_notification_delegate.h"
9 #include "third_party/WebKit/public/platform/modules/notifications/notification_ service.mojom.h"
9 10
10 namespace content { 11 namespace content {
11 12
12 // A delegate used by the notification service to report the results of platform 13 // A delegate used by the notification service to report the results of platform
13 // notification interactions to Web Notifications whose lifetime is tied to 14 // notification interactions to Web Notifications whose lifetime is tied to
14 // that of the page displaying them. 15 // that of the page displaying them.
15 class PageNotificationDelegate : public DesktopNotificationDelegate { 16 class PageNotificationDelegate : public DesktopNotificationDelegate {
16 public: 17 public:
17 PageNotificationDelegate(int render_process_id, int notification_id); 18 explicit PageNotificationDelegate(
19 blink::mojom::NotificationClientPtr notification_client);
18 ~PageNotificationDelegate() override; 20 ~PageNotificationDelegate() override;
19 21
20 // DesktopNotificationDelegate implementation. 22 // DesktopNotificationDelegate implementation.
21 void NotificationDisplayed() override; 23 void NotificationDisplayed() override;
22 void NotificationClosed() override; 24 void NotificationClosed() override;
23 void NotificationClick() override; 25 void NotificationClick() override;
24 26
25 private: 27 private:
26 int render_process_id_; 28 // The client to which events will be dispatched.
27 int notification_id_; 29 blink::mojom::NotificationClientPtr notification_client_;
28 }; 30 };
29 31
30 } // namespace content 32 } // namespace content
31 33
32 #endif // CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_ 34 #endif // CONTENT_BROWSER_NOTIFICATIONS_PAGE_NOTIFICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698