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

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

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « mojo/shell/mojo_url_resolver_unittest.cc ('k') | mojo/shell/network_application_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SHELL_NETWORK_APPLICATION_LOADER_H_
6 #define MOJO_SHELL_NETWORK_APPLICATION_LOADER_H_
7
8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "mojo/application_manager/application_loader.h"
12 #include "mojo/public/cpp/application/application_delegate.h"
13 #include "mojo/public/cpp/application/interface_factory.h"
14 #include "mojo/services/network/network_context.h"
15
16 namespace mojo {
17
18 class ApplicationImpl;
19 class NetworkService;
20
21 namespace shell {
22
23 // ApplicationLoader responsible for creating connections to the NetworkService.
24 class NetworkApplicationLoader : public ApplicationLoader,
25 public ApplicationDelegate,
26 public InterfaceFactory<NetworkService> {
27 public:
28 NetworkApplicationLoader();
29 virtual ~NetworkApplicationLoader();
30
31 private:
32 // ApplicationLoader overrides:
33 virtual void Load(ApplicationManager* manager,
34 const GURL& url,
35 ScopedMessagePipeHandle shell_handle,
36 LoadCallback callback) override;
37 virtual void OnApplicationError(ApplicationManager* manager,
38 const GURL& url) override;
39
40 // ApplicationDelegate overrides.
41 virtual void Initialize(ApplicationImpl* app) override;
42 virtual bool ConfigureIncomingConnection(
43 ApplicationConnection* connection) override;
44
45 // InterfaceFactory<NetworkService> overrides.
46 virtual void Create(ApplicationConnection* connection,
47 InterfaceRequest<NetworkService> request) override;
48
49 base::ScopedPtrHashMap<uintptr_t, ApplicationImpl> apps_;
50 scoped_ptr<NetworkContext> context_;
51
52 DISALLOW_COPY_AND_ASSIGN(NetworkApplicationLoader);
53 };
54
55 } // namespace shell
56 } // namespace mojo
57
58 #endif // MOJO_SHELL_NETWORK_APPLICATION_LOADER_H_
OLDNEW
« no previous file with comments | « mojo/shell/mojo_url_resolver_unittest.cc ('k') | mojo/shell/network_application_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698