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

Unified Diff: chrome/utility/chrome_content_utility_process_impl.h

Issue 1128453004: Embed a simple Mojo shell in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: chrome/utility/chrome_content_utility_process_impl.h
diff --git a/chrome/utility/chrome_content_utility_process_impl.h b/chrome/utility/chrome_content_utility_process_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..7714c3cb7240199f837657ec022b4acc95d33b80
--- /dev/null
+++ b/chrome/utility/chrome_content_utility_process_impl.h
@@ -0,0 +1,43 @@
+// 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 CHROME_UTILITY_CHROME_CONTENT_UTILITY_PROCESS_IMPL_H_
+#define CHROME_UTILITY_CHROME_CONTENT_UTILITY_PROCESS_IMPL_H_
+
+#include <map>
+
+#include "base/macros.h"
+#include "content/public/common/process.mojom.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
+#include "third_party/mojo/src/mojo/public/interfaces/application/application.mojom.h"
+#include "url/gurl.h"
+
+namespace mojo {
+namespace shell {
+class ApplicationLoader;
+} // namespace shell
+} // namespace mojo
+
+class ChromeContentUtilityProcessImpl : public content::Process {
+ public:
+ explicit ChromeContentUtilityProcessImpl();
+ ~ChromeContentUtilityProcessImpl() override;
+
+ private:
+ using URLToLoaderMap = std::map<GURL, mojo::shell::ApplicationLoader*>;
+
+ // content::Process:
+ void LoadApplication(const mojo::String& url,
+ mojo::InterfaceRequest<mojo::Application> request,
+ const LoadApplicationCallback& callback) override;
+
+ void RegisterApplication(const GURL& url,
+ mojo::shell::ApplicationLoader* loader);
+
+ URLToLoaderMap url_to_loader_map_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityProcessImpl);
+};
+
+#endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_PROCESS_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698