| 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_CLIENT_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 GCMClient(); | 212 GCMClient(); |
| 213 virtual ~GCMClient(); | 213 virtual ~GCMClient(); |
| 214 | 214 |
| 215 // Begins initialization of the GCM Client. This will not trigger a | 215 // Begins initialization of the GCM Client. This will not trigger a |
| 216 // connection. | 216 // connection. |
| 217 // |chrome_build_info|: chrome info, i.e., version, channel and etc. | 217 // |chrome_build_info|: chrome info, i.e., version, channel and etc. |
| 218 // |store_path|: path to the GCM store. | 218 // |store_path|: path to the GCM store. |
| 219 // |blocking_task_runner|: for running blocking file tasks. | 219 // |blocking_task_runner|: for running blocking file tasks. |
| 220 // |url_request_context_getter|: for url requests. The GCMClient must be | 220 // |url_request_context_getter|: for url requests. |
| 221 // deleted before the Getter's underlying URLRequestContext. | |
| 222 // |delegate|: the delegate whose methods will be called asynchronously in | 221 // |delegate|: the delegate whose methods will be called asynchronously in |
| 223 // response to events and messages. | 222 // response to events and messages. |
| 224 virtual void Initialize( | 223 virtual void Initialize( |
| 225 const ChromeBuildInfo& chrome_build_info, | 224 const ChromeBuildInfo& chrome_build_info, |
| 226 const base::FilePath& store_path, | 225 const base::FilePath& store_path, |
| 227 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 226 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
| 228 const scoped_refptr<net::URLRequestContextGetter>& | 227 const scoped_refptr<net::URLRequestContextGetter>& |
| 229 url_request_context_getter, | 228 url_request_context_getter, |
| 230 scoped_ptr<Encryptor> encryptor, | 229 scoped_ptr<Encryptor> encryptor, |
| 231 Delegate* delegate) = 0; | 230 Delegate* delegate) = 0; |
| 232 | 231 |
| 233 // This will initiate the GCM connection only if |start_mode| means to start | 232 // This will initiate the GCM connection only if |start_mode| means to start |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // to be set, and allows that component to later revoke the setting. It should | 313 // to be set, and allows that component to later revoke the setting. It should |
| 315 // be unique. | 314 // be unique. |
| 316 virtual void AddHeartbeatInterval(const std::string& scope, | 315 virtual void AddHeartbeatInterval(const std::string& scope, |
| 317 int interval_ms) = 0; | 316 int interval_ms) = 0; |
| 318 virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; | 317 virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; |
| 319 }; | 318 }; |
| 320 | 319 |
| 321 } // namespace gcm | 320 } // namespace gcm |
| 322 | 321 |
| 323 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 322 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| OLD | NEW |