Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 1671933002: Create and pass shared-histogram-allocator from browser to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hsm-merge
Patch Set: fixed test to not use SharedMemory which doesn't work on all builds (and rebased) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
161 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override; 163 const base::TimeTicks& GetInitTimeForNavigationMetrics() const override;
162 bool SubscribeUniformEnabled() const override; 164 bool SubscribeUniformEnabled() const override;
163 void OnAddSubscription(unsigned int target) override; 165 void OnAddSubscription(unsigned int target) override;
164 void OnRemoveSubscription(unsigned int target) override; 166 void OnRemoveSubscription(unsigned int target) override;
165 void SendUpdateValueState( 167 void SendUpdateValueState(
166 unsigned int target, const gpu::ValueState& state) override; 168 unsigned int target, const gpu::ValueState& state) override;
167 #if defined(ENABLE_BROWSER_CDMS) 169 #if defined(ENABLE_BROWSER_CDMS)
168 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id, 170 scoped_refptr<media::MediaKeys> GetCdm(int render_frame_id,
169 int cdm_id) const override; 171 int cdm_id) const override;
170 #endif 172 #endif
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // copied over. 326 // copied over.
325 void PropagateBrowserCommandLineToRenderer( 327 void PropagateBrowserCommandLineToRenderer(
326 const base::CommandLine& browser_cmd, 328 const base::CommandLine& browser_cmd,
327 base::CommandLine* renderer_cmd) const; 329 base::CommandLine* renderer_cmd) const;
328 330
329 // Inspects the current object state and sets/removes background priority if 331 // Inspects the current object state and sets/removes background priority if
330 // appropriate. Should be called after any of the involved data members 332 // appropriate. Should be called after any of the involved data members
331 // change. 333 // change.
332 void UpdateProcessPriority(); 334 void UpdateProcessPriority();
333 335
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
334 // Handle termination of our process. 342 // Handle termination of our process.
335 void ProcessDied(bool already_dead, RendererClosedDetails* known_details); 343 void ProcessDied(bool already_dead, RendererClosedDetails* known_details);
336 344
337 // GpuSwitchingObserver implementation. 345 // GpuSwitchingObserver implementation.
338 void OnGpuSwitched() override; 346 void OnGpuSwitched() override;
339 347
340 #if defined(ENABLE_WEBRTC) 348 #if defined(ENABLE_WEBRTC)
341 void OnRegisterAecDumpConsumer(int id); 349 void OnRegisterAecDumpConsumer(int id);
342 void OnRegisterEventLogConsumer(int id); 350 void OnRegisterEventLogConsumer(int id);
343 void OnUnregisterAecDumpConsumer(int id); 351 void OnUnregisterAecDumpConsumer(int id);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 SubscriptionSet subscription_set_; 510 SubscriptionSet subscription_set_;
503 511
504 // Maintains ValueStates which are not currently subscribed too so we can 512 // Maintains ValueStates which are not currently subscribed too so we can
505 // pass them to the GpuService if a Valuebuffer ever subscribes to the 513 // pass them to the GpuService if a Valuebuffer ever subscribes to the
506 // respective subscription target 514 // respective subscription target
507 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; 515 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_;
508 516
509 // Whether or not the CHROMIUM_subscribe_uniform WebGL extension is enabled 517 // Whether or not the CHROMIUM_subscribe_uniform WebGL extension is enabled
510 bool subscribe_uniform_enabled_; 518 bool subscribe_uniform_enabled_;
511 519
520 // The memory allocator, if any, in which the renderer will write its metrics.
521 scoped_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_;
522
512 bool channel_connected_; 523 bool channel_connected_;
513 bool sent_render_process_ready_; 524 bool sent_render_process_ready_;
514 525
515 #if defined(OS_ANDROID) 526 #if defined(OS_ANDROID)
516 // UI thread is the source of sync IPCs and all shutdown signals. 527 // UI thread is the source of sync IPCs and all shutdown signals.
517 // Therefore a proper shutdown event to unblock the UI thread is not 528 // Therefore a proper shutdown event to unblock the UI thread is not
518 // possible without massive refactoring shutdown code. 529 // possible without massive refactoring shutdown code.
519 // Luckily Android never performs a clean shutdown. So explicitly 530 // Luckily Android never performs a clean shutdown. So explicitly
520 // ignore this problem. 531 // ignore this problem.
521 base::WaitableEvent never_signaled_; 532 base::WaitableEvent never_signaled_;
522 #endif 533 #endif
523 534
524 std::string mojo_channel_token_; 535 std::string mojo_channel_token_;
525 mojo::ScopedMessagePipeHandle in_process_renderer_handle_; 536 mojo::ScopedMessagePipeHandle in_process_renderer_handle_;
526 537
527 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 538 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
528 539
529 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 540 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
530 }; 541 };
531 542
532 } // namespace content 543 } // namespace content
533 544
534 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 545 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/histogram_controller.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698