| 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_RENDER_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 void SetWebRtcLogMessageCallback( | 148 void SetWebRtcLogMessageCallback( |
| 149 base::Callback<void(const std::string&)> callback) override; | 149 base::Callback<void(const std::string&)> callback) override; |
| 150 WebRtcStopRtpDumpCallback StartRtpDump( | 150 WebRtcStopRtpDumpCallback StartRtpDump( |
| 151 bool incoming, | 151 bool incoming, |
| 152 bool outgoing, | 152 bool outgoing, |
| 153 const WebRtcRtpPacketCallback& packet_callback) override; | 153 const WebRtcRtpPacketCallback& packet_callback) override; |
| 154 #endif | 154 #endif |
| 155 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; | 155 void ResumeDeferredNavigation(const GlobalRequestID& request_id) override; |
| 156 void NotifyTimezoneChange(const std::string& timezone) override; | 156 void NotifyTimezoneChange(const std::string& timezone) override; |
| 157 ServiceRegistry* GetServiceRegistry() override; | 157 ServiceRegistry* GetServiceRegistry() override; |
| 158 scoped_ptr<base::SharedPersistentMemoryAllocator> ExtractMetricsAllocator() |
| 159 override; |
| 158 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; | 160 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; |
| 159 bool SubscribeUniformEnabled() const override; | 161 bool SubscribeUniformEnabled() const override; |
| 160 void OnAddSubscription(unsigned int target) override; | 162 void OnAddSubscription(unsigned int target) override; |
| 161 void OnRemoveSubscription(unsigned int target) override; | 163 void OnRemoveSubscription(unsigned int target) override; |
| 162 void SendUpdateValueState( | 164 void SendUpdateValueState( |
| 163 unsigned int target, const gpu::ValueState& state) override; | 165 unsigned int target, const gpu::ValueState& state) override; |
| 164 #if defined(ENABLE_BROWSER_CDMS) | 166 #if defined(ENABLE_BROWSER_CDMS) |
| 165 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, | 167 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, |
| 166 int cdm_id) const override; | 168 int cdm_id) const override; |
| 167 #endif | 169 #endif |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // copied over. | 323 // copied over. |
| 322 void PropagateBrowserCommandLineToRenderer( | 324 void PropagateBrowserCommandLineToRenderer( |
| 323 const base::CommandLine& browser_cmd, | 325 const base::CommandLine& browser_cmd, |
| 324 base::CommandLine* renderer_cmd) const; | 326 base::CommandLine* renderer_cmd) const; |
| 325 | 327 |
| 326 // Inspects the current object state and sets/removes background priority if | 328 // Inspects the current object state and sets/removes background priority if |
| 327 // appropriate. Should be called after any of the involved data members | 329 // appropriate. Should be called after any of the involved data members |
| 328 // change. | 330 // change. |
| 329 void UpdateProcessPriority(); | 331 void UpdateProcessPriority(); |
| 330 | 332 |
| 333 // Creates a PersistentMemoryAllocator and shares it with the renderer |
| 334 // process for it to store histograms from that process. The allocator is |
| 335 // available for extraction by a SubprocesMetricsProvider in order to |
| 336 // report those histograms to UMA. |
| 337 void CreateSharedRendererHistogramAllocator(); |
| 338 |
| 331 // Handle termination of our process. | 339 // Handle termination of our process. |
| 332 void ProcessDied(bool already_dead, RendererClosedDetails* known_details); | 340 void ProcessDied(bool already_dead, RendererClosedDetails* known_details); |
| 333 | 341 |
| 334 // GpuSwitchingObserver implementation. | 342 // GpuSwitchingObserver implementation. |
| 335 void OnGpuSwitched() override; | 343 void OnGpuSwitched() override; |
| 336 | 344 |
| 337 #if defined(ENABLE_WEBRTC) | 345 #if defined(ENABLE_WEBRTC) |
| 338 void OnRegisterAecDumpConsumer(int id); | 346 void OnRegisterAecDumpConsumer(int id); |
| 339 void OnRegisterEventLogConsumer(int id); | 347 void OnRegisterEventLogConsumer(int id); |
| 340 void OnUnregisterAecDumpConsumer(int id); | 348 void OnUnregisterAecDumpConsumer(int id); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 SubscriptionSet subscription_set_; | 506 SubscriptionSet subscription_set_; |
| 499 | 507 |
| 500 // Maintains ValueStates which are not currently subscribed too so we can | 508 // Maintains ValueStates which are not currently subscribed too so we can |
| 501 // pass them to the GpuService if a Valuebuffer ever subscribes to the | 509 // pass them to the GpuService if a Valuebuffer ever subscribes to the |
| 502 // respective subscription target | 510 // respective subscription target |
| 503 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; | 511 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; |
| 504 | 512 |
| 505 // Whether or not the CHROMIUM_subscribe_uniform WebGL extension is enabled | 513 // Whether or not the CHROMIUM_subscribe_uniform WebGL extension is enabled |
| 506 bool subscribe_uniform_enabled_; | 514 bool subscribe_uniform_enabled_; |
| 507 | 515 |
| 516 // The memory allocator, if any, in which the renderer will write its metrics. |
| 517 scoped_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_; |
| 518 |
| 508 bool channel_connected_; | 519 bool channel_connected_; |
| 509 bool sent_render_process_ready_; | 520 bool sent_render_process_ready_; |
| 510 | 521 |
| 511 #if defined(OS_ANDROID) | 522 #if defined(OS_ANDROID) |
| 512 // UI thread is the source of sync IPCs and all shutdown signals. | 523 // UI thread is the source of sync IPCs and all shutdown signals. |
| 513 // Therefore a proper shutdown event to unblock the UI thread is not | 524 // Therefore a proper shutdown event to unblock the UI thread is not |
| 514 // possible without massive refactoring shutdown code. | 525 // possible without massive refactoring shutdown code. |
| 515 // Luckily Android never performs a clean shutdown. So explicitly | 526 // Luckily Android never performs a clean shutdown. So explicitly |
| 516 // ignore this problem. | 527 // ignore this problem. |
| 517 base::WaitableEvent never_signaled_; | 528 base::WaitableEvent never_signaled_; |
| 518 #endif | 529 #endif |
| 519 | 530 |
| 520 std::string mojo_channel_token_; | 531 std::string mojo_channel_token_; |
| 521 mojo::ScopedMessagePipeHandle in_process_renderer_handle_; | 532 mojo::ScopedMessagePipeHandle in_process_renderer_handle_; |
| 522 | 533 |
| 523 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; | 534 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; |
| 524 | 535 |
| 525 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); | 536 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); |
| 526 }; | 537 }; |
| 527 | 538 |
| 528 } // namespace content | 539 } // namespace content |
| 529 | 540 |
| 530 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ | 541 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |