| 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_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ | 5 #ifndef COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ |
| 6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ | 6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // be sent to their respective apps. | 30 // be sent to their respective apps. |
| 31 virtual void HandleMessages( | 31 virtual void HandleMessages( |
| 32 const std::string& app_id, | 32 const std::string& app_id, |
| 33 const std::string& subscription_id, | 33 const std::string& subscription_id, |
| 34 const std::vector<copresence::Message>& message) = 0; | 34 const std::vector<copresence::Message>& message) = 0; |
| 35 | 35 |
| 36 virtual net::URLRequestContextGetter* GetRequestContext() const = 0; | 36 virtual net::URLRequestContextGetter* GetRequestContext() const = 0; |
| 37 | 37 |
| 38 virtual const std::string GetPlatformVersionString() const = 0; | 38 virtual const std::string GetPlatformVersionString() const = 0; |
| 39 | 39 |
| 40 // Methods to set and and get our device ID. This needs to be saved to | |
| 41 // persistent storage to avoid flooding the Copresence server with generate | |
| 42 // id requests. | |
| 43 virtual const std::string GetDeviceId() const = 0; | |
| 44 virtual void SaveDeviceId(const std::string& device_id) = 0; | |
| 45 | |
| 46 virtual WhispernetClient* GetWhispernetClient() = 0; | 40 virtual WhispernetClient* GetWhispernetClient() = 0; |
| 47 }; | 41 }; |
| 48 | 42 |
| 49 } // namespace copresence | 43 } // namespace copresence |
| 50 | 44 |
| 51 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ | 45 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ |
| OLD | NEW |