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

Side by Side Diff: content/child/process_control_impl.h

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | content/child/process_control_impl.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 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 CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_ 5 #ifndef CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
6 #define CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_ 6 #define CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/common/process_control.mojom.h" 11 #include "content/common/process_control.mojom.h"
12 #include "mojo/public/cpp/bindings/interface_request.h" 12 #include "mojo/public/cpp/bindings/interface_request.h"
13 #include "services/shell/public/interfaces/shell_client.mojom.h" 13 #include "services/shell/public/interfaces/shell_client.mojom.h"
14 14
15 namespace mojo {
16 namespace shell { 15 namespace shell {
17 class Loader; 16 class Loader;
18 } // namespace shell 17 } // namespace shell
19 } // namespace mojo
20 18
21 namespace content { 19 namespace content {
22 20
23 // Default implementation of the mojom::ProcessControl interface. 21 // Default implementation of the mojom::ProcessControl interface.
24 class ProcessControlImpl : public mojom::ProcessControl { 22 class ProcessControlImpl : public mojom::ProcessControl {
25 public: 23 public:
26 ProcessControlImpl(); 24 ProcessControlImpl();
27 ~ProcessControlImpl() override; 25 ~ProcessControlImpl() override;
28 26
29 using NameToLoaderMap = std::map<std::string, mojo::shell::Loader*>; 27 using NameToLoaderMap = std::map<std::string, shell::Loader*>;
30 28
31 // Registers Mojo loaders for names. 29 // Registers Mojo loaders for names.
32 virtual void RegisterLoaders(NameToLoaderMap* name_to_loader_map) = 0; 30 virtual void RegisterLoaders(NameToLoaderMap* name_to_loader_map) = 0;
33 31
34 // ProcessControl: 32 // ProcessControl:
35 void LoadApplication( 33 void LoadApplication(
36 const mojo::String& name, 34 const mojo::String& name,
37 mojo::InterfaceRequest<mojo::shell::mojom::ShellClient> request, 35 mojo::InterfaceRequest<shell::mojom::ShellClient> request,
38 const LoadApplicationCallback& callback) override; 36 const LoadApplicationCallback& callback) override;
39 37
40 private: 38 private:
41 // Called if a LoadApplication request fails. 39 // Called if a LoadApplication request fails.
42 virtual void OnLoadFailed() {} 40 virtual void OnLoadFailed() {}
43 41
44 bool has_registered_loaders_ = false; 42 bool has_registered_loaders_ = false;
45 NameToLoaderMap name_to_loader_map_; 43 NameToLoaderMap name_to_loader_map_;
46 44
47 DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl); 45 DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl);
48 }; 46 };
49 47
50 } // namespace content 48 } // namespace content
51 49
52 #endif // CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_ 50 #endif // CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/mojo/mojo_application.cc ('k') | content/child/process_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698