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_CHILD_CHILD_THREAD_IMPL_H_ | 5 #ifndef CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // A static variant that can be called on background threads provided | 115 // A static variant that can be called on background threads provided |
116 // the |sender| passed in is safe to use on background threads. | 116 // the |sender| passed in is safe to use on background threads. |
117 // |out_of_memory| is an output variable populated on failure which tells the | 117 // |out_of_memory| is an output variable populated on failure which tells the |
118 // caller whether the failure was caused by an out of memory error. | 118 // caller whether the failure was caused by an out of memory error. |
119 static std::unique_ptr<base::SharedMemory> AllocateSharedMemory( | 119 static std::unique_ptr<base::SharedMemory> AllocateSharedMemory( |
120 size_t buf_size, | 120 size_t buf_size, |
121 IPC::Sender* sender, | 121 IPC::Sender* sender, |
122 bool* out_of_memory); | 122 bool* out_of_memory); |
123 | 123 |
| 124 #if defined(OS_LINUX) |
| 125 void SetThreadPriority(base::PlatformThreadId id, |
| 126 base::ThreadPriority priority); |
| 127 #endif |
| 128 |
124 ChildSharedBitmapManager* shared_bitmap_manager() const { | 129 ChildSharedBitmapManager* shared_bitmap_manager() const { |
125 return shared_bitmap_manager_.get(); | 130 return shared_bitmap_manager_.get(); |
126 } | 131 } |
127 | 132 |
128 ChildGpuMemoryBufferManager* gpu_memory_buffer_manager() const { | 133 ChildGpuMemoryBufferManager* gpu_memory_buffer_manager() const { |
129 return gpu_memory_buffer_manager_.get(); | 134 return gpu_memory_buffer_manager_.get(); |
130 } | 135 } |
131 | 136 |
132 ChildDiscardableSharedMemoryManager* discardable_shared_memory_manager() | 137 ChildDiscardableSharedMemoryManager* discardable_shared_memory_manager() |
133 const { | 138 const { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 346 |
342 private: | 347 private: |
343 struct Options options_; | 348 struct Options options_; |
344 | 349 |
345 DISALLOW_COPY_AND_ASSIGN(Builder); | 350 DISALLOW_COPY_AND_ASSIGN(Builder); |
346 }; | 351 }; |
347 | 352 |
348 } // namespace content | 353 } // namespace content |
349 | 354 |
350 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 355 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
OLD | NEW |