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_PRIVATE_COPRESENCE_PRIVATE_API_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_
H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_
H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 void OnWhispernetInitialized(bool success); | 34 void OnWhispernetInitialized(bool success); |
35 | 35 |
36 // BrowserContextKeyedAPI implementation. | 36 // BrowserContextKeyedAPI implementation. |
37 static BrowserContextKeyedAPIFactory<CopresencePrivateService>* | 37 static BrowserContextKeyedAPIFactory<CopresencePrivateService>* |
38 GetFactoryInstance(); | 38 GetFactoryInstance(); |
39 | 39 |
40 private: | 40 private: |
41 friend class BrowserContextKeyedAPIFactory<CopresencePrivateService>; | 41 friend class BrowserContextKeyedAPIFactory<CopresencePrivateService>; |
42 | 42 |
43 // BrowserContextKeyedAPI implementation. | 43 // BrowserContextKeyedAPI implementation. |
| 44 static const bool kServiceRedirectedInIncognito = true; |
44 static const char* service_name() { return "CopresencePrivateService"; } | 45 static const char* service_name() { return "CopresencePrivateService"; } |
45 | 46 |
46 bool initialized_; | 47 bool initialized_; |
47 std::map<std::string, audio_modem::WhispernetClient*> whispernet_clients_; | 48 std::map<std::string, audio_modem::WhispernetClient*> whispernet_clients_; |
48 | 49 |
49 DISALLOW_COPY_AND_ASSIGN(CopresencePrivateService); | 50 DISALLOW_COPY_AND_ASSIGN(CopresencePrivateService); |
50 }; | 51 }; |
51 | 52 |
52 template<> | 53 template<> |
53 void BrowserContextKeyedAPIFactory<CopresencePrivateService> | 54 void BrowserContextKeyedAPIFactory<CopresencePrivateService> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 COPRESENCEPRIVATE_SENDINITIALIZED); | 91 COPRESENCEPRIVATE_SENDINITIALIZED); |
91 | 92 |
92 protected: | 93 protected: |
93 ~CopresencePrivateSendInitializedFunction() override {} | 94 ~CopresencePrivateSendInitializedFunction() override {} |
94 ExtensionFunction::ResponseAction Run() override; | 95 ExtensionFunction::ResponseAction Run() override; |
95 }; | 96 }; |
96 | 97 |
97 } // namespace extensions | 98 } // namespace extensions |
98 | 99 |
99 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_A
PI_H_ | 100 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_A
PI_H_ |
OLD | NEW |