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 |
255 protected: | 258 protected: |
256 // A proxy for our IPC::Channel that lives on the IO thread (see | 259 // A proxy for our IPC::Channel that lives on the IO thread (see |
257 // browser_process.h) | 260 // browser_process.h) |
258 scoped_ptr<IPC::ChannelProxy> channel_; | 261 scoped_ptr<IPC::ChannelProxy> channel_; |
259 | 262 |
260 // True if fast shutdown has been performed on this RPH. | 263 // True if fast shutdown has been performed on this RPH. |
261 bool fast_shutdown_started_; | 264 bool fast_shutdown_started_; |
262 | 265 |
263 // True if we've posted a DeleteTask and will be deleted soon. | 266 // True if we've posted a DeleteTask and will be deleted soon. |
264 bool deleting_soon_; | 267 bool deleting_soon_; |
265 | 268 |
266 #ifndef NDEBUG | 269 #ifndef NDEBUG |
267 // True if this object has deleted itself. | 270 // True if this object has deleted itself. |
268 bool is_self_deleted_; | 271 bool is_self_deleted_; |
269 #endif | 272 #endif |
270 | 273 |
271 // The count of currently swapped out but pending RenderViews. We have | 274 // The count of currently swapped out but pending RenderViews. We have |
272 // started to swap these in, so the renderer process should not exit if | 275 // started to swap these in, so the renderer process should not exit if |
273 // this count is non-zero. | 276 // this count is non-zero. |
274 int32 pending_views_; | 277 int32 pending_views_; |
275 | 278 |
276 private: | 279 private: |
277 friend class VisitRelayingRenderProcessHost; | 280 friend class VisitRelayingRenderProcessHost; |
278 | 281 |
| 282 void MaybeActivateMojo(); |
279 bool ShouldUseMojoChannel() const; | 283 bool ShouldUseMojoChannel() const; |
280 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy( | 284 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy( |
281 const std::string& channel_id); | 285 const std::string& channel_id); |
282 | 286 |
283 // Creates and adds the IO thread message filters. | 287 // Creates and adds the IO thread message filters. |
284 void CreateMessageFilters(); | 288 void CreateMessageFilters(); |
285 | 289 |
286 // Control message handlers. | 290 // Control message handlers. |
287 void OnShutdownRequest(); | 291 void OnShutdownRequest(); |
288 void OnDumpHandlesDone(); | 292 void OnDumpHandlesDone(); |
(...skipping 27 matching lines...) Expand all Loading... |
316 void RegisterAecDumpConsumerOnUIThread(int id); | 320 void RegisterAecDumpConsumerOnUIThread(int id); |
317 void UnregisterAecDumpConsumerOnUIThread(int id); | 321 void UnregisterAecDumpConsumerOnUIThread(int id); |
318 void EnableAecDumpForId(const base::FilePath& file, int id); | 322 void EnableAecDumpForId(const base::FilePath& file, int id); |
319 // Sends |file_for_transit| to the render process. | 323 // Sends |file_for_transit| to the render process. |
320 void SendAecDumpFileToRenderer(int id, | 324 void SendAecDumpFileToRenderer(int id, |
321 IPC::PlatformFileForTransit file_for_transit); | 325 IPC::PlatformFileForTransit file_for_transit); |
322 void SendDisableAecDumpToRenderer(); | 326 void SendDisableAecDumpToRenderer(); |
323 #endif | 327 #endif |
324 | 328 |
325 scoped_ptr<MojoApplicationHost> mojo_application_host_; | 329 scoped_ptr<MojoApplicationHost> mojo_application_host_; |
| 330 bool mojo_activation_required_; |
326 | 331 |
327 // The registered IPC listener objects. When this list is empty, we should | 332 // The registered IPC listener objects. When this list is empty, we should |
328 // delete ourselves. | 333 // delete ourselves. |
329 IDMap<IPC::Listener> listeners_; | 334 IDMap<IPC::Listener> listeners_; |
330 | 335 |
331 // The count of currently visible widgets. Since the host can be a container | 336 // The count of currently visible widgets. Since the host can be a container |
332 // for multiple widgets, it uses this count to determine when it should be | 337 // for multiple widgets, it uses this count to determine when it should be |
333 // backgrounded. | 338 // backgrounded. |
334 int32 visible_widgets_; | 339 int32 visible_widgets_; |
335 | 340 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 base::TimeTicks survive_for_worker_start_time_; | 448 base::TimeTicks survive_for_worker_start_time_; |
444 | 449 |
445 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 450 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
446 | 451 |
447 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 452 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
448 }; | 453 }; |
449 | 454 |
450 } // namespace content | 455 } // namespace content |
451 | 456 |
452 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 457 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
OLD | NEW |