OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ | 5 #ifndef CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ |
6 #define CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ | 6 #define CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "chrome/common/desktop_notifications/active_notification_tracker.h" | 10 #include "chrome/common/desktop_notifications/active_notification_tracker.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class NotificationProvider : public WebKit::WebNotificationPresenter { | 22 class NotificationProvider : public WebKit::WebNotificationPresenter { |
23 public: | 23 public: |
24 explicit NotificationProvider(RenderView* view); | 24 explicit NotificationProvider(RenderView* view); |
25 ~NotificationProvider() {} | 25 ~NotificationProvider() {} |
26 | 26 |
27 // WebKit::WebNotificationPresenter interface. | 27 // WebKit::WebNotificationPresenter interface. |
28 virtual bool show(const WebKit::WebNotification& proxy); | 28 virtual bool show(const WebKit::WebNotification& proxy); |
29 virtual void cancel(const WebKit::WebNotification& proxy); | 29 virtual void cancel(const WebKit::WebNotification& proxy); |
30 virtual void objectDestroyed(const WebKit::WebNotification& proxy); | 30 virtual void objectDestroyed(const WebKit::WebNotification& proxy); |
31 virtual WebKit::WebNotificationPresenter::Permission checkPermission( | 31 virtual WebKit::WebNotificationPresenter::Permission checkPermission( |
32 const WebKit::WebURL& url, WebKit::WebDocument* document); | 32 const WebKit::WebURL& url); |
33 virtual void requestPermission(const WebKit::WebString& origin, | 33 virtual void requestPermission(const WebKit::WebString& origin, |
34 WebKit::WebNotificationPermissionCallback* callback); | 34 WebKit::WebNotificationPermissionCallback* callback); |
35 | 35 |
36 // IPC message handler called from RenderView. | 36 // IPC message handler called from RenderView. |
37 bool OnMessageReceived(const IPC::Message& message); | 37 bool OnMessageReceived(const IPC::Message& message); |
38 | 38 |
39 // Called when the RenderView navigates. | 39 // Called when the RenderView navigates. |
40 void OnNavigate(); | 40 void OnNavigate(); |
41 | 41 |
42 private: | 42 private: |
(...skipping 14 matching lines...) Expand all Loading... |
57 RenderView* view_; | 57 RenderView* view_; |
58 | 58 |
59 // A tracker object which manages the active notifications and the IDs | 59 // A tracker object which manages the active notifications and the IDs |
60 // that are used to refer to them over IPC. | 60 // that are used to refer to them over IPC. |
61 ActiveNotificationTracker manager_; | 61 ActiveNotificationTracker manager_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(NotificationProvider); | 63 DISALLOW_COPY_AND_ASSIGN(NotificationProvider); |
64 }; | 64 }; |
65 | 65 |
66 #endif // CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ | 66 #endif // CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ |
OLD | NEW |