| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Called when the existence of the other renderer process which is connected | 238 // Called when the existence of the other renderer process which is connected |
| 239 // to the Worker in this renderer process has changed. | 239 // to the Worker in this renderer process has changed. |
| 240 // It is only called when "enable-embedded-shared-worker" flag is set. | 240 // It is only called when "enable-embedded-shared-worker" flag is set. |
| 241 void IncrementWorkerRefCount(); | 241 void IncrementWorkerRefCount(); |
| 242 void DecrementWorkerRefCount(); | 242 void DecrementWorkerRefCount(); |
| 243 | 243 |
| 244 // Call this function to resume the navigation when it was deferred | 244 // Call this function to resume the navigation when it was deferred |
| 245 // immediately after receiving response headers. | 245 // immediately after receiving response headers. |
| 246 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id); | 246 void ResumeResponseDeferredAtStart(const GlobalRequestID& request_id); |
| 247 | 247 |
| 248 // Activates Mojo for this process. Does nothing if Mojo is already activated. | |
| 249 void EnsureMojoActivated(); | |
| 250 | |
| 251 protected: | 248 protected: |
| 252 // A proxy for our IPC::Channel that lives on the IO thread (see | 249 // A proxy for our IPC::Channel that lives on the IO thread (see |
| 253 // browser_process.h) | 250 // browser_process.h) |
| 254 scoped_ptr<IPC::ChannelProxy> channel_; | 251 scoped_ptr<IPC::ChannelProxy> channel_; |
| 255 | 252 |
| 256 // True if fast shutdown has been performed on this RPH. | 253 // True if fast shutdown has been performed on this RPH. |
| 257 bool fast_shutdown_started_; | 254 bool fast_shutdown_started_; |
| 258 | 255 |
| 259 // True if we've posted a DeleteTask and will be deleted soon. | 256 // True if we've posted a DeleteTask and will be deleted soon. |
| 260 bool deleting_soon_; | 257 bool deleting_soon_; |
| 261 | 258 |
| 262 #ifndef NDEBUG | 259 #ifndef NDEBUG |
| 263 // True if this object has deleted itself. | 260 // True if this object has deleted itself. |
| 264 bool is_self_deleted_; | 261 bool is_self_deleted_; |
| 265 #endif | 262 #endif |
| 266 | 263 |
| 267 // The count of currently swapped out but pending RenderViews. We have | 264 // The count of currently swapped out but pending RenderViews. We have |
| 268 // started to swap these in, so the renderer process should not exit if | 265 // started to swap these in, so the renderer process should not exit if |
| 269 // this count is non-zero. | 266 // this count is non-zero. |
| 270 int32 pending_views_; | 267 int32 pending_views_; |
| 271 | 268 |
| 272 private: | 269 private: |
| 273 friend class VisitRelayingRenderProcessHost; | 270 friend class VisitRelayingRenderProcessHost; |
| 274 | 271 |
| 275 void MaybeActivateMojo(); | |
| 276 bool ShouldUseMojoChannel() const; | 272 bool ShouldUseMojoChannel() const; |
| 277 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy( | 273 scoped_ptr<IPC::ChannelProxy> CreateChannelProxy( |
| 278 const std::string& channel_id); | 274 const std::string& channel_id); |
| 279 | 275 |
| 280 // Creates and adds the IO thread message filters. | 276 // Creates and adds the IO thread message filters. |
| 281 void CreateMessageFilters(); | 277 void CreateMessageFilters(); |
| 282 | 278 |
| 283 // Control message handlers. | 279 // Control message handlers. |
| 284 void OnShutdownRequest(); | 280 void OnShutdownRequest(); |
| 285 void OnDumpHandlesDone(); | 281 void OnDumpHandlesDone(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 313 void RegisterAecDumpConsumerOnUIThread(int id); | 309 void RegisterAecDumpConsumerOnUIThread(int id); |
| 314 void UnregisterAecDumpConsumerOnUIThread(int id); | 310 void UnregisterAecDumpConsumerOnUIThread(int id); |
| 315 void EnableAecDumpForId(const base::FilePath& file, int id); | 311 void EnableAecDumpForId(const base::FilePath& file, int id); |
| 316 // Sends |file_for_transit| to the render process. | 312 // Sends |file_for_transit| to the render process. |
| 317 void SendAecDumpFileToRenderer(int id, | 313 void SendAecDumpFileToRenderer(int id, |
| 318 IPC::PlatformFileForTransit file_for_transit); | 314 IPC::PlatformFileForTransit file_for_transit); |
| 319 void SendDisableAecDumpToRenderer(); | 315 void SendDisableAecDumpToRenderer(); |
| 320 #endif | 316 #endif |
| 321 | 317 |
| 322 scoped_ptr<MojoApplicationHost> mojo_application_host_; | 318 scoped_ptr<MojoApplicationHost> mojo_application_host_; |
| 323 bool mojo_activation_required_; | |
| 324 | 319 |
| 325 // The registered IPC listener objects. When this list is empty, we should | 320 // The registered IPC listener objects. When this list is empty, we should |
| 326 // delete ourselves. | 321 // delete ourselves. |
| 327 IDMap<IPC::Listener> listeners_; | 322 IDMap<IPC::Listener> listeners_; |
| 328 | 323 |
| 329 // The count of currently visible widgets. Since the host can be a container | 324 // The count of currently visible widgets. Since the host can be a container |
| 330 // for multiple widgets, it uses this count to determine when it should be | 325 // for multiple widgets, it uses this count to determine when it should be |
| 331 // backgrounded. | 326 // backgrounded. |
| 332 int32 visible_widgets_; | 327 int32 visible_widgets_; |
| 333 | 328 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 base::TimeTicks survive_for_worker_start_time_; | 432 base::TimeTicks survive_for_worker_start_time_; |
| 438 | 433 |
| 439 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 434 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 440 | 435 |
| 441 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 436 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 442 }; | 437 }; |
| 443 | 438 |
| 444 } // namespace content | 439 } // namespace content |
| 445 | 440 |
| 446 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ | 441 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |