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