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

Side by Side Diff: chrome/browser/extensions/extension_gcm_app_handler.cc

Issue 442123003: [GCM] Adding the OnSendAcknowledgement event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing code review comments. Created 6 years, 4 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 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 #include "chrome/browser/extensions/extension_gcm_app_handler.h" 5 #include "chrome/browser/extensions/extension_gcm_app_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 void ExtensionGCMAppHandler::OnSendError( 87 void ExtensionGCMAppHandler::OnSendError(
88 const std::string& app_id, 88 const std::string& app_id,
89 const gcm::GCMClient::SendErrorDetails& send_error_details) { 89 const gcm::GCMClient::SendErrorDetails& send_error_details) {
90 #if !defined(OS_ANDROID) 90 #if !defined(OS_ANDROID)
91 js_event_router_->OnSendError(app_id, send_error_details); 91 js_event_router_->OnSendError(app_id, send_error_details);
92 #endif 92 #endif
93 } 93 }
94 94
95 void ExtensionGCMAppHandler::OnSendAcknowledged(
96 const std::string& app_id,
97 const std::string& message_id) {
98 // This event is not exposed to JS API. It terminates here.
99 }
100
95 void ExtensionGCMAppHandler::OnExtensionLoaded( 101 void ExtensionGCMAppHandler::OnExtensionLoaded(
96 content::BrowserContext* browser_context, 102 content::BrowserContext* browser_context,
97 const Extension* extension) { 103 const Extension* extension) {
98 if (IsGCMPermissionEnabled(extension)) 104 if (IsGCMPermissionEnabled(extension))
99 AddAppHandler(extension->id()); 105 AddAppHandler(extension->id());
100 } 106 }
101 107
102 void ExtensionGCMAppHandler::OnExtensionUnloaded( 108 void ExtensionGCMAppHandler::OnExtensionUnloaded(
103 content::BrowserContext* browser_context, 109 content::BrowserContext* browser_context,
104 const Extension* extension, 110 const Extension* extension,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 168
163 void ExtensionGCMAppHandler::AddAppHandler(const std::string& app_id) { 169 void ExtensionGCMAppHandler::AddAppHandler(const std::string& app_id) {
164 GetGCMDriver()->AddAppHandler(app_id, this); 170 GetGCMDriver()->AddAppHandler(app_id, this);
165 } 171 }
166 172
167 void ExtensionGCMAppHandler::RemoveAppHandler(const std::string& app_id) { 173 void ExtensionGCMAppHandler::RemoveAppHandler(const std::string& app_id) {
168 GetGCMDriver()->RemoveAppHandler(app_id); 174 GetGCMDriver()->RemoveAppHandler(app_id);
169 } 175 }
170 176
171 } // namespace extensions 177 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_gcm_app_handler.h ('k') | chrome/browser/services/gcm/push_messaging_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698