| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 UI_OZONE_PLATFORM_DRM_GPU_PROXY_HELPERS_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_PROXY_HELPERS_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_PROXY_HELPERS_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_PROXY_HELPERS_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 template <typename... Args> | 17 template <typename... Args> |
| 18 void PostAsyncTask( | 18 void PostAsyncTask( |
| 19 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 19 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 20 const base::Callback<void(Args...)>& callback, | 20 const base::Callback<void(Args...)>& callback, |
| 21 Args... args) { | 21 Args... args) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 36 template <typename... Args> | 36 template <typename... Args> |
| 37 base::Callback<void(Args...)> CreateSafeCallback( | 37 base::Callback<void(Args...)> CreateSafeCallback( |
| 38 const base::Callback<void(Args...)>& callback) { | 38 const base::Callback<void(Args...)>& callback) { |
| 39 return base::Bind(&internal::PostAsyncTask<Args...>, | 39 return base::Bind(&internal::PostAsyncTask<Args...>, |
| 40 base::ThreadTaskRunnerHandle::Get(), callback); | 40 base::ThreadTaskRunnerHandle::Get(), callback); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace ui | 43 } // namespace ui |
| 44 | 44 |
| 45 #endif // UI_OZONE_PLATFORM_DRM_GPU_PROXY_HELPERS_H_ | 45 #endif // UI_OZONE_PLATFORM_DRM_GPU_PROXY_HELPERS_H_ |
| OLD | NEW |