| 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_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif | 10 #endif |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 class ResourceDispatcherHostImpl; | 80 class ResourceDispatcherHostImpl; |
| 81 struct Referrer; | 81 struct Referrer; |
| 82 struct WebPluginInfo; | 82 struct WebPluginInfo; |
| 83 | 83 |
| 84 // This class filters out incoming IPC messages for the renderer process on the | 84 // This class filters out incoming IPC messages for the renderer process on the |
| 85 // IPC thread. | 85 // IPC thread. |
| 86 class RenderMessageFilter : public BrowserMessageFilter { | 86 class RenderMessageFilter : public BrowserMessageFilter { |
| 87 public: | 87 public: |
| 88 // Create the filter. | 88 // Create the filter. |
| 89 RenderMessageFilter(int render_process_id, | 89 RenderMessageFilter(int render_process_id, |
| 90 bool is_guest, | |
| 91 PluginServiceImpl * plugin_service, | 90 PluginServiceImpl * plugin_service, |
| 92 BrowserContext* browser_context, | 91 BrowserContext* browser_context, |
| 93 net::URLRequestContextGetter* request_context, | 92 net::URLRequestContextGetter* request_context, |
| 94 RenderWidgetHelper* render_widget_helper, | 93 RenderWidgetHelper* render_widget_helper, |
| 95 media::AudioManager* audio_manager, | 94 media::AudioManager* audio_manager, |
| 96 MediaInternals* media_internals, | 95 MediaInternals* media_internals, |
| 97 DOMStorageContextWrapper* dom_storage_context); | 96 DOMStorageContextWrapper* dom_storage_context); |
| 98 | 97 |
| 99 // IPC::MessageFilter methods: | 98 // IPC::MessageFilter methods: |
| 100 virtual void OnChannelClosing() OVERRIDE; | 99 virtual void OnChannelClosing() OVERRIDE; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // This doesn't belong here; http://crbug.com/89628 | 299 // This doesn't belong here; http://crbug.com/89628 |
| 301 bool incognito_; | 300 bool incognito_; |
| 302 | 301 |
| 303 // Initialized to 0, accessed on FILE thread only. | 302 // Initialized to 0, accessed on FILE thread only. |
| 304 base::TimeTicks last_plugin_refresh_time_; | 303 base::TimeTicks last_plugin_refresh_time_; |
| 305 | 304 |
| 306 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; | 305 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; |
| 307 | 306 |
| 308 int render_process_id_; | 307 int render_process_id_; |
| 309 | 308 |
| 310 bool is_guest_; | |
| 311 | |
| 312 std::set<OpenChannelToNpapiPluginCallback*> plugin_host_clients_; | 309 std::set<OpenChannelToNpapiPluginCallback*> plugin_host_clients_; |
| 313 | 310 |
| 314 // Records the last time we sampled CPU usage of the renderer process. | 311 // Records the last time we sampled CPU usage of the renderer process. |
| 315 base::TimeTicks cpu_usage_sample_time_; | 312 base::TimeTicks cpu_usage_sample_time_; |
| 316 // Records the last sampled CPU usage in percents. | 313 // Records the last sampled CPU usage in percents. |
| 317 int cpu_usage_; | 314 int cpu_usage_; |
| 318 // Used for sampling CPU usage of the renderer process. | 315 // Used for sampling CPU usage of the renderer process. |
| 319 scoped_ptr<base::ProcessMetrics> process_metrics_; | 316 scoped_ptr<base::ProcessMetrics> process_metrics_; |
| 320 | 317 |
| 321 media::AudioManager* audio_manager_; | 318 media::AudioManager* audio_manager_; |
| 322 MediaInternals* media_internals_; | 319 MediaInternals* media_internals_; |
| 323 | 320 |
| 324 #if defined(OS_MACOSX) | 321 #if defined(OS_MACOSX) |
| 325 base::ScopedCFTypeRef<CFTypeRef> last_io_surface_; | 322 base::ScopedCFTypeRef<CFTypeRef> last_io_surface_; |
| 326 #endif | 323 #endif |
| 327 | 324 |
| 328 DISALLOW_COPY_AND_ASSIGN(RenderMessageFilter); | 325 DISALLOW_COPY_AND_ASSIGN(RenderMessageFilter); |
| 329 }; | 326 }; |
| 330 | 327 |
| 331 } // namespace content | 328 } // namespace content |
| 332 | 329 |
| 333 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ | 330 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ |
| OLD | NEW |