| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual void CancelResourceRequests(int render_widget_id); | 52 virtual void CancelResourceRequests(int render_widget_id); |
| 53 virtual void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); | 53 virtual void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); |
| 54 virtual bool WaitForUpdateMsg(int render_widget_id, | 54 virtual bool WaitForUpdateMsg(int render_widget_id, |
| 55 const base::TimeDelta& max_delay, | 55 const base::TimeDelta& max_delay, |
| 56 IPC::Message* msg); | 56 IPC::Message* msg); |
| 57 virtual void ReceivedBadMessage(); | 57 virtual void ReceivedBadMessage(); |
| 58 virtual void WidgetRestored(); | 58 virtual void WidgetRestored(); |
| 59 virtual void WidgetHidden(); | 59 virtual void WidgetHidden(); |
| 60 virtual int VisibleWidgetCount() const; | 60 virtual int VisibleWidgetCount() const; |
| 61 virtual bool FastShutdownIfPossible(); | 61 virtual bool FastShutdownIfPossible(); |
| 62 virtual void DumpHandles(); |
| 62 virtual base::ProcessHandle GetHandle(); | 63 virtual base::ProcessHandle GetHandle(); |
| 63 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); | 64 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); |
| 64 virtual void SetCompositingSurface( | 65 virtual void SetCompositingSurface( |
| 65 int render_widget_id, | 66 int render_widget_id, |
| 66 gfx::PluginWindowHandle compositing_surface); | 67 gfx::PluginWindowHandle compositing_surface); |
| 67 | 68 |
| 68 // IPC::Channel::Sender via RenderProcessHost. | 69 // IPC::Channel::Sender via RenderProcessHost. |
| 69 virtual bool Send(IPC::Message* msg); | 70 virtual bool Send(IPC::Message* msg); |
| 70 | 71 |
| 71 // IPC::Channel::Listener via RenderProcessHost. | 72 // IPC::Channel::Listener via RenderProcessHost. |
| 72 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 73 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 73 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 74 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 74 virtual void OnChannelError() OVERRIDE; | 75 virtual void OnChannelError() OVERRIDE; |
| 75 | 76 |
| 76 // ChildProcessLauncher::Client implementation. | 77 // ChildProcessLauncher::Client implementation. |
| 77 virtual void OnProcessLaunched(); | 78 virtual void OnProcessLaunched(); |
| 78 | 79 |
| 79 private: | 80 private: |
| 80 friend class VisitRelayingRenderProcessHost; | 81 friend class VisitRelayingRenderProcessHost; |
| 81 | 82 |
| 82 // Creates and adds the IO thread message filters. | 83 // Creates and adds the IO thread message filters. |
| 83 void CreateMessageFilters(); | 84 void CreateMessageFilters(); |
| 84 | 85 |
| 85 // Control message handlers. | 86 // Control message handlers. |
| 86 void OnShutdownRequest(); | 87 void OnShutdownRequest(); |
| 88 void OnDumpHandlesDone(); |
| 87 void SuddenTerminationChanged(bool enabled); | 89 void SuddenTerminationChanged(bool enabled); |
| 88 void OnUserMetricsRecordAction(const std::string& action); | 90 void OnUserMetricsRecordAction(const std::string& action); |
| 89 void OnRevealFolderInOS(const FilePath& path); | 91 void OnRevealFolderInOS(const FilePath& path); |
| 90 void OnSavedPageAsMHTML(int job_id, bool success); | 92 void OnSavedPageAsMHTML(int job_id, bool success); |
| 91 | 93 |
| 92 // Generates a command line to be used to spawn a renderer and appends the | 94 // Generates a command line to be used to spawn a renderer and appends the |
| 93 // results to |*command_line|. | 95 // results to |*command_line|. |
| 94 void AppendRendererCommandLine(CommandLine* command_line) const; | 96 void AppendRendererCommandLine(CommandLine* command_line) const; |
| 95 | 97 |
| 96 // Copies applicable command line switches from the given |browser_cmd| line | 98 // Copies applicable command line switches from the given |browser_cmd| line |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Messages we queue while waiting for the process handle. We queue them here | 149 // Messages we queue while waiting for the process handle. We queue them here |
| 148 // instead of in the channel so that we ensure they're sent after init related | 150 // instead of in the channel so that we ensure they're sent after init related |
| 149 // messages that are sent once the process handle is available. This is | 151 // messages that are sent once the process handle is available. This is |
| 150 // because the queued messages may have dependencies on the init messages. | 152 // because the queued messages may have dependencies on the init messages. |
| 151 std::queue<IPC::Message*> queued_messages_; | 153 std::queue<IPC::Message*> queued_messages_; |
| 152 | 154 |
| 153 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); | 155 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 158 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |