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

Side by Side Diff: content/renderer/active_notification_tracker.h

Issue 36073007: [Notification] Stop calling detachPresenter(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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
« no previous file with comments | « no previous file | content/renderer/active_notification_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_ACTIVE_NOTIFICATION_TRACKER_H_ 5 #ifndef CONTENT_RENDERER_ACTIVE_NOTIFICATION_TRACKER_H_
6 #define CONTENT_RENDERER_ACTIVE_NOTIFICATION_TRACKER_H_ 6 #define CONTENT_RENDERER_ACTIVE_NOTIFICATION_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // Methods for tracking active permission requests. 36 // Methods for tracking active permission requests.
37 int RegisterPermissionRequest( 37 int RegisterPermissionRequest(
38 WebKit::WebNotificationPermissionCallback* callback); 38 WebKit::WebNotificationPermissionCallback* callback);
39 void OnPermissionRequestComplete(int id); 39 void OnPermissionRequestComplete(int id);
40 WebKit::WebNotificationPermissionCallback* GetCallback(int id); 40 WebKit::WebNotificationPermissionCallback* GetCallback(int id);
41 41
42 // Clears out all active notifications. Useful on page navigation. 42 // Clears out all active notifications. Useful on page navigation.
43 void Clear(); 43 void Clear();
44 44
45 // Detaches all active notifications from their presenter. Necessary
46 // when the Presenter is destroyed.
47 void DetachAll();
48
49 private: 45 private:
50 typedef std::map<WebKit::WebNotification, int> ReverseTable; 46 typedef std::map<WebKit::WebNotification, int> ReverseTable;
51 47
52 // Tracking maps for active notifications and permission requests. 48 // Tracking maps for active notifications and permission requests.
53 IDMap<WebKit::WebNotification> notification_table_; 49 IDMap<WebKit::WebNotification> notification_table_;
54 ReverseTable reverse_notification_table_; 50 ReverseTable reverse_notification_table_;
55 IDMap<WebKit::WebNotificationPermissionCallback> callback_table_; 51 IDMap<WebKit::WebNotificationPermissionCallback> callback_table_;
56 52
57 DISALLOW_COPY_AND_ASSIGN(ActiveNotificationTracker); 53 DISALLOW_COPY_AND_ASSIGN(ActiveNotificationTracker);
58 }; 54 };
59 55
60 } // namespace content 56 } // namespace content
61 57
62 #endif // CONTENT_RENDERER_ACTIVE_NOTIFICATION_TRACKER_H_ 58 #endif // CONTENT_RENDERER_ACTIVE_NOTIFICATION_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/active_notification_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698