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_RENDERER_RENDER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); | 231 WebGraphicsContext3DCommandBufferImpl* GetGpuVDAContext3D(); |
232 | 232 |
233 // Handle loss of the shared GpuVDAContext3D context above. | 233 // Handle loss of the shared GpuVDAContext3D context above. |
234 static void OnGpuVDAContextLoss(); | 234 static void OnGpuVDAContextLoss(); |
235 | 235 |
236 // AudioRendererMixerManager instance which manages renderer side mixer | 236 // AudioRendererMixerManager instance which manages renderer side mixer |
237 // instances shared based on configured audio parameters. Lazily created on | 237 // instances shared based on configured audio parameters. Lazily created on |
238 // first call. | 238 // first call. |
239 content::AudioRendererMixerManager* GetAudioRendererMixerManager(); | 239 content::AudioRendererMixerManager* GetAudioRendererMixerManager(); |
240 | 240 |
241 // Called when a top frame of a RenderView navigates. This function updates | |
242 // RenderViewThread's information about whether all RenderViews are displaying | |
Charlie Reis
2012/08/22 23:09:59
nit: RenderViewThread -> RenderThreadImpl?
marja
2012/08/23 14:15:00
Done.
| |
243 // a page from the same host. |host| is the host where a RenderView navigated, | |
244 // and |view_count| is the number of RenderViews in this process. | |
245 void RenderViewNavigatedToHost(const std::string& host, size_t view_count); | |
246 | |
247 // Used for customizing some histograms if all RenderViews share the same | |
248 // host. Returns the current custom histogram name to use for | |
249 // |histogram_name|, or |histogram_name| if it shouldn't be customized. | |
250 std::string ConvertToCustomHistogramName(const char* histogram_name); | |
251 | |
241 private: | 252 private: |
242 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; | 253 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; |
243 | 254 |
244 void Init(); | 255 void Init(); |
245 | 256 |
246 void OnSetZoomLevelForCurrentURL(const std::string& host, double zoom_level); | 257 void OnSetZoomLevelForCurrentURL(const std::string& host, double zoom_level); |
247 void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors); | 258 void OnSetCSSColors(const std::vector<CSSColors::CSSColorMapping>& colors); |
248 void OnCreateNewView(const ViewMsg_New_Params& params); | 259 void OnCreateNewView(const ViewMsg_New_Params& params); |
249 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 260 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
250 void OnPurgePluginListCache(bool reload_pages); | 261 void OnPurgePluginListCache(bool reload_pages); |
251 void OnNetworkStateChanged(bool online); | 262 void OnNetworkStateChanged(bool online); |
252 void OnGetAccessibilityTree(); | 263 void OnGetAccessibilityTree(); |
253 void OnTempCrashWithData(const GURL& data); | 264 void OnTempCrashWithData(const GURL& data); |
254 | 265 |
255 void IdleHandlerInForegroundTab(); | 266 void IdleHandlerInForegroundTab(); |
256 | 267 |
268 // Used for updating the information on which is the common host which all | |
269 // RenderView's share (if any). If there is no common host, this function is | |
270 // called with an empty string. | |
271 void SetCommonHost(const std::string& host); | |
272 | |
273 // For initializing information about which histograms should be customized | |
274 // per host. | |
275 void InitializeCustomHistograms(); | |
276 | |
257 // These objects live solely on the render thread. | 277 // These objects live solely on the render thread. |
258 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; | 278 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; |
259 scoped_ptr<DomStorageDispatcher> dom_storage_dispatcher_; | 279 scoped_ptr<DomStorageDispatcher> dom_storage_dispatcher_; |
260 scoped_ptr<IndexedDBDispatcher> main_thread_indexed_db_dispatcher_; | 280 scoped_ptr<IndexedDBDispatcher> main_thread_indexed_db_dispatcher_; |
261 scoped_ptr<RendererWebKitPlatformSupportImpl> webkit_platform_support_; | 281 scoped_ptr<RendererWebKitPlatformSupportImpl> webkit_platform_support_; |
262 scoped_ptr<content::old::BrowserPluginChannelManager> | 282 scoped_ptr<content::old::BrowserPluginChannelManager> |
263 browser_plugin_channel_manager_; | 283 browser_plugin_channel_manager_; |
264 | 284 |
265 // Used on the render thread and deleted by WebKit at shutdown. | 285 // Used on the render thread and deleted by WebKit at shutdown. |
266 content::MediaStreamCenter* media_stream_center_; | 286 content::MediaStreamCenter* media_stream_center_; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 scoped_ptr<content::old::BrowserPluginRegistry> browser_plugin_registry_; | 331 scoped_ptr<content::old::BrowserPluginRegistry> browser_plugin_registry_; |
312 | 332 |
313 ObserverList<content::RenderProcessObserver> observers_; | 333 ObserverList<content::RenderProcessObserver> observers_; |
314 | 334 |
315 class GpuVDAContextLostCallback; | 335 class GpuVDAContextLostCallback; |
316 scoped_ptr<GpuVDAContextLostCallback> context_lost_cb_; | 336 scoped_ptr<GpuVDAContextLostCallback> context_lost_cb_; |
317 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_; | 337 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> gpu_vda_context3d_; |
318 | 338 |
319 scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_; | 339 scoped_ptr<content::AudioRendererMixerManager> audio_renderer_mixer_manager_; |
320 | 340 |
341 // For producing custom histograms if all RenderViews share the same host. | |
Charlie Reis
2012/08/22 23:09:59
Can you say a bit more? e.g., that the histogram
marja
2012/08/23 14:15:00
Done.
| |
342 std::string common_host_; | |
343 std::string custom_page_; | |
Charlie Reis
2012/08/22 23:09:59
custom_page_ doesn't reveal much about what it's f
marja
2012/08/23 14:15:00
Done.
| |
344 std::set<std::string> custom_histograms_; | |
345 | |
321 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 346 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
322 }; | 347 }; |
323 | 348 |
324 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 349 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |