Index: content/browser/mojo/mojo_shell_context.cc |
diff --git a/content/browser/mojo/mojo_shell_context.cc b/content/browser/mojo/mojo_shell_context.cc |
index e454437fb8314781a70e470c1cd1df3a386616dd..eebbff6acc192636167af120622c59c8302caac6 100644 |
--- a/content/browser/mojo/mojo_shell_context.cc |
+++ b/content/browser/mojo/mojo_shell_context.cc |
@@ -60,7 +60,7 @@ void SetConnectorOnIOThread(std::unique_ptr<shell::Connector> connector) { |
} |
void DestroyConnectorOnIOThread() { |
- delete MojoShellContext::GetConnectorForIOThread(); |
+ delete ShellContext::GetConnectorForIOThread(); |
io_connector_tls_ptr.Pointer()->Set(nullptr); |
} |
@@ -336,12 +336,6 @@ void MojoShellContext::ConnectToApplication( |
std::move(exposed_services), callback); |
} |
-// static |
-shell::Connector* MojoShellContext::GetConnectorForIOThread() { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
- return io_connector_tls_ptr.Pointer()->Get(); |
-} |
- |
void MojoShellContext::ConnectToApplicationOnOwnThread( |
const std::string& user_id, |
const std::string& name, |
@@ -359,4 +353,16 @@ void MojoShellContext::ConnectToApplicationOnOwnThread( |
shell_->Connect(std::move(params)); |
} |
+// static |
+std::unique_ptr<ShellContext> ShellContext::Create() { |
+ return base::WrapUnique(new MojoShellContext); |
+} |
+ |
+// static |
+shell::Connector* ShellContext::GetConnectorForIOThread() { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
+ return io_connector_tls_ptr.Pointer()->Get(); |
+} |
+ |
+ |
} // namespace content |