OLD | NEW |
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_GCM_DRIVER_GCM_DRIVER_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
15 #include "components/gcm_driver/default_gcm_app_handler.h" | 15 #include "components/gcm_driver/default_gcm_app_handler.h" |
16 #include "google_apis/gcm/gcm_client.h" | 16 #include "components/gcm_driver/gcm_client.h" |
17 | 17 |
18 namespace gcm { | 18 namespace gcm { |
19 | 19 |
20 class GCMAppHandler; | 20 class GCMAppHandler; |
21 | 21 |
22 // Bridge between GCM users in Chrome and the platform-specific implementation. | 22 // Bridge between GCM users in Chrome and the platform-specific implementation. |
23 class GCMDriver { | 23 class GCMDriver { |
24 public: | 24 public: |
25 typedef std::map<std::string, GCMAppHandler*> GCMAppHandlerMap; | 25 typedef std::map<std::string, GCMAppHandler*> GCMAppHandlerMap; |
26 typedef base::Callback<void(const std::string& registration_id, | 26 typedef base::Callback<void(const std::string& registration_id, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 // The default handler when no app handler can be found in the map. | 157 // The default handler when no app handler can be found in the map. |
158 DefaultGCMAppHandler default_app_handler_; | 158 DefaultGCMAppHandler default_app_handler_; |
159 | 159 |
160 DISALLOW_COPY_AND_ASSIGN(GCMDriver); | 160 DISALLOW_COPY_AND_ASSIGN(GCMDriver); |
161 }; | 161 }; |
162 | 162 |
163 } // namespace gcm | 163 } // namespace gcm |
164 | 164 |
165 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 165 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
OLD | NEW |