| 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_DESKTOP_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 void UnregisterImpl(const std::string& app_id) override; | 104 void UnregisterImpl(const std::string& app_id) override; |
| 105 void SendImpl(const std::string& app_id, | 105 void SendImpl(const std::string& app_id, |
| 106 const std::string& receiver_id, | 106 const std::string& receiver_id, |
| 107 const OutgoingMessage& message) override; | 107 const OutgoingMessage& message) override; |
| 108 void RecordDecryptionFailure(const std::string& app_id, | 108 void RecordDecryptionFailure(const std::string& app_id, |
| 109 GCMEncryptionProvider::DecryptionResult result) | 109 GCMEncryptionProvider::DecryptionResult result) |
| 110 override; | 110 override; |
| 111 | 111 |
| 112 // InstanceIDHandler implementation: | 112 // InstanceIDHandler implementation: |
| 113 void GetToken(const std::string& app_id, | 113 void GetToken(const std::string& app_id, |
| 114 bool use_subtype, |
| 114 const std::string& authorized_entity, | 115 const std::string& authorized_entity, |
| 115 const std::string& scope, | 116 const std::string& scope, |
| 116 const std::map<std::string, std::string>& options, | 117 const std::map<std::string, std::string>& options, |
| 117 const GetTokenCallback& callback) override; | 118 const GetTokenCallback& callback) override; |
| 118 void DeleteToken(const std::string& app_id, | 119 void DeleteToken(const std::string& app_id, |
| 120 bool use_subtype, |
| 119 const std::string& authorized_entity, | 121 const std::string& authorized_entity, |
| 120 const std::string& scope, | 122 const std::string& scope, |
| 121 const DeleteTokenCallback& callback) override; | 123 const DeleteTokenCallback& callback) override; |
| 122 void AddInstanceIDData(const std::string& app_id, | 124 void AddInstanceIDData(const std::string& app_id, |
| 123 const std::string& instance_id, | 125 const std::string& instance_id, |
| 124 const std::string& extra_data) override; | 126 const std::string& extra_data) override; |
| 125 void RemoveInstanceIDData(const std::string& app_id) override; | 127 void RemoveInstanceIDData(const std::string& app_id) override; |
| 126 void GetInstanceIDData(const std::string& app_id, | 128 void GetInstanceIDData(const std::string& app_id, |
| 127 const GetInstanceIDDataCallback& callback) override; | 129 const GetInstanceIDDataCallback& callback) override; |
| 128 | 130 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 145 void DoUnregister(const std::string& app_id); | 147 void DoUnregister(const std::string& app_id); |
| 146 void DoSend(const std::string& app_id, | 148 void DoSend(const std::string& app_id, |
| 147 const std::string& receiver_id, | 149 const std::string& receiver_id, |
| 148 const OutgoingMessage& message); | 150 const OutgoingMessage& message); |
| 149 void DoAddInstanceIDData(const std::string& app_id, | 151 void DoAddInstanceIDData(const std::string& app_id, |
| 150 const std::string& instance_id, | 152 const std::string& instance_id, |
| 151 const std::string& extra_data); | 153 const std::string& extra_data); |
| 152 void DoRemoveInstanceIDData(const std::string& app_id); | 154 void DoRemoveInstanceIDData(const std::string& app_id); |
| 153 void DoGetInstanceIDData(const std::string& app_id); | 155 void DoGetInstanceIDData(const std::string& app_id); |
| 154 void DoGetToken(const std::string& app_id, | 156 void DoGetToken(const std::string& app_id, |
| 157 bool use_subtype, |
| 155 const std::string& authorized_entity, | 158 const std::string& authorized_entity, |
| 156 const std::string& scope, | 159 const std::string& scope, |
| 157 const std::map<std::string, std::string>& options); | 160 const std::map<std::string, std::string>& options); |
| 158 void DoDeleteToken(const std::string& app_id, | 161 void DoDeleteToken(const std::string& app_id, |
| 162 bool use_subtype, |
| 159 const std::string& authorized_entity, | 163 const std::string& authorized_entity, |
| 160 const std::string& scope); | 164 const std::string& scope); |
| 161 | 165 |
| 162 // Callbacks posted from IO thread to UI thread. | 166 // Callbacks posted from IO thread to UI thread. |
| 163 void MessageReceived(const std::string& app_id, | 167 void MessageReceived(const std::string& app_id, |
| 164 const IncomingMessage& message); | 168 const IncomingMessage& message); |
| 165 void MessagesDeleted(const std::string& app_id); | 169 void MessagesDeleted(const std::string& app_id); |
| 166 void MessageSendError(const std::string& app_id, | 170 void MessageSendError(const std::string& app_id, |
| 167 const GCMClient::SendErrorDetails& send_error_details); | 171 const GCMClient::SendErrorDetails& send_error_details); |
| 168 void SendAcknowledged(const std::string& app_id, | 172 void SendAcknowledged(const std::string& app_id, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 243 |
| 240 // Used to pass a weak pointer to the IO worker. | 244 // Used to pass a weak pointer to the IO worker. |
| 241 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 245 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
| 242 | 246 |
| 243 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 247 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
| 244 }; | 248 }; |
| 245 | 249 |
| 246 } // namespace gcm | 250 } // namespace gcm |
| 247 | 251 |
| 248 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 252 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| OLD | NEW |