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

Side by Side Diff: chrome/browser/services/gcm/push_messaging_service_impl.h

Issue 883743002: Push API: Grace - allow one in ten pushes to show no notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@userdata
Patch Set: Use static methods on PushMessagingService to save state Created 5 years, 10 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 CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/gcm_driver/gcm_app_handler.h" 10 #include "components/gcm_driver/gcm_app_handler.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 void DeliverMessageCallback(const PushMessagingApplicationId& application_id, 81 void DeliverMessageCallback(const PushMessagingApplicationId& application_id,
82 const GCMClient::IncomingMessage& message, 82 const GCMClient::IncomingMessage& message,
83 content::PushDeliveryStatus status); 83 content::PushDeliveryStatus status);
84 84
85 // Developers are required to display a Web Notification in response to an 85 // Developers are required to display a Web Notification in response to an
86 // incoming push message in order to clarify to the user that something has 86 // incoming push message in order to clarify to the user that something has
87 // happened in the background. When they forget to do so, display a default 87 // happened in the background. When they forget to do so, display a default
88 // notification on their behalf. 88 // notification on their behalf.
89 void RequireUserVisibleUX(const PushMessagingApplicationId& application_id); 89 void RequireUserVisibleUX(const PushMessagingApplicationId& application_id);
90 void DidGetNotificationsShown(
91 const PushMessagingApplicationId& application_id,
92 bool notification_shown,
93 bool notification_needed,
94 const std::string& data,
95 bool success,
96 bool not_found);
90 97
91 void RegisterEnd( 98 void RegisterEnd(
92 const content::PushMessagingService::RegisterCallback& callback, 99 const content::PushMessagingService::RegisterCallback& callback,
93 const std::string& registration_id, 100 const std::string& registration_id,
94 content::PushRegistrationStatus status); 101 content::PushRegistrationStatus status);
95 102
96 void DidRegister( 103 void DidRegister(
97 const content::PushMessagingService::RegisterCallback& callback, 104 const content::PushMessagingService::RegisterCallback& callback,
98 const std::string& registration_id, 105 const std::string& registration_id,
99 GCMClient::Result result); 106 GCMClient::Result result);
(...skipping 24 matching lines...) Expand all
124 int push_registration_count_; 131 int push_registration_count_;
125 132
126 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; 133 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_;
127 134
128 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); 135 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl);
129 }; 136 };
130 137
131 } // namespace gcm 138 } // namespace gcm
132 139
133 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 140 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698