OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // from the server if it hadn't yet. | 128 // from the server if it hadn't yet. |
129 virtual void OnGCMReady() = 0; | 129 virtual void OnGCMReady() = 0; |
130 }; | 130 }; |
131 | 131 |
132 GCMClient(); | 132 GCMClient(); |
133 virtual ~GCMClient(); | 133 virtual ~GCMClient(); |
134 | 134 |
135 // Begins initialization of the GCM Client. | 135 // Begins initialization of the GCM Client. |
136 // |chrome_build_proto|: chrome info, i.e., version, channel and etc. | 136 // |chrome_build_proto|: chrome info, i.e., version, channel and etc. |
137 // |store_path|: path to the GCM store. | 137 // |store_path|: path to the GCM store. |
| 138 // |account_ids|: account IDs to be related to the device when checking in. |
138 // |blocking_task_runner|: for running blocking file tasks. | 139 // |blocking_task_runner|: for running blocking file tasks. |
139 // |url_request_context_getter|: for url requests. | 140 // |url_request_context_getter|: for url requests. |
140 // |delegate|: the delegate whose methods will be called asynchronously in | 141 // |delegate|: the delegate whose methods will be called asynchronously in |
141 // response to events and messages. | 142 // response to events and messages. |
142 virtual void Initialize( | 143 virtual void Initialize( |
143 const checkin_proto::ChromeBuildProto& chrome_build_proto, | 144 const checkin_proto::ChromeBuildProto& chrome_build_proto, |
144 const base::FilePath& store_path, | 145 const base::FilePath& store_path, |
| 146 const std::vector<std::string>& account_ids, |
145 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 147 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
146 const scoped_refptr<net::URLRequestContextGetter>& | 148 const scoped_refptr<net::URLRequestContextGetter>& |
147 url_request_context_getter, | 149 url_request_context_getter, |
148 Delegate* delegate) = 0; | 150 Delegate* delegate) = 0; |
149 | 151 |
150 // Checks out of the GCM service. This will erase all the cached and persisted | 152 // Checks out of the GCM service. This will erase all the cached and persisted |
151 // data. | 153 // data. |
152 virtual void CheckOut() = 0; | 154 virtual void CheckOut() = 0; |
153 | 155 |
154 // Registers the application for GCM. Delegate::OnRegisterFinished will be | 156 // Registers the application for GCM. Delegate::OnRegisterFinished will be |
(...skipping 22 matching lines...) Expand all Loading... |
177 const std::string& receiver_id, | 179 const std::string& receiver_id, |
178 const OutgoingMessage& message) = 0; | 180 const OutgoingMessage& message) = 0; |
179 | 181 |
180 // Returns true if GCM becomes ready. | 182 // Returns true if GCM becomes ready. |
181 virtual bool IsReady() const = 0; | 183 virtual bool IsReady() const = 0; |
182 }; | 184 }; |
183 | 185 |
184 } // namespace gcm | 186 } // namespace gcm |
185 | 187 |
186 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 188 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
OLD | NEW |