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

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

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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/child_thread_impl.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 #include <memory> 9 #include <memory>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "content/common/process_control.mojom.h" 12 #include "content/common/process_control.mojom.h"
13 #include "content/public/common/mojo_application_info.h" 13 #include "content/public/common/mojo_application_info.h"
14 #include "services/shell/public/interfaces/shell_client.mojom.h" 14 #include "services/shell/public/interfaces/service.mojom.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 class EmbeddedApplicationRunner; 18 class EmbeddedApplicationRunner;
19 19
20 // Default implementation of the mojom::ProcessControl interface. 20 // Default implementation of the mojom::ProcessControl interface.
21 class ProcessControlImpl : public mojom::ProcessControl { 21 class ProcessControlImpl : public mojom::ProcessControl {
22 public: 22 public:
23 using ApplicationMap = std::map<std::string, MojoApplicationInfo>; 23 using ApplicationMap = std::map<std::string, MojoApplicationInfo>;
24 24
25 ProcessControlImpl(); 25 ProcessControlImpl();
26 ~ProcessControlImpl() override; 26 ~ProcessControlImpl() override;
27 27
28 virtual void RegisterApplications(ApplicationMap* apps) = 0; 28 virtual void RegisterApplications(ApplicationMap* apps) = 0;
29 virtual void OnApplicationQuit() {} 29 virtual void OnApplicationQuit() {}
30 30
31 // ProcessControl: 31 // ProcessControl:
32 void LoadApplication(const mojo::String& name, 32 void LoadApplication(const mojo::String& name,
33 shell::mojom::ShellClientRequest request, 33 shell::mojom::ServiceRequest request,
34 const LoadApplicationCallback& callback) override; 34 const LoadApplicationCallback& callback) override;
35 35
36 private: 36 private:
37 // Called if a LoadApplication request fails. 37 // Called if a LoadApplication request fails.
38 virtual void OnLoadFailed() {} 38 virtual void OnLoadFailed() {}
39 39
40 bool has_registered_apps_ = false; 40 bool has_registered_apps_ = false;
41 std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>> 41 std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>>
42 apps_; 42 apps_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl); 44 DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl);
45 }; 45 };
46 46
47 } // namespace content 47 } // namespace content
48 48
49 #endif // CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_ 49 #endif // CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/child_thread_impl.cc ('k') | content/child/process_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698