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 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/file_path.h" | 16 #include "base/file_path.h" |
17 #include "base/memory/linked_ptr.h" | 17 #include "base/memory/linked_ptr.h" |
18 #include "base/message_loop_helpers.h" | 18 #include "base/message_loop_helpers.h" |
19 #include "base/shared_memory.h" | 19 #include "base/shared_memory.h" |
20 #include "base/string16.h" | 20 #include "base/string16.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" | 22 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" |
23 #include "content/public/browser/browser_message_filter.h" | 23 #include "content/public/browser/browser_message_filter.h" |
| 24 #include "media/base/channel_layout.h" |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
26 #include "ui/gfx/surface/transport_dib.h" | 27 #include "ui/gfx/surface/transport_dib.h" |
27 | 28 |
28 class DOMStorageContextImpl; | 29 class DOMStorageContextImpl; |
29 class PluginServiceImpl; | 30 class PluginServiceImpl; |
30 class RenderWidgetHelper; | 31 class RenderWidgetHelper; |
31 struct FontDescriptor; | 32 struct FontDescriptor; |
32 struct ViewHostMsg_CreateWindow_Params; | 33 struct ViewHostMsg_CreateWindow_Params; |
33 | 34 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void OnDownloadUrl(const IPC::Message& message, | 166 void OnDownloadUrl(const IPC::Message& message, |
166 const GURL& url, | 167 const GURL& url, |
167 const GURL& referrer, | 168 const GURL& referrer, |
168 const string16& suggested_name); | 169 const string16& suggested_name); |
169 void OnCheckNotificationPermission(const GURL& source_origin, | 170 void OnCheckNotificationPermission(const GURL& source_origin, |
170 int* permission_level); | 171 int* permission_level); |
171 | 172 |
172 void OnGetCPUUsage(int* cpu_usage); | 173 void OnGetCPUUsage(int* cpu_usage); |
173 | 174 |
174 void OnGetHardwareBufferSize(uint32* buffer_size); | 175 void OnGetHardwareBufferSize(uint32* buffer_size); |
175 void OnGetHardwareInputSampleRate(double* sample_rate); | 176 void OnGetHardwareInputSampleRate(int* sample_rate); |
176 void OnGetHardwareSampleRate(double* sample_rate); | 177 void OnGetHardwareSampleRate(int* sample_rate); |
177 void OnGetHardwareInputChannelCount(uint32* channels); | 178 void OnGetHardwareInputChannelLayout(ChannelLayout* layout); |
178 | 179 |
179 // Used to ask the browser to allocate a block of shared memory for the | 180 // Used to ask the browser to allocate a block of shared memory for the |
180 // renderer to send back data in, since shared memory can't be created | 181 // renderer to send back data in, since shared memory can't be created |
181 // in the renderer on POSIX due to the sandbox. | 182 // in the renderer on POSIX due to the sandbox. |
182 void OnAllocateSharedMemory(uint32 buffer_size, | 183 void OnAllocateSharedMemory(uint32 buffer_size, |
183 base::SharedMemoryHandle* handle); | 184 base::SharedMemoryHandle* handle); |
184 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); | 185 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); |
185 | 186 |
186 // Browser side transport DIB allocation | 187 // Browser side transport DIB allocation |
187 void OnAllocTransportDIB(size_t size, | 188 void OnAllocTransportDIB(size_t size, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 base::TimeTicks cpu_usage_sample_time_; | 263 base::TimeTicks cpu_usage_sample_time_; |
263 // Records the last sampled CPU usage in percents. | 264 // Records the last sampled CPU usage in percents. |
264 int cpu_usage_; | 265 int cpu_usage_; |
265 // Used for sampling CPU usage of the renderer process. | 266 // Used for sampling CPU usage of the renderer process. |
266 scoped_ptr<base::ProcessMetrics> process_metrics_; | 267 scoped_ptr<base::ProcessMetrics> process_metrics_; |
267 | 268 |
268 DISALLOW_COPY_AND_ASSIGN(RenderMessageFilter); | 269 DISALLOW_COPY_AND_ASSIGN(RenderMessageFilter); |
269 }; | 270 }; |
270 | 271 |
271 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ | 272 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ |
OLD | NEW |