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 UTILITY_PROCESS_CONTROL_IMPL_H_ | 5 #ifndef CONTENT_UTILITY_UTILITY_PROCESS_CONTROL_IMPL_H_ |
6 #define UTILITY_PROCESS_CONTROL_IMPL_H_ | 6 #define CONTENT_UTILITY_UTILITY_PROCESS_CONTROL_IMPL_H_ |
7 | |
8 #include <map> | |
9 | 7 |
10 #include "base/macros.h" | 8 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 9 #include "content/child/process_control_impl.h" |
12 #include "content/common/process_control.mojom.h" | |
13 #include "mojo/application/public/interfaces/application.mojom.h" | |
14 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | |
15 | |
16 class GURL; | |
17 | |
18 namespace mojo { | |
19 namespace shell { | |
20 class ApplicationLoader; | |
21 } // namespace shell | |
22 } // namespace mojo | |
23 | 10 |
24 namespace content { | 11 namespace content { |
25 | 12 |
26 // Implementation of the ProcessControl interface. Exposed to the browser via | 13 // Customization of ProcessControlImpl for the utility process. Exposed to the |
27 // the utility process's ServiceRegistry. | 14 // browser via the utility process's ServiceRegistry. |
28 class UtilityProcessControlImpl : public ProcessControl { | 15 class UtilityProcessControlImpl : public ProcessControlImpl { |
29 public: | 16 public: |
30 UtilityProcessControlImpl(); | 17 UtilityProcessControlImpl(); |
31 ~UtilityProcessControlImpl() override; | 18 ~UtilityProcessControlImpl() override; |
32 | 19 |
33 using URLToLoaderMap = std::map<GURL, mojo::shell::ApplicationLoader*>; | 20 // ProcessControlImpl: |
34 | 21 void RegisterApplicationLoaders(URLToLoaderMap* url_to_loader_map) override; |
35 // ProcessControl: | |
36 void LoadApplication(const mojo::String& url, | |
37 mojo::InterfaceRequest<mojo::Application> request, | |
38 const LoadApplicationCallback& callback) override; | |
39 | 22 |
40 private: | 23 private: |
41 URLToLoaderMap url_to_loader_map_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(UtilityProcessControlImpl); | 24 DISALLOW_COPY_AND_ASSIGN(UtilityProcessControlImpl); |
44 }; | 25 }; |
45 | 26 |
46 } // namespace content | 27 } // namespace content |
47 | 28 |
48 #endif // UTILITY_PROCESS_CONTROL_IMPL_H_ | 29 #endif // CONTENT_UTILITY_UTILITY_PROCESS_CONTROL_IMPL_H_ |
OLD | NEW |