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 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 | 12 |
13 namespace gcm { | |
14 class GCMDriver; | |
15 } | |
16 | |
17 namespace net { | 13 namespace net { |
18 class URLRequestContextGetter; | 14 class URLRequestContextGetter; |
19 } | 15 } |
20 | 16 |
21 namespace copresence { | 17 namespace copresence { |
22 | 18 |
23 class Message; | 19 class Message; |
24 class WhispernetClient; | 20 class WhispernetClient; |
25 | 21 |
26 // AUDIO_FAIL indicates that we weren't able to hear the audio token that | 22 // AUDIO_FAIL indicates that we weren't able to hear the audio token that |
(...skipping 19 matching lines...) Expand all Loading... |
46 | 42 |
47 // Thw URLRequestContextGetter must outlive the CopresenceManager. | 43 // Thw URLRequestContextGetter must outlive the CopresenceManager. |
48 virtual net::URLRequestContextGetter* GetRequestContext() const = 0; | 44 virtual net::URLRequestContextGetter* GetRequestContext() const = 0; |
49 | 45 |
50 virtual const std::string GetPlatformVersionString() const = 0; | 46 virtual const std::string GetPlatformVersionString() const = 0; |
51 | 47 |
52 virtual const std::string GetAPIKey(const std::string& app_id) const = 0; | 48 virtual const std::string GetAPIKey(const std::string& app_id) const = 0; |
53 | 49 |
54 // Thw WhispernetClient must outlive the CopresenceManager. | 50 // Thw WhispernetClient must outlive the CopresenceManager. |
55 virtual WhispernetClient* GetWhispernetClient() = 0; | 51 virtual WhispernetClient* GetWhispernetClient() = 0; |
56 | |
57 // Clients may optionally provide a GCMDriver to receive messages from. | |
58 // If no driver is available, this can return null. | |
59 virtual gcm::GCMDriver* GetGCMDriver() = 0; | |
60 }; | 52 }; |
61 | 53 |
62 } // namespace copresence | 54 } // namespace copresence |
63 | 55 |
64 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ | 56 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ |
OLD | NEW |