| 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> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 14 #include "base/process/process.h" | 14 #include "base/process/process.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "content/browser/child_process_launcher.h" | 16 #include "content/browser/child_process_launcher.h" |
| 17 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 17 #include "content/browser/power_monitor_message_broadcaster.h" | 18 #include "content/browser/power_monitor_message_broadcaster.h" |
| 18 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 19 #include "content/public/browser/gpu_data_manager_observer.h" | 20 #include "content/public/browser/gpu_data_manager_observer.h" |
| 20 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 21 #include "ipc/ipc_channel_proxy.h" | 22 #include "ipc/ipc_channel_proxy.h" |
| 22 #include "ipc/ipc_platform_file.h" | 23 #include "ipc/ipc_platform_file.h" |
| 23 #include "mojo/public/cpp/bindings/interface_ptr.h" | 24 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 24 | 25 |
| 25 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
| 26 #include <IOSurface/IOSurfaceAPI.h> | 27 #include <IOSurface/IOSurfaceAPI.h> |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 void EndFrameSubscription(int route_id); | 177 void EndFrameSubscription(int route_id); |
| 177 | 178 |
| 178 #if defined(ENABLE_WEBRTC) | 179 #if defined(ENABLE_WEBRTC) |
| 179 // Fires the webrtc log message callback with |message|, if callback is set. | 180 // Fires the webrtc log message callback with |message|, if callback is set. |
| 180 void WebRtcLogMessage(const std::string& message); | 181 void WebRtcLogMessage(const std::string& message); |
| 181 #endif | 182 #endif |
| 182 | 183 |
| 183 scoped_refptr<ScreenOrientationDispatcherHost> | 184 scoped_refptr<ScreenOrientationDispatcherHost> |
| 184 screen_orientation_dispatcher_host() const; | 185 screen_orientation_dispatcher_host() const; |
| 185 | 186 |
| 187 // Used to extend the lifetime of the sessions until the render view |
| 188 // in the renderer is fully closed. This is static because its also called |
| 189 // with mock hosts as input in test cases. |
| 190 static void ReleaseOnCloseACK( |
| 191 RenderProcessHost* host, |
| 192 const SessionStorageNamespaceMap& sessions, |
| 193 int view_route_id); |
| 194 |
| 186 // Register/unregister the host identified by the host id in the global host | 195 // Register/unregister the host identified by the host id in the global host |
| 187 // list. | 196 // list. |
| 188 static void RegisterHost(int host_id, RenderProcessHost* host); | 197 static void RegisterHost(int host_id, RenderProcessHost* host); |
| 189 static void UnregisterHost(int host_id); | 198 static void UnregisterHost(int host_id); |
| 190 | 199 |
| 191 // Implementation of FilterURL below that can be shared with the mock class. | 200 // Implementation of FilterURL below that can be shared with the mock class. |
| 192 static void FilterURL(RenderProcessHost* rph, bool empty_allowed, GURL* url); | 201 static void FilterURL(RenderProcessHost* rph, bool empty_allowed, GURL* url); |
| 193 | 202 |
| 194 // Returns true if |host| is suitable for launching a new view with |site_url| | 203 // Returns true if |host| is suitable for launching a new view with |site_url| |
| 195 // in the given |browser_context|. | 204 // in the given |browser_context|. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 295 |
| 287 // Creates and adds the IO thread message filters. | 296 // Creates and adds the IO thread message filters. |
| 288 void CreateMessageFilters(); | 297 void CreateMessageFilters(); |
| 289 | 298 |
| 290 // Control message handlers. | 299 // Control message handlers. |
| 291 void OnShutdownRequest(); | 300 void OnShutdownRequest(); |
| 292 void OnDumpHandlesDone(); | 301 void OnDumpHandlesDone(); |
| 293 void SuddenTerminationChanged(bool enabled); | 302 void SuddenTerminationChanged(bool enabled); |
| 294 void OnUserMetricsRecordAction(const std::string& action); | 303 void OnUserMetricsRecordAction(const std::string& action); |
| 295 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); | 304 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); |
| 305 void OnCloseACK(int old_route_id); |
| 296 | 306 |
| 297 // CompositorSurfaceBuffersSwapped handler when there's no RWH. | 307 // CompositorSurfaceBuffersSwapped handler when there's no RWH. |
| 298 void OnCompositorSurfaceBuffersSwappedNoHost( | 308 void OnCompositorSurfaceBuffersSwappedNoHost( |
| 299 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); | 309 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); |
| 300 | 310 |
| 301 // Generates a command line to be used to spawn a renderer and appends the | 311 // Generates a command line to be used to spawn a renderer and appends the |
| 302 // results to |*command_line|. | 312 // results to |*command_line|. |
| 303 void AppendRendererCommandLine(base::CommandLine* command_line) const; | 313 void AppendRendererCommandLine(base::CommandLine* command_line) const; |
| 304 | 314 |
| 305 // Copies applicable command line switches from the given |browser_cmd| line | 315 // Copies applicable command line switches from the given |browser_cmd| line |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 #if defined(OS_MACOSX) | 464 #if defined(OS_MACOSX) |
| 455 base::ScopedCFTypeRef<IOSurfaceRef> last_io_surface_; | 465 base::ScopedCFTypeRef<IOSurfaceRef> last_io_surface_; |
| 456 #endif | 466 #endif |
| 457 | 467 |
| 458 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 468 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 459 }; | 469 }; |
| 460 | 470 |
| 461 } // namespace content | 471 } // namespace content |
| 462 | 472 |
| 463 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 473 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |