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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 void IncrementWorkerRefCount(); | 252 void IncrementWorkerRefCount(); |
253 void DecrementWorkerRefCount(); | 253 void DecrementWorkerRefCount(); |
254 | 254 |
255 // Call this function to resume the navigation when it was deferred | 255 // Call this function to resume the navigation when it was deferred |
256 // immediately after receiving response headers. | 256 // immediately after receiving response headers. |
257 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id); | 257 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id); |
258 | 258 |
259 // Activates Mojo for this process. Does nothing if Mojo is already activated. | 259 // Activates Mojo for this process. Does nothing if Mojo is already activated. |
260 void EnsureMojoActivated(); | 260 void EnsureMojoActivated(); |
261 | 261 |
| 262 // PlzNavigate |
| 263 // Returns the time the first call to Init completed successfully (after a new |
| 264 // renderer process was created); further calls to Init won't change this |
| 265 // value. |
| 266 // Note: Will disappear after PlzNavitate is completed. |
| 267 const base::TimeTicks& init_time() const { return init_time_; } |
| 268 |
262 protected: | 269 protected: |
263 // A proxy for our IPC::Channel that lives on the IO thread (see | 270 // A proxy for our IPC::Channel that lives on the IO thread (see |
264 // browser_process.h) | 271 // browser_process.h) |
265 scoped_ptr<IPC::ChannelProxy> channel_; | 272 scoped_ptr<IPC::ChannelProxy> channel_; |
266 | 273 |
267 // A host object ChannelMojo needs. The lifetime is bound to | 274 // A host object ChannelMojo needs. The lifetime is bound to |
268 // the RenderProcessHostImpl, not the channel. | 275 // the RenderProcessHostImpl, not the channel. |
269 scoped_ptr<IPC::ChannelMojoHost> channel_mojo_host_; | 276 scoped_ptr<IPC::ChannelMojoHost> channel_mojo_host_; |
270 | 277 |
271 // True if fast shutdown has been performed on this RPH. | 278 // True if fast shutdown has been performed on this RPH. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // The filter for MessagePort messages coming from the renderer. | 371 // The filter for MessagePort messages coming from the renderer. |
365 scoped_refptr<MessagePortMessageFilter> message_port_message_filter_; | 372 scoped_refptr<MessagePortMessageFilter> message_port_message_filter_; |
366 | 373 |
367 // Used in single-process mode. | 374 // Used in single-process mode. |
368 scoped_ptr<base::Thread> in_process_renderer_; | 375 scoped_ptr<base::Thread> in_process_renderer_; |
369 | 376 |
370 // True after Init() has been called. We can't just check channel_ because we | 377 // True after Init() has been called. We can't just check channel_ because we |
371 // also reset that in the case of process termination. | 378 // also reset that in the case of process termination. |
372 bool is_initialized_; | 379 bool is_initialized_; |
373 | 380 |
| 381 // PlzNavigate |
| 382 // Stores the time at which the first call to Init happened. |
| 383 base::TimeTicks init_time_; |
| 384 |
374 // Used to launch and terminate the process without blocking the UI thread. | 385 // Used to launch and terminate the process without blocking the UI thread. |
375 scoped_ptr<ChildProcessLauncher> child_process_launcher_; | 386 scoped_ptr<ChildProcessLauncher> child_process_launcher_; |
376 | 387 |
377 // Messages we queue while waiting for the process handle. We queue them here | 388 // Messages we queue while waiting for the process handle. We queue them here |
378 // instead of in the channel so that we ensure they're sent after init related | 389 // instead of in the channel so that we ensure they're sent after init related |
379 // messages that are sent once the process handle is available. This is | 390 // messages that are sent once the process handle is available. This is |
380 // because the queued messages may have dependencies on the init messages. | 391 // because the queued messages may have dependencies on the init messages. |
381 std::queue<IPC::Message*> queued_messages_; | 392 std::queue<IPC::Message*> queued_messages_; |
382 | 393 |
383 // The globally-unique identifier for this RPH. | 394 // The globally-unique identifier for this RPH. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 base::TimeTicks survive_for_worker_start_time_; | 467 base::TimeTicks survive_for_worker_start_time_; |
457 | 468 |
458 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 469 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
459 | 470 |
460 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 471 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
461 }; | 472 }; |
462 | 473 |
463 } // namespace content | 474 } // namespace content |
464 | 475 |
465 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 476 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |