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

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

Issue 1675153002: ApplicationImpl->ShellConnection, mojom::Application->mojom::ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ci2
Patch Set: . Created 4 years, 10 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/browser/mojo/mojo_shell_context.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 "mojo/shell/public/interfaces/application.mojom.h" 13 #include "mojo/shell/public/interfaces/shell_client.mojom.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace shell { 18 namespace shell {
19 class ApplicationLoader; 19 class ApplicationLoader;
20 } // namespace shell 20 } // namespace shell
21 } // namespace mojo 21 } // namespace mojo
22 22
23 namespace content { 23 namespace content {
24 24
25 // Default implementation of the ProcessControl interface. 25 // Default implementation of the ProcessControl interface.
26 class ProcessControlImpl : public ProcessControl { 26 class ProcessControlImpl : public ProcessControl {
27 public: 27 public:
28 ProcessControlImpl(); 28 ProcessControlImpl();
29 ~ProcessControlImpl() override; 29 ~ProcessControlImpl() override;
30 30
31 using URLToLoaderMap = std::map<GURL, mojo::shell::ApplicationLoader*>; 31 using URLToLoaderMap = std::map<GURL, mojo::shell::ApplicationLoader*>;
32 32
33 // Registers Mojo applications loaders for URLs. 33 // Registers Mojo applications loaders for URLs.
34 virtual void RegisterApplicationLoaders( 34 virtual void RegisterApplicationLoaders(
35 URLToLoaderMap* url_to_loader_map) = 0; 35 URLToLoaderMap* url_to_loader_map) = 0;
36 36
37 // ProcessControl: 37 // ProcessControl:
38 void LoadApplication( 38 void LoadApplication(
39 const mojo::String& url, 39 const mojo::String& url,
40 mojo::InterfaceRequest<mojo::shell::mojom::Application> request, 40 mojo::InterfaceRequest<mojo::shell::mojom::ShellClient> request,
41 const LoadApplicationCallback& callback) override; 41 const LoadApplicationCallback& callback) override;
42 42
43 private: 43 private:
44 // Called if a LoadApplication request fails. 44 // Called if a LoadApplication request fails.
45 virtual void OnLoadFailed() {} 45 virtual void OnLoadFailed() {}
46 46
47 bool has_registered_loaders_ = false; 47 bool has_registered_loaders_ = false;
48 URLToLoaderMap url_to_loader_map_; 48 URLToLoaderMap url_to_loader_map_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl); 50 DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl);
51 }; 51 };
52 52
53 } // namespace content 53 } // namespace content
54 54
55 #endif // CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_ 55 #endif // CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/mojo/mojo_shell_context.cc ('k') | content/child/process_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698