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

Side by Side Diff: chrome/renderer/notification_provider.h

Issue 549140: If a page is navigated within the same render process, the active notificatio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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 | Annotate | Revision Log
OLDNEW
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 18 matching lines...) Expand all
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::WebString& origin); 32 const WebKit::WebString& origin);
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.
40 void OnNavigate();
41
39 private: 42 private:
40 // Internal methods used to show notifications. 43 // Internal methods used to show notifications.
41 bool ShowHTML(const WebKit::WebNotification& notification, int id); 44 bool ShowHTML(const WebKit::WebNotification& notification, int id);
42 bool ShowText(const WebKit::WebNotification& notification, int id); 45 bool ShowText(const WebKit::WebNotification& notification, int id);
43 46
44 // IPC handlers. 47 // IPC handlers.
45 void OnDisplay(int id); 48 void OnDisplay(int id);
46 void OnError(int id, const WebKit::WebString& message); 49 void OnError(int id, const WebKit::WebString& message);
47 void OnClose(int id, bool by_user); 50 void OnClose(int id, bool by_user);
48 void OnPermissionRequestComplete(int id); 51 void OnPermissionRequestComplete(int id);
49 52
50 bool Send(IPC::Message* message); 53 bool Send(IPC::Message* message);
51 54
52 // Non-owned pointer to the RenderView object which created and owns 55 // Non-owned pointer to the RenderView object which created and owns
53 // this object. 56 // this object.
54 RenderView* view_; 57 RenderView* view_;
55 58
56 // A tracker object which manages the active notifications and the IDs 59 // A tracker object which manages the active notifications and the IDs
57 // that are used to refer to them over IPC. 60 // that are used to refer to them over IPC.
58 ActiveNotificationTracker manager_; 61 ActiveNotificationTracker manager_;
59 62
60 DISALLOW_COPY_AND_ASSIGN(NotificationProvider); 63 DISALLOW_COPY_AND_ASSIGN(NotificationProvider);
61 }; 64 };
62 65
63 #endif // CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ 66 #endif // CHROME_RENDERER_NOTIFICATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/common/desktop_notifications/active_notification_tracker.cc ('k') | chrome/renderer/notification_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698