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

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

Issue 842233003: Push API: Require user visible notification, else show auto notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@invalid
Patch Set: Tweak comment Created 5 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
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void SetProfileForTesting(Profile* profile); 75 void SetProfileForTesting(Profile* profile);
76 76
77 private: 77 private:
78 void IncreasePushRegistrationCount(int add); 78 void IncreasePushRegistrationCount(int add);
79 void DecreasePushRegistrationCount(int subtract); 79 void DecreasePushRegistrationCount(int subtract);
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
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
88 // notification on their behalf.
89 void RequireUserVisibleUX(const PushMessagingApplicationId& application_id);
90
85 void RegisterEnd( 91 void RegisterEnd(
86 const content::PushMessagingService::RegisterCallback& callback, 92 const content::PushMessagingService::RegisterCallback& callback,
87 const std::string& registration_id, 93 const std::string& registration_id,
88 content::PushRegistrationStatus status); 94 content::PushRegistrationStatus status);
89 95
90 void DidRegister( 96 void DidRegister(
91 const content::PushMessagingService::RegisterCallback& callback, 97 const content::PushMessagingService::RegisterCallback& callback,
92 const std::string& registration_id, 98 const std::string& registration_id,
93 GCMClient::Result result); 99 GCMClient::Result result);
94 100
(...skipping 23 matching lines...) Expand all
118 int push_registration_count_; 124 int push_registration_count_;
119 125
120 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; 126 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_;
121 127
122 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); 128 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl);
123 }; 129 };
124 130
125 } // namespace gcm 131 } // namespace gcm
126 132
127 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 133 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698