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

Unified Diff: content/child/process_control_impl.h

Issue 1889253002: Remove uses of shell::Loader from content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/child/process_control_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/process_control_impl.h
diff --git a/content/child/process_control_impl.h b/content/child/process_control_impl.h
index 2bf4e5f3d38fc8d3f5aaa1ea4a8903cae143d8f5..0ae4ab448a242ac40e0524509d3ed24aad6ee0a8 100644
--- a/content/child/process_control_impl.h
+++ b/content/child/process_control_impl.h
@@ -5,42 +5,42 @@
#ifndef CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
#define CONTENT_CHILD_PROCESS_CONTROL_IMPL_H_
-#include <map>
+#include <memory>
+#include <unordered_map>
#include "base/macros.h"
+#include "content/common/mojo/embedded_application_runner.h"
#include "content/common/process_control.mojom.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
#include "services/shell/public/interfaces/shell_client.mojom.h"
-namespace shell {
-class Loader;
-} // namespace shell
-
namespace content {
// Default implementation of the mojom::ProcessControl interface.
class ProcessControlImpl : public mojom::ProcessControl {
public:
+ using ApplicationFactoryMap =
+ std::unordered_map<std::string,
+ EmbeddedApplicationRunner::FactoryCallback>;
+
ProcessControlImpl();
~ProcessControlImpl() override;
- using NameToLoaderMap = std::map<std::string, shell::Loader*>;
-
- // Registers Mojo loaders for names.
- virtual void RegisterLoaders(NameToLoaderMap* name_to_loader_map) = 0;
+ virtual void RegisterApplicationFactories(
+ ApplicationFactoryMap* factories) = 0;
+ virtual void OnApplicationQuit() {}
// ProcessControl:
- void LoadApplication(
- const mojo::String& name,
- mojo::InterfaceRequest<shell::mojom::ShellClient> request,
- const LoadApplicationCallback& callback) override;
+ void LoadApplication(const mojo::String& name,
+ shell::mojom::ShellClientRequest request,
+ const LoadApplicationCallback& callback) override;
private:
// Called if a LoadApplication request fails.
virtual void OnLoadFailed() {}
- bool has_registered_loaders_ = false;
- NameToLoaderMap name_to_loader_map_;
+ bool has_registered_apps_ = false;
+ std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>>
+ apps_;
DISALLOW_COPY_AND_ASSIGN(ProcessControlImpl);
};
« no previous file with comments | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/child/process_control_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698