OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "content/public/browser/render_process_host.h" | 23 #include "content/public/browser/render_process_host.h" |
24 #include "ipc/ipc_channel_proxy.h" | 24 #include "ipc/ipc_channel_proxy.h" |
25 #include "ipc/ipc_platform_file.h" | 25 #include "ipc/ipc_platform_file.h" |
26 #include "mojo/public/cpp/bindings/interface_ptr.h" | 26 #include "mojo/public/cpp/bindings/interface_ptr.h" |
27 | 27 |
28 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
29 #include <IOSurface/IOSurfaceAPI.h> | 29 #include <IOSurface/IOSurfaceAPI.h> |
30 #include "base/mac/scoped_cftyperef.h" | 30 #include "base/mac/scoped_cftyperef.h" |
31 #endif | 31 #endif |
32 | 32 |
33 struct ViewHostMsg_CompositorSurfaceBuffersSwapped_Params; | |
34 | |
35 namespace base { | 33 namespace base { |
36 class CommandLine; | 34 class CommandLine; |
37 class MessageLoop; | 35 class MessageLoop; |
38 } | 36 } |
39 | 37 |
40 namespace gfx { | 38 namespace gfx { |
41 class Size; | 39 class Size; |
42 struct GpuMemoryBufferHandle; | 40 struct GpuMemoryBufferHandle; |
43 } | 41 } |
44 | 42 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 virtual ~RenderProcessHostImpl(); | 90 virtual ~RenderProcessHostImpl(); |
93 | 91 |
94 // RenderProcessHost implementation (public portion). | 92 // RenderProcessHost implementation (public portion). |
95 virtual void EnableSendQueue() OVERRIDE; | 93 virtual void EnableSendQueue() OVERRIDE; |
96 virtual bool Init() OVERRIDE; | 94 virtual bool Init() OVERRIDE; |
97 virtual int GetNextRoutingID() OVERRIDE; | 95 virtual int GetNextRoutingID() OVERRIDE; |
98 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; | 96 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; |
99 virtual void RemoveRoute(int32 routing_id) OVERRIDE; | 97 virtual void RemoveRoute(int32 routing_id) OVERRIDE; |
100 virtual void AddObserver(RenderProcessHostObserver* observer) OVERRIDE; | 98 virtual void AddObserver(RenderProcessHostObserver* observer) OVERRIDE; |
101 virtual void RemoveObserver(RenderProcessHostObserver* observer) OVERRIDE; | 99 virtual void RemoveObserver(RenderProcessHostObserver* observer) OVERRIDE; |
102 virtual bool WaitForBackingStoreMsg(int render_widget_id, | |
103 const base::TimeDelta& max_delay, | |
104 IPC::Message* msg) OVERRIDE; | |
105 virtual void ReceivedBadMessage() OVERRIDE; | 100 virtual void ReceivedBadMessage() OVERRIDE; |
106 virtual void WidgetRestored() OVERRIDE; | 101 virtual void WidgetRestored() OVERRIDE; |
107 virtual void WidgetHidden() OVERRIDE; | 102 virtual void WidgetHidden() OVERRIDE; |
108 virtual int VisibleWidgetCount() const OVERRIDE; | 103 virtual int VisibleWidgetCount() const OVERRIDE; |
109 virtual bool IsIsolatedGuest() const OVERRIDE; | 104 virtual bool IsIsolatedGuest() const OVERRIDE; |
110 virtual StoragePartition* GetStoragePartition() const OVERRIDE; | 105 virtual StoragePartition* GetStoragePartition() const OVERRIDE; |
111 virtual bool FastShutdownIfPossible() OVERRIDE; | 106 virtual bool FastShutdownIfPossible() OVERRIDE; |
112 virtual void DumpHandles() OVERRIDE; | 107 virtual void DumpHandles() OVERRIDE; |
113 virtual base::ProcessHandle GetHandle() const OVERRIDE; | 108 virtual base::ProcessHandle GetHandle() const OVERRIDE; |
114 virtual BrowserContext* GetBrowserContext() const OVERRIDE; | 109 virtual BrowserContext* GetBrowserContext() const OVERRIDE; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 void CreateMessageFilters(); | 283 void CreateMessageFilters(); |
289 | 284 |
290 // Control message handlers. | 285 // Control message handlers. |
291 void OnShutdownRequest(); | 286 void OnShutdownRequest(); |
292 void OnDumpHandlesDone(); | 287 void OnDumpHandlesDone(); |
293 void SuddenTerminationChanged(bool enabled); | 288 void SuddenTerminationChanged(bool enabled); |
294 void OnUserMetricsRecordAction(const std::string& action); | 289 void OnUserMetricsRecordAction(const std::string& action); |
295 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); | 290 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); |
296 void OnCloseACK(int old_route_id); | 291 void OnCloseACK(int old_route_id); |
297 | 292 |
298 // CompositorSurfaceBuffersSwapped handler when there's no RWH. | |
299 void OnCompositorSurfaceBuffersSwappedNoHost( | |
300 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); | |
301 | |
302 // Generates a command line to be used to spawn a renderer and appends the | 293 // Generates a command line to be used to spawn a renderer and appends the |
303 // results to |*command_line|. | 294 // results to |*command_line|. |
304 void AppendRendererCommandLine(base::CommandLine* command_line) const; | 295 void AppendRendererCommandLine(base::CommandLine* command_line) const; |
305 | 296 |
306 // Copies applicable command line switches from the given |browser_cmd| line | 297 // Copies applicable command line switches from the given |browser_cmd| line |
307 // flags to the output |renderer_cmd| line flags. Not all switches will be | 298 // flags to the output |renderer_cmd| line flags. Not all switches will be |
308 // copied over. | 299 // copied over. |
309 void PropagateBrowserCommandLineToRenderer( | 300 void PropagateBrowserCommandLineToRenderer( |
310 const base::CommandLine& browser_cmd, | 301 const base::CommandLine& browser_cmd, |
311 base::CommandLine* renderer_cmd) const; | 302 base::CommandLine* renderer_cmd) const; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 #if defined(OS_MACOSX) | 452 #if defined(OS_MACOSX) |
462 base::ScopedCFTypeRef<IOSurfaceRef> last_io_surface_; | 453 base::ScopedCFTypeRef<IOSurfaceRef> last_io_surface_; |
463 #endif | 454 #endif |
464 | 455 |
465 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 456 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
466 }; | 457 }; |
467 | 458 |
468 } // namespace content | 459 } // namespace content |
469 | 460 |
470 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 461 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |