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

Unified Diff: content/public/browser/shell_context.h

Issue 2112543002: Convert UtilityProcessHost to bootstrap Mojo Channel using the Shell connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p9x
Patch Set: . Created 4 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
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/common/child_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/shell_context.h
diff --git a/content/public/browser/shell_context.h b/content/public/browser/shell_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3a55c39bbaaa15f5cacf1fe8b54414c401ee298
--- /dev/null
+++ b/content/public/browser/shell_context.h
@@ -0,0 +1,36 @@
+// Copyright 2016 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 CONTENT_PUBLIC_BROWSER_SHELL_CONTEXT_H_
+#define CONTENT_PUBLIC_BROWSER_SHELL_CONTEXT_H_
+
+#include <memory>
+
+#include "content/common/content_export.h"
+
+namespace shell {
+class Connector;
+}
+
+namespace content {
+
+// Sets up the Shell for the browser process. If the browser process is launched
+// from an external Shell, this configures that connection. If it was not, this
+// creates a Shell instance.
+class CONTENT_EXPORT ShellContext {
+ public:
+ virtual ~ShellContext() {}
+
+ // Create an instance of the context, binding to the external shell that
+ // launched this process or creating one. Must be called on the main thread.
+ static std::unique_ptr<ShellContext> Create();
+
+ // Returns a shell::Connector that can only be used on the IO thread. Can only
+ // be called after Create() has been called on the main thread.
+ static shell::Connector* GetConnectorForIOThread();
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_SHELL_CONTEXT_H_
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/common/child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698