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

Unified Diff: content/utility/utility_process_control_impl.h

Issue 1149833007: Embed a mojo ApplicationManager in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
Index: content/utility/utility_process_control_impl.h
diff --git a/content/utility/utility_process_control_impl.h b/content/utility/utility_process_control_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..dcc0a4d6179a1b1cddeabe616183a999a0aecb30
--- /dev/null
+++ b/content/utility/utility_process_control_impl.h
@@ -0,0 +1,48 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UTILITY_PROCESS_CONTROL_IMPL_H_
+#define UTILITY_PROCESS_CONTROL_IMPL_H_
+
+#include <map>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/common/process_control.mojom.h"
+#include "mojo/application/public/interfaces/application.mojom.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
+
+class GURL;
+
+namespace mojo {
+namespace shell {
+class ApplicationLoader;
+} // namespace shell
+} // namespace mojo
+
+namespace content {
+
+// Implementation of the ProcessControl interface. Exposed to the browser via
+// the utility process's ServiceRegistry.
+class UtilityProcessControlImpl : public ProcessControl {
+ public:
+ UtilityProcessControlImpl();
+ ~UtilityProcessControlImpl() override;
+
+ using URLToLoaderMap = std::map<GURL, mojo::shell::ApplicationLoader*>;
+
+ // ProcessControl:
+ void LoadApplication(const mojo::String& url,
+ mojo::InterfaceRequest<mojo::Application> request,
+ const LoadApplicationCallback& callback) override;
+
+ private:
+ URLToLoaderMap url_to_loader_map_;
+
+ DISALLOW_COPY_AND_ASSIGN(UtilityProcessControlImpl);
+};
+
+} // namespace content
+
+#endif // UTILITY_PROCESS_CONTROL_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698