| 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 CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // BrowserContextKeyedAPI implementation. | 56 // BrowserContextKeyedAPI implementation. |
| 57 static BrowserContextKeyedAPIFactory<CopresenceService>* GetFactoryInstance(); | 57 static BrowserContextKeyedAPIFactory<CopresenceService>* GetFactoryInstance(); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 friend class BrowserContextKeyedAPIFactory<CopresenceService>; | 60 friend class BrowserContextKeyedAPIFactory<CopresenceService>; |
| 61 | 61 |
| 62 // CopresenceDelegate implementation | 62 // CopresenceDelegate implementation |
| 63 void HandleMessages(const std::string& app_id, | 63 void HandleMessages(const std::string& app_id, |
| 64 const std::string& subscription_id, | 64 const std::string& subscription_id, |
| 65 const std::vector<copresence::Message>& message) override; | 65 const std::vector<copresence::Message>& message) override; |
| 66 void HandleStatusUpdate(copresence::CopresenceStatus status) override; |
| 66 net::URLRequestContextGetter* GetRequestContext() const override; | 67 net::URLRequestContextGetter* GetRequestContext() const override; |
| 67 const std::string GetPlatformVersionString() const override; | 68 const std::string GetPlatformVersionString() const override; |
| 68 const std::string GetAPIKey(const std::string& app_id) const override; | 69 const std::string GetAPIKey(const std::string& app_id) const override; |
| 69 const std::string GetAuthToken() const override; | 70 const std::string GetAuthToken() const override; |
| 70 copresence::WhispernetClient* GetWhispernetClient() override; | 71 copresence::WhispernetClient* GetWhispernetClient() override; |
| 71 | 72 |
| 72 // BrowserContextKeyedAPI implementation. | 73 // BrowserContextKeyedAPI implementation. |
| 73 static const char* service_name() { return "CopresenceService"; } | 74 static const char* service_name() { return "CopresenceService"; } |
| 74 | 75 |
| 75 bool is_shutting_down_; | 76 bool is_shutting_down_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 COPRESENCE_SETAUTHTOKEN); | 120 COPRESENCE_SETAUTHTOKEN); |
| 120 | 121 |
| 121 protected: | 122 protected: |
| 122 virtual ~CopresenceSetAuthTokenFunction() {} | 123 virtual ~CopresenceSetAuthTokenFunction() {} |
| 123 virtual ExtensionFunction::ResponseAction Run() override; | 124 virtual ExtensionFunction::ResponseAction Run() override; |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 } // namespace extensions | 127 } // namespace extensions |
| 127 | 128 |
| 128 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ | 129 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_COPRESENCE_API_H_ |
| OLD | NEW |