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

Unified Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 1991323002: Send input event IPCs directly from the UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | ipc/ipc_channel_proxy.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.h
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index e46e2c511257b92098a5282633d58b3f1f738b0e..de40bf8385307a6c9f7b5d51a76078cea48d1653 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -135,6 +135,8 @@ class CONTENT_EXPORT RenderProcessHostImpl
void SetSuddenTerminationAllowed(bool enabled) override;
bool SuddenTerminationAllowed() const override;
IPC::ChannelProxy* GetChannel() override;
+ IPC::Sender* GetImmediateSender() override;
+ IPC::Sender* GetIOThreadSender() override;
void AddFilter(BrowserMessageFilter* filter) override;
bool FastShutdownForPageCount(size_t count) override;
bool FastShutdownStarted() const override;
@@ -291,8 +293,11 @@ class CONTENT_EXPORT RenderProcessHostImpl
int32_t pending_views_;
private:
- friend class VisitRelayingRenderProcessHost;
+ class SafeSenderProxy;
+
friend class ChildProcessLauncherBrowserTest_ChildSpawnFail_Test;
+ friend class SafeSenderProxy;
+ friend class VisitRelayingRenderProcessHost;
std::unique_ptr<IPC::ChannelProxy> CreateChannelProxy(
const std::string& channel_id);
@@ -300,6 +305,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
// Creates and adds the IO thread message filters.
void CreateMessageFilters();
+ // Shared implementation for IPC::Senders exposed by this RPH.
+ bool SendImpl(IPC::Message* message, bool send_now);
+
// Registers Mojo services to be exposed to the renderer.
void RegisterMojoServices();
@@ -362,6 +370,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
base::FilePath GetEventLogFilePathWithExtensions(const base::FilePath& file);
#endif
+ // An IPC::Sender which lives as long as this RPH and provides safe, opaque
+ // access to ChannelProxy SendNow() and SendOnIOThread().
+ const std::unique_ptr<SafeSenderProxy> safe_sender_;
+
std::unique_ptr<MojoChildConnection> mojo_child_connection_;
std::unique_ptr<MojoApplicationHost> mojo_application_host_;
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | ipc/ipc_channel_proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698