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

Side by Side Diff: content/utility/utility_process_control_impl.h

Issue 1149833007: Embed a mojo ApplicationManager in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UTILITY_PROCESS_CONTROL_IMPL_H_
6 #define UTILITY_PROCESS_CONTROL_IMPL_H_
7
8 #include <map>
9
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/common/application_registry.h"
13 #include "content/public/common/process_control.mojom.h"
14 #include "mojo/application/public/interfaces/application.mojom.h"
15 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
16 #include "url/gurl.h"
17
18 namespace mojo {
19 namespace shell {
20 class ApplicationLoader;
21 } // namespace shell
22 } // namespace mojo
23
24 namespace content {
25
26 class UtilityProcessControlImpl : public ProcessControl,
27 public ApplicationRegistry {
28 public:
29 UtilityProcessControlImpl();
30 ~UtilityProcessControlImpl() override;
31
32 using URLToLoaderMap = std::map<GURL, mojo::shell::ApplicationLoader*>;
33
34 // ProcessControl:
35 void LoadApplication(const mojo::String& url,
36 mojo::InterfaceRequest<mojo::Application> request,
37 const LoadApplicationCallback& callback) override;
38
39 // ApplicationRegistry:
40 void RegisterStaticAppForURL(const GURL& url,
41 const StaticAppFactory& factory) override;
42 private:
43
44 URLToLoaderMap url_to_loader_map_;
45
46 DISALLOW_COPY_AND_ASSIGN(UtilityProcessControlImpl);
47 };
48
49 } // namespace content
50
51 #endif // UTILITY_PROCESS_CONTROL_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698