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

Unified Diff: components/gcm_driver/gcm_app_handler.h

Issue 338363003: Push API: register PushMessagingServiceImpl as GCMAppHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing const on CanHandle. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/gcm_driver/gcm_app_handler.h
diff --git a/components/gcm_driver/gcm_app_handler.h b/components/gcm_driver/gcm_app_handler.h
index b4b497e3975fa4fa5fb408f126b4746c8b760025..ec5a422a86222c0342ea2b53dfabe950a261a27e 100644
--- a/components/gcm_driver/gcm_app_handler.h
+++ b/components/gcm_driver/gcm_app_handler.h
@@ -45,6 +45,12 @@ class GCMAppHandler {
// Called when the connection is interrupted.
// Default implementation does nothing.
virtual void OnDisconnected();
+
+ // If no app handler has been added with the exact app_id of an incoming
+ // event, all handlers will be asked (in arbitrary order) whether they can
+ // handle the app_id, and the first to return true will receive the event.
+ virtual bool CanHandle(const std::string& app_id) const;
+
};
} // namespace gcm

Powered by Google App Engine
This is Rietveld 408576698