| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Called when the existence of the other renderer process which is connected | 245 // Called when the existence of the other renderer process which is connected |
| 246 // to the Worker in this renderer process has changed. | 246 // to the Worker in this renderer process has changed. |
| 247 // It is only called when "enable-embedded-shared-worker" flag is set. | 247 // It is only called when "enable-embedded-shared-worker" flag is set. |
| 248 void IncrementWorkerRefCount(); | 248 void IncrementWorkerRefCount(); |
| 249 void DecrementWorkerRefCount(); | 249 void DecrementWorkerRefCount(); |
| 250 | 250 |
| 251 // Call this function to resume the navigation when it was deferred | 251 // Call this function to resume the navigation when it was deferred |
| 252 // immediately after receiving response headers. | 252 // immediately after receiving response headers. |
| 253 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id); | 253 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id); |
| 254 | 254 |
| 255 // Activates Mojo for this process. Does nothing if Mojo is already activated. | |
| 256 void EnsureMojoActivated(); | |
| 257 | |
| 258 protected: | 255 protected: |
| 259 // A proxy for our IPC::Channel that lives on the IO thread (see | 256 // A proxy for our IPC::Channel that lives on the IO thread (see |
| 260 // browser_process.h) | 257 // browser_process.h) |
| 261 scoped_ptr<IPC::ChannelProxy> channel_; | 258 scoped_ptr<IPC::ChannelProxy> channel_; |
| 262 | 259 |
| 263 // True if fast shutdown has been performed on this RPH. | 260 // True if fast shutdown has been performed on this RPH. |
| 264 bool fast_shutdown_started_; | 261 bool fast_shutdown_started_; |
| 265 | 262 |
| 266 // True if we've posted a DeleteTask and will be deleted soon. | 263 // True if we've posted a DeleteTask and will be deleted soon. |
| 267 bool deleting_soon_; | 264 bool deleting_soon_; |
| 268 | 265 |
| 269 #ifndef NDEBUG | 266 #ifndef NDEBUG |
| 270 // True if this object has deleted itself. | 267 // True if this object has deleted itself. |
| 271 bool is_self_deleted_; | 268 bool is_self_deleted_; |
| 272 #endif | 269 #endif |
| 273 | 270 |
| 274 // The count of currently swapped out but pending RenderViews. We have | 271 // The count of currently swapped out but pending RenderViews. We have |
| 275 // started to swap these in, so the renderer process should not exit if | 272 // started to swap these in, so the renderer process should not exit if |
| 276 // this count is non-zero. | 273 // this count is non-zero. |
| 277 int32 pending_views_; | 274 int32 pending_views_; |
| 278 | 275 |
| 279 private: | 276 private: |
| 280 friend class VisitRelayingRenderProcessHost; | 277 friend class VisitRelayingRenderProcessHost; |
| 281 | 278 |
| 282 void MaybeActivateMojo(); | |
| 283 bool ShouldUseMojoChannel() const; | 279 bool ShouldUseMojoChannel() const; |
| 284 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy( | 280 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy( |
| 285 const std::string& channel_id); | 281 const std::string& channel_id); |
| 286 | 282 |
| 287 // Creates and adds the IO thread message filters. | 283 // Creates and adds the IO thread message filters. |
| 288 void CreateMessageFilters(); | 284 void CreateMessageFilters(); |
| 289 | 285 |
| 286 // Registers Mojo services to be exposed to the renderer. |
| 287 void RegisterMojoServices(); |
| 288 |
| 290 // Control message handlers. | 289 // Control message handlers. |
| 291 void OnShutdownRequest(); | 290 void OnShutdownRequest(); |
| 292 void OnDumpHandlesDone(); | 291 void OnDumpHandlesDone(); |
| 293 void SuddenTerminationChanged(bool enabled); | 292 void SuddenTerminationChanged(bool enabled); |
| 294 void OnUserMetricsRecordAction(const std::string& action); | 293 void OnUserMetricsRecordAction(const std::string& action); |
| 295 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); | 294 void OnSavedPageAsMHTML(int job_id, int64 mhtml_file_size); |
| 296 void OnCloseACK(int old_route_id); | 295 void OnCloseACK(int old_route_id); |
| 297 | 296 |
| 298 // Generates a command line to be used to spawn a renderer and appends the | 297 // Generates a command line to be used to spawn a renderer and appends the |
| 299 // results to |*command_line|. | 298 // results to |*command_line|. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 320 void RegisterAecDumpConsumerOnUIThread(int id); | 319 void RegisterAecDumpConsumerOnUIThread(int id); |
| 321 void UnregisterAecDumpConsumerOnUIThread(int id); | 320 void UnregisterAecDumpConsumerOnUIThread(int id); |
| 322 void EnableAecDumpForId(const base::FilePath& file, int id); | 321 void EnableAecDumpForId(const base::FilePath& file, int id); |
| 323 // Sends |file_for_transit| to the render process. | 322 // Sends |file_for_transit| to the render process. |
| 324 void SendAecDumpFileToRenderer(int id, | 323 void SendAecDumpFileToRenderer(int id, |
| 325 IPC::PlatformFileForTransit file_for_transit); | 324 IPC::PlatformFileForTransit file_for_transit); |
| 326 void SendDisableAecDumpToRenderer(); | 325 void SendDisableAecDumpToRenderer(); |
| 327 #endif | 326 #endif |
| 328 | 327 |
| 329 scoped_ptr<MojoApplicationHost> mojo_application_host_; | 328 scoped_ptr<MojoApplicationHost> mojo_application_host_; |
| 330 bool mojo_activation_required_; | |
| 331 | 329 |
| 332 // The registered IPC listener objects. When this list is empty, we should | 330 // The registered IPC listener objects. When this list is empty, we should |
| 333 // delete ourselves. | 331 // delete ourselves. |
| 334 IDMap<IPC::Listener> listeners_; | 332 IDMap<IPC::Listener> listeners_; |
| 335 | 333 |
| 336 // The count of currently visible widgets. Since the host can be a container | 334 // The count of currently visible widgets. Since the host can be a container |
| 337 // for multiple widgets, it uses this count to determine when it should be | 335 // for multiple widgets, it uses this count to determine when it should be |
| 338 // backgrounded. | 336 // backgrounded. |
| 339 int32 visible_widgets_; | 337 int32 visible_widgets_; |
| 340 | 338 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 base::TimeTicks survive_for_worker_start_time_; | 446 base::TimeTicks survive_for_worker_start_time_; |
| 449 | 447 |
| 450 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 448 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 451 | 449 |
| 452 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 450 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 453 }; | 451 }; |
| 454 | 452 |
| 455 } // namespace content | 453 } // namespace content |
| 456 | 454 |
| 457 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 455 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |