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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // communicate through the two process objects. | 43 // communicate through the two process objects. |
44 class CONTENT_EXPORT BrowserRenderProcessHost | 44 class CONTENT_EXPORT BrowserRenderProcessHost |
45 : public RenderProcessHost, | 45 : public RenderProcessHost, |
46 public ChildProcessLauncher::Client, | 46 public ChildProcessLauncher::Client, |
47 public base::WaitableEventWatcher::Delegate { | 47 public base::WaitableEventWatcher::Delegate { |
48 public: | 48 public: |
49 explicit BrowserRenderProcessHost(content::BrowserContext* browser_context); | 49 explicit BrowserRenderProcessHost(content::BrowserContext* browser_context); |
50 virtual ~BrowserRenderProcessHost(); | 50 virtual ~BrowserRenderProcessHost(); |
51 | 51 |
52 // RenderProcessHost implementation (public portion). | 52 // RenderProcessHost implementation (public portion). |
53 virtual void EnableSendQueue(); | 53 virtual void EnableSendQueue() OVERRIDE; |
54 virtual bool Init(bool is_accessibility_enabled); | 54 virtual bool Init(bool is_accessibility_enabled) OVERRIDE; |
55 virtual int GetNextRoutingID(); | 55 virtual int GetNextRoutingID() OVERRIDE; |
56 virtual void CancelResourceRequests(int render_widget_id); | 56 virtual void CancelResourceRequests(int render_widget_id) OVERRIDE; |
57 virtual void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); | 57 virtual void CrossSiteSwapOutACK( |
| 58 const ViewMsg_SwapOut_Params& params) OVERRIDE; |
58 virtual bool WaitForUpdateMsg(int render_widget_id, | 59 virtual bool WaitForUpdateMsg(int render_widget_id, |
59 const base::TimeDelta& max_delay, | 60 const base::TimeDelta& max_delay, |
60 IPC::Message* msg); | 61 IPC::Message* msg) OVERRIDE; |
61 virtual void ReceivedBadMessage(); | 62 virtual void ReceivedBadMessage() OVERRIDE; |
62 virtual void WidgetRestored(); | 63 virtual void WidgetRestored() OVERRIDE; |
63 virtual void WidgetHidden(); | 64 virtual void WidgetHidden() OVERRIDE; |
64 virtual int VisibleWidgetCount() const; | 65 virtual int VisibleWidgetCount() const OVERRIDE; |
65 virtual bool FastShutdownIfPossible(); | 66 virtual bool FastShutdownIfPossible() OVERRIDE; |
66 virtual void DumpHandles(); | 67 virtual void DumpHandles() OVERRIDE; |
67 virtual base::ProcessHandle GetHandle(); | 68 virtual base::ProcessHandle GetHandle() OVERRIDE; |
68 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); | 69 virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id) OVERRIDE; |
69 virtual void SetCompositingSurface( | 70 virtual void SetCompositingSurface( |
70 int render_widget_id, | 71 int render_widget_id, |
71 gfx::PluginWindowHandle compositing_surface); | 72 gfx::PluginWindowHandle compositing_surface) OVERRIDE; |
72 | 73 |
73 // IPC::Channel::Sender via RenderProcessHost. | 74 // IPC::Channel::Sender via RenderProcessHost. |
74 virtual bool Send(IPC::Message* msg); | 75 virtual bool Send(IPC::Message* msg) OVERRIDE; |
75 | 76 |
76 // IPC::Channel::Listener via RenderProcessHost. | 77 // IPC::Channel::Listener via RenderProcessHost. |
77 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 78 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
78 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 79 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
79 virtual void OnChannelError() OVERRIDE; | 80 virtual void OnChannelError() OVERRIDE; |
80 | 81 |
81 // ChildProcessLauncher::Client implementation. | 82 // ChildProcessLauncher::Client implementation. |
82 virtual void OnProcessLaunched(); | 83 virtual void OnProcessLaunched() OVERRIDE; |
83 | 84 |
84 // base::WaitableEventWatcher::Delegate implementation. | 85 // base::WaitableEventWatcher::Delegate implementation. |
85 virtual void OnWaitableEventSignaled( | 86 virtual void OnWaitableEventSignaled( |
86 base::WaitableEvent* waitable_event) OVERRIDE; | 87 base::WaitableEvent* waitable_event) OVERRIDE; |
87 | 88 |
88 private: | 89 private: |
89 friend class VisitRelayingRenderProcessHost; | 90 friend class VisitRelayingRenderProcessHost; |
90 | 91 |
91 // Creates and adds the IO thread message filters. | 92 // Creates and adds the IO thread message filters. |
92 void CreateMessageFilters(); | 93 void CreateMessageFilters(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 167 |
167 #if defined(OS_WIN) | 168 #if defined(OS_WIN) |
168 // Used to wait until the renderer dies to get an accurrate exit code. | 169 // Used to wait until the renderer dies to get an accurrate exit code. |
169 base::WaitableEventWatcher child_process_watcher_; | 170 base::WaitableEventWatcher child_process_watcher_; |
170 #endif | 171 #endif |
171 | 172 |
172 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); | 173 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); |
173 }; | 174 }; |
174 | 175 |
175 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ | 176 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |