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 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <list> | 11 #include <list> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/shared_memory.h" | 17 #include "base/memory/shared_memory.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/sequenced_task_runner_helpers.h" | 19 #include "base/sequenced_task_runner_helpers.h" |
20 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "cc/resources/shared_bitmap_manager.h" | 22 #include "cc/resources/shared_bitmap_manager.h" |
| 23 #include "components/discardable_memory/service/discardable_shared_memory_manage
r.h" |
23 #include "content/common/cache_storage/cache_storage_types.h" | 24 #include "content/common/cache_storage/cache_storage_types.h" |
24 #include "content/common/host_shared_bitmap_manager.h" | 25 #include "content/common/host_shared_bitmap_manager.h" |
25 #include "content/common/render_message_filter.mojom.h" | 26 #include "content/common/render_message_filter.mojom.h" |
26 #include "content/public/browser/browser_associated_interface.h" | 27 #include "content/public/browser/browser_associated_interface.h" |
27 #include "content/public/browser/browser_message_filter.h" | 28 #include "content/public/browser/browser_message_filter.h" |
28 #include "gpu/config/gpu_info.h" | 29 #include "gpu/config/gpu_info.h" |
29 #include "ipc/message_filter.h" | 30 #include "ipc/message_filter.h" |
30 #include "third_party/WebKit/public/web/WebPopupType.h" | 31 #include "third_party/WebKit/public/web/WebPopupType.h" |
31 #include "ui/gfx/geometry/rect.h" | 32 #include "ui/gfx/geometry/rect.h" |
32 #include "ui/gfx/gpu_memory_buffer.h" | 33 #include "ui/gfx/gpu_memory_buffer.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 IPC::Message* reply_msg); | 154 IPC::Message* reply_msg); |
154 void OnAllocateSharedBitmap(uint32_t buffer_size, | 155 void OnAllocateSharedBitmap(uint32_t buffer_size, |
155 const cc::SharedBitmapId& id, | 156 const cc::SharedBitmapId& id, |
156 IPC::Message* reply_msg); | 157 IPC::Message* reply_msg); |
157 void OnAllocatedSharedBitmap(size_t buffer_size, | 158 void OnAllocatedSharedBitmap(size_t buffer_size, |
158 const base::SharedMemoryHandle& handle, | 159 const base::SharedMemoryHandle& handle, |
159 const cc::SharedBitmapId& id); | 160 const cc::SharedBitmapId& id); |
160 void OnDeletedSharedBitmap(const cc::SharedBitmapId& id); | 161 void OnDeletedSharedBitmap(const cc::SharedBitmapId& id); |
161 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); | 162 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); |
162 | 163 |
| 164 // Browser side discardable shared memory allocation. |
| 165 void AllocateLockedDiscardableSharedMemoryOnFileThread( |
| 166 uint32_t size, |
| 167 discardable_memory::DiscardableSharedMemoryId id, |
| 168 IPC::Message* reply_message); |
| 169 void OnAllocateLockedDiscardableSharedMemory( |
| 170 uint32_t size, |
| 171 discardable_memory::DiscardableSharedMemoryId id, |
| 172 IPC::Message* reply_message); |
| 173 void DeletedDiscardableSharedMemoryOnFileThread( |
| 174 discardable_memory::DiscardableSharedMemoryId id); |
| 175 void OnDeletedDiscardableSharedMemory( |
| 176 discardable_memory::DiscardableSharedMemoryId id); |
| 177 |
163 #if defined(OS_LINUX) | 178 #if defined(OS_LINUX) |
164 void SetThreadPriorityOnFileThread(base::PlatformThreadId ns_tid, | 179 void SetThreadPriorityOnFileThread(base::PlatformThreadId ns_tid, |
165 base::ThreadPriority priority); | 180 base::ThreadPriority priority); |
166 void OnSetThreadPriority(base::PlatformThreadId ns_tid, | 181 void OnSetThreadPriority(base::PlatformThreadId ns_tid, |
167 base::ThreadPriority priority); | 182 base::ThreadPriority priority); |
168 #endif | 183 #endif |
169 | 184 |
170 void OnCacheableMetadataAvailable(const GURL& url, | 185 void OnCacheableMetadataAvailable(const GURL& url, |
171 base::Time expected_response_time, | 186 base::Time expected_response_time, |
172 const std::vector<char>& data); | 187 const std::vector<char>& data); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 CacheStorageContextImpl* cache_storage_context_; | 248 CacheStorageContextImpl* cache_storage_context_; |
234 | 249 |
235 base::WeakPtrFactory<RenderMessageFilter> weak_ptr_factory_; | 250 base::WeakPtrFactory<RenderMessageFilter> weak_ptr_factory_; |
236 | 251 |
237 DISALLOW_COPY_AND_ASSIGN(RenderMessageFilter); | 252 DISALLOW_COPY_AND_ASSIGN(RenderMessageFilter); |
238 }; | 253 }; |
239 | 254 |
240 } // namespace content | 255 } // namespace content |
241 | 256 |
242 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ | 257 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ |
OLD | NEW |