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

Side by Side Diff: components/copresence/handlers/gcm_handler.h

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_ 5 #ifndef COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_
6 #define COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_ 6 #define COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/macros.h"
11 12
12 namespace gcm { 13 namespace gcm {
13 class GCMDriver; 14 class GCMDriver;
14 } 15 }
15 16
16 namespace copresence { 17 namespace copresence {
17 18
18 // A class to handle GCM messages from the Copresence server. As far as the 19 // A class to handle GCM messages from the Copresence server. As far as the
19 // rest of the system is concerned, it simply provides the registered GCM ID. 20 // rest of the system is concerned, it simply provides the registered GCM ID.
20 // The implementation will call other classes to enact the message contents. 21 // The implementation will call other classes to enact the message contents.
21 class GCMHandler { 22 class GCMHandler {
22 public: 23 public:
23 // Callback to report that registration has completed. 24 // Callback to report that registration has completed.
24 // Returns an empty ID if registration failed. 25 // Returns an empty ID if registration failed.
25 using RegistrationCallback = base::Callback<void(const std::string&)>; 26 using RegistrationCallback = base::Callback<void(const std::string&)>;
26 27
27 GCMHandler() {} 28 GCMHandler() {}
28 virtual ~GCMHandler() {} 29 virtual ~GCMHandler() {}
29 30
30 // Request the GCM ID. It may be returned now or later, via the callback. 31 // Request the GCM ID. It may be returned now or later, via the callback.
31 virtual void GetGcmId(const RegistrationCallback& callback) = 0; 32 virtual void GetGcmId(const RegistrationCallback& callback) = 0;
32 33
33 private: 34 private:
34 DISALLOW_COPY_AND_ASSIGN(GCMHandler); 35 DISALLOW_COPY_AND_ASSIGN(GCMHandler);
35 }; 36 };
36 37
37 } // namespace copresence 38 } // namespace copresence
38 39
39 #endif // COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_ 40 #endif // COMPONENTS_COPRESENCE_HANDLERS_GCM_HANDLER_H_
OLDNEW
« no previous file with comments | « components/copresence/handlers/directive_handler_unittest.cc ('k') | components/copresence/handlers/gcm_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698