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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_notification_manager.h

Issue 1861683002: Background service worker push message processing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dcheck ordering Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_NOTIFICATION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_NOTIFICATION_MANAGER_H_
6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_NOTIFICATION_MANAGER_H_ 6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_NOTIFICATION_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool success, 66 bool success,
67 const std::vector<content::NotificationDatabaseData>& data); 67 const std::vector<content::NotificationDatabaseData>& data);
68 68
69 // Checks whether |profile| is the one owning this instance, 69 // Checks whether |profile| is the one owning this instance,
70 // |active_web_contents| exists and its main frame is visible, and the URL 70 // |active_web_contents| exists and its main frame is visible, and the URL
71 // currently visible to the user is for |origin|. 71 // currently visible to the user is for |origin|.
72 bool IsTabVisible(Profile* profile, 72 bool IsTabVisible(Profile* profile,
73 content::WebContents* active_web_contents, 73 content::WebContents* active_web_contents,
74 const GURL& origin); 74 const GURL& origin);
75 75
76 void DidGetNotificationsShownAndNeeded( 76 void DidGetBudget(const GURL& origin,
77 const GURL& origin, 77 int64_t service_worker_registration_id,
78 int64_t service_worker_registration_id, 78 bool notification_shown,
79 bool notification_shown, 79 bool notification_needed,
80 bool notification_needed, 80 const base::Closure& message_handled_closure,
81 const base::Closure& message_handled_closure, 81 const std::string& data);
82 const std::string& data,
83 bool success,
84 bool not_found);
85 82
86 static void DidWriteNotificationDataIOProxy( 83 static void DidWriteNotificationDataIOProxy(
87 const base::WeakPtr<PushMessagingNotificationManager>& ui_weak_ptr, 84 const base::WeakPtr<PushMessagingNotificationManager>& ui_weak_ptr,
88 const GURL& origin, 85 const GURL& origin,
89 const content::PlatformNotificationData& notification_data, 86 const content::PlatformNotificationData& notification_data,
90 const base::Closure& message_handled_closure, 87 const base::Closure& message_handled_closure,
91 bool success, 88 bool success,
92 int64_t persistent_notification_id); 89 int64_t persistent_notification_id);
93 90
94 void DidWriteNotificationData( 91 void DidWriteNotificationData(
95 const GURL& origin, 92 const GURL& origin,
96 const content::PlatformNotificationData& notification_data, 93 const content::PlatformNotificationData& notification_data,
97 const base::Closure& message_handled_closure, 94 const base::Closure& message_handled_closure,
98 bool success, 95 bool success,
99 int64_t persistent_notification_id); 96 int64_t persistent_notification_id);
100 97
101 // Weak. This manager is owned by a keyed service on this profile. 98 // Weak. This manager is owned by a keyed service on this profile.
102 Profile* profile_; 99 Profile* profile_;
103 100
104 base::WeakPtrFactory<PushMessagingNotificationManager> weak_factory_; 101 base::WeakPtrFactory<PushMessagingNotificationManager> weak_factory_;
105 102
106 DISALLOW_COPY_AND_ASSIGN(PushMessagingNotificationManager); 103 DISALLOW_COPY_AND_ASSIGN(PushMessagingNotificationManager);
107 }; 104 };
108 105
109 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_NOTIFICATION_MANAGER_H_ 106 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698