| 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 void SetThreadAffinity(base::PlatformThreadId id, |
| 125 base::ThreadPriority priority); |
| 126 |
| 124 ChildSharedBitmapManager* shared_bitmap_manager() const { | 127 ChildSharedBitmapManager* shared_bitmap_manager() const { |
| 125 return shared_bitmap_manager_.get(); | 128 return shared_bitmap_manager_.get(); |
| 126 } | 129 } |
| 127 | 130 |
| 128 ChildGpuMemoryBufferManager* gpu_memory_buffer_manager() const { | 131 ChildGpuMemoryBufferManager* gpu_memory_buffer_manager() const { |
| 129 return gpu_memory_buffer_manager_.get(); | 132 return gpu_memory_buffer_manager_.get(); |
| 130 } | 133 } |
| 131 | 134 |
| 132 ChildDiscardableSharedMemoryManager* discardable_shared_memory_manager() | 135 ChildDiscardableSharedMemoryManager* discardable_shared_memory_manager() |
| 133 const { | 136 const { |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 344 |
| 342 private: | 345 private: |
| 343 struct Options options_; | 346 struct Options options_; |
| 344 | 347 |
| 345 DISALLOW_COPY_AND_ASSIGN(Builder); | 348 DISALLOW_COPY_AND_ASSIGN(Builder); |
| 346 }; | 349 }; |
| 347 | 350 |
| 348 } // namespace content | 351 } // namespace content |
| 349 | 352 |
| 350 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 353 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
| OLD | NEW |