Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: mojo/shell/network_service_loader.h

Issue 395163002: Bundle the network service in the shell on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/shell/context.cc ('k') | mojo/shell/network_service_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 MOJO_SHELL_PROFILE_SERVICE_LOADER_H_ 5 #ifndef MOJO_SHELL_NETWORK_SERVICE_LOADER_H_
6 #define MOJO_SHELL_PROFILE_SERVICE_LOADER_H_ 6 #define MOJO_SHELL_NETWORK_SERVICE_LOADER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "mojo/public/cpp/application/application_delegate.h" 12 #include "mojo/public/cpp/application/application_delegate.h"
13 #include "mojo/service_manager/service_loader.h" 13 #include "mojo/service_manager/service_loader.h"
14 #include "mojo/services/network/network_context.h"
14 15
15 namespace mojo { 16 namespace mojo {
16 17
17 class ApplicationImpl; 18 class ApplicationImpl;
18 19
19 namespace shell { 20 namespace shell {
20 21
21 // ServiceLoader responsible for creating connections to the ProfileService. 22 // ServiceLoader responsible for creating connections to the NetworkService.
22 class ProfileServiceLoader : public ServiceLoader, public ApplicationDelegate { 23 class NetworkServiceLoader : public ServiceLoader, public ApplicationDelegate {
23 public: 24 public:
24 ProfileServiceLoader(); 25 NetworkServiceLoader();
25 virtual ~ProfileServiceLoader(); 26 virtual ~NetworkServiceLoader();
26 27
27 private: 28 private:
28 // ServiceLoader overrides: 29 // ServiceLoader overrides:
29 virtual void LoadService( 30 virtual void LoadService(
30 ServiceManager* manager, 31 ServiceManager* manager,
31 const GURL& url, 32 const GURL& url,
32 ScopedMessagePipeHandle shell_handle) OVERRIDE; 33 ScopedMessagePipeHandle shell_handle) OVERRIDE;
33 virtual void OnServiceError(ServiceManager* manager, 34 virtual void OnServiceError(ServiceManager* manager,
34 const GURL& url) OVERRIDE; 35 const GURL& url) OVERRIDE;
35 36
36 // ApplicationDelegate overrides. 37 // ApplicationDelegate overrides.
38 virtual void Initialize(ApplicationImpl* app) MOJO_OVERRIDE;
37 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) 39 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
38 MOJO_OVERRIDE; 40 MOJO_OVERRIDE;
39 41
40 base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_; 42 base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_;
43 scoped_ptr<NetworkContext> context_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(ProfileServiceLoader); 45 DISALLOW_COPY_AND_ASSIGN(NetworkServiceLoader);
43 }; 46 };
44 47
45 } // namespace shell 48 } // namespace shell
46 } // namespace mojo 49 } // namespace mojo
47 50
48 #endif // MOJO_SHELL_PROFILE_SERVICE_LOADER_H_ 51 #endif // MOJO_SHELL_NETWORK_SERVICE_LOADER_H_
OLDNEW
« no previous file with comments | « mojo/shell/context.cc ('k') | mojo/shell/network_service_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698