Chromium Code Reviews| Index: content/browser/renderer_host/render_process_host_mojo_impl.h |
| diff --git a/content/browser/renderer_host/render_process_host_mojo_impl.h b/content/browser/renderer_host/render_process_host_mojo_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..67fe1e2b5adf39ebf2a9a9d0921754eaee4359a2 |
| --- /dev/null |
| +++ b/content/browser/renderer_host/render_process_host_mojo_impl.h |
| @@ -0,0 +1,52 @@ |
| +// Copyright 2014 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_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_MOJO_IMPL_H_ |
| +#define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_MOJO_IMPL_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/process/process_handle.h" |
| +#include "content/common/mojo/render_process.mojom.h" |
| +#include "mojo/public/bindings/remote_ptr.h" |
| + |
| +namespace content { |
| + |
| +class MojoChannelInit; |
| +class RenderProcessHost; |
| + |
| +// RenderProcessHostMojoImpl implements RenderProcessHostMojo. Additionally |
|
darin (slow to review)
2014/03/21 00:04:52
nit: this first sentence can be deleted as it is p
sky
2014/03/21 03:19:16
Done.
|
| +// it is responsible for initiating the connection with the content side. |
| +class RenderProcessHostMojoImpl : public RenderProcessHostMojo { |
| + public: |
| + explicit RenderProcessHostMojoImpl(RenderProcessHost* host); |
| + virtual ~RenderProcessHostMojoImpl(); |
| + |
| + void SetWebUIHandle(int32 view_routing_id, mojo::ScopedHandle handle); |
| + |
| + // Invoked when the RenderPorcessHost has established a channel. |
| + void OnProcessLaunched(); |
| + |
| +private: |
| + struct PendingHandle; |
| + |
| + // Establishes the mojo channel to the renderer. |
| + void CreateMojoChannel(base::ProcessHandle process_handle); |
| + |
| + RenderProcessHost* host_; |
| + |
| + // Used to establish the connection. |
| + scoped_ptr<MojoChannelInit> mojo_channel_init_; |
| + |
| + mojo::RemotePtr<content::RenderProcessMojo> render_process_mojo_; |
| + |
| + // If non-null we're waiting to send a WebUI handle to the renderer when |
| + // connected. |
| + scoped_ptr<PendingHandle> pending_handle_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(RenderProcessHostMojoImpl); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_MOJO_IMPL_H_ |