OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_SHELL_CONTEXT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_SHELL_CONTEXT_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "content/common/content_export.h" |
| 11 |
| 12 namespace shell { |
| 13 class Connector; |
| 14 } |
| 15 |
| 16 namespace content { |
| 17 |
| 18 // Sets up the Shell for the browser process. If the browser process is launched |
| 19 // from an external Shell, this configures that connection. If it was not, this |
| 20 // creates a Shell instance. |
| 21 class CONTENT_EXPORT ShellContext { |
| 22 public: |
| 23 virtual ~ShellContext() {} |
| 24 |
| 25 // Create an instance of the context, binding to the external shell that |
| 26 // launched this process or creating one. Must be called on the main thread. |
| 27 static std::unique_ptr<ShellContext> Create(); |
| 28 |
| 29 // Returns a shell::Connector that can only be used on the IO thread. Can only |
| 30 // be called after Create() has been called on the main thread. |
| 31 static shell::Connector* GetConnectorForIOThread(); |
| 32 }; |
| 33 |
| 34 } // namespace content |
| 35 |
| 36 #endif // CONTENT_PUBLIC_BROWSER_SHELL_CONTEXT_H_ |
OLD | NEW |