OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ | 5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ |
6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ | 6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ |
7 | 7 |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "mojo/services/network/network_context.h" | 10 #include "mojo/services/network/network_context.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 public InterfaceFactory<URLLoaderFactory> { | 27 public InterfaceFactory<URLLoaderFactory> { |
28 public: | 28 public: |
29 NetworkServiceDelegate(); | 29 NetworkServiceDelegate(); |
30 ~NetworkServiceDelegate() override; | 30 ~NetworkServiceDelegate() override; |
31 | 31 |
32 void AddObserver(NetworkServiceDelegateObserver* observer); | 32 void AddObserver(NetworkServiceDelegateObserver* observer); |
33 void RemoveObserver(NetworkServiceDelegateObserver* observer); | 33 void RemoveObserver(NetworkServiceDelegateObserver* observer); |
34 | 34 |
35 private: | 35 private: |
36 // mojo::ShellClient implementation. | 36 // mojo::ShellClient implementation. |
37 void Initialize(Shell* shell, const std::string& url, uint32_t id) override; | 37 void Initialize(Shell* shell, const std::string& url, |
| 38 uint32_t id, uint32_t user_id) override; |
38 bool AcceptConnection(Connection* connection) override; | 39 bool AcceptConnection(Connection* connection) override; |
39 bool ShellConnectionLost() override; | 40 bool ShellConnectionLost() override; |
40 void Quit() override; | 41 void Quit() override; |
41 | 42 |
42 // InterfaceFactory<NetworkService> implementation. | 43 // InterfaceFactory<NetworkService> implementation. |
43 void Create(Connection* connection, | 44 void Create(Connection* connection, |
44 InterfaceRequest<NetworkService> request) override; | 45 InterfaceRequest<NetworkService> request) override; |
45 | 46 |
46 // InterfaceFactory<CookieStore> implementation. | 47 // InterfaceFactory<CookieStore> implementation. |
47 void Create(Connection* connection, | 48 void Create(Connection* connection, |
(...skipping 13 matching lines...) Expand all Loading... |
61 | 62 |
62 // Observers that want notifications that our worker thread is going away. | 63 // Observers that want notifications that our worker thread is going away. |
63 base::ObserverList<NetworkServiceDelegateObserver> observers_; | 64 base::ObserverList<NetworkServiceDelegateObserver> observers_; |
64 | 65 |
65 scoped_ptr<NetworkContext> context_; | 66 scoped_ptr<NetworkContext> context_; |
66 }; | 67 }; |
67 | 68 |
68 } // namespace mojo | 69 } // namespace mojo |
69 | 70 |
70 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ | 71 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ |
OLD | NEW |