| 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. | 220 // |url_request_context_getter|: for url requests. The GCMClient must be |
| 221 // deleted before the Getter's underlying URLRequestContext. |
| 221 // |delegate|: the delegate whose methods will be called asynchronously in | 222 // |delegate|: the delegate whose methods will be called asynchronously in |
| 222 // response to events and messages. | 223 // response to events and messages. |
| 223 virtual void Initialize( | 224 virtual void Initialize( |
| 224 const ChromeBuildInfo& chrome_build_info, | 225 const ChromeBuildInfo& chrome_build_info, |
| 225 const base::FilePath& store_path, | 226 const base::FilePath& store_path, |
| 226 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 227 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
| 227 const scoped_refptr<net::URLRequestContextGetter>& | 228 const scoped_refptr<net::URLRequestContextGetter>& |
| 228 url_request_context_getter, | 229 url_request_context_getter, |
| 229 scoped_ptr<Encryptor> encryptor, | 230 scoped_ptr<Encryptor> encryptor, |
| 230 Delegate* delegate) = 0; | 231 Delegate* delegate) = 0; |
| 231 | 232 |
| 232 // This will initiate the GCM connection only if |start_mode| means to start | 233 // 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... |
| 313 // to be set, and allows that component to later revoke the setting. It should | 314 // to be set, and allows that component to later revoke the setting. It should |
| 314 // be unique. | 315 // be unique. |
| 315 virtual void AddHeartbeatInterval(const std::string& scope, | 316 virtual void AddHeartbeatInterval(const std::string& scope, |
| 316 int interval_ms) = 0; | 317 int interval_ms) = 0; |
| 317 virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; | 318 virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; |
| 318 }; | 319 }; |
| 319 | 320 |
| 320 } // namespace gcm | 321 } // namespace gcm |
| 321 | 322 |
| 322 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 323 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
| OLD | NEW |