| 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_
|
|
|