Update activity log owners
[chromium-blink-merge.git] / content / utility / utility_process_control_impl.h
blobdcc0a4d6179a1b1cddeabe616183a999a0aecb30
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.
5 #ifndef UTILITY_PROCESS_CONTROL_IMPL_H_
6 #define UTILITY_PROCESS_CONTROL_IMPL_H_
8 #include <map>
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.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"
16 class GURL;
18 namespace mojo {
19 namespace shell {
20 class ApplicationLoader;
21 } // namespace shell
22 } // namespace mojo
24 namespace content {
26 // Implementation of the ProcessControl interface. Exposed to the browser via
27 // the utility process's ServiceRegistry.
28 class UtilityProcessControlImpl : public ProcessControl {
29 public:
30 UtilityProcessControlImpl();
31 ~UtilityProcessControlImpl() override;
33 using URLToLoaderMap = std::map<GURL, mojo::shell::ApplicationLoader*>;
35 // ProcessControl:
36 void LoadApplication(const mojo::String& url,
37 mojo::InterfaceRequest<mojo::Application> request,
38 const LoadApplicationCallback& callback) override;
40 private:
41 URLToLoaderMap url_to_loader_map_;
43 DISALLOW_COPY_AND_ASSIGN(UtilityProcessControlImpl);
46 } // namespace content
48 #endif // UTILITY_PROCESS_CONTROL_IMPL_H_