Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Unified Diff: ui/ozone/platform/drm/gpu/proxy_helpers.h

Issue 2873153005: Revert of Update ozone/drm proxy_helpers.h to support move-only types. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/BUILD.gn ('k') | ui/ozone/platform/drm/gpu/proxy_helpers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/proxy_helpers.h
diff --git a/ui/ozone/platform/drm/gpu/proxy_helpers.h b/ui/ozone/platform/drm/gpu/proxy_helpers.h
index 086709c9a01b36fbb9347a88424983064e7e2130..0cd73b785ea9f97b65ee60e5367586c309ad196d 100644
--- a/ui/ozone/platform/drm/gpu/proxy_helpers.h
+++ b/ui/ozone/platform/drm/gpu/proxy_helpers.h
@@ -22,15 +22,6 @@
task_runner->PostTask(FROM_HERE, base::Bind(callback, args...));
}
-template <typename... Args>
-void PostAsyncTaskOnce(
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
- base::OnceCallback<void(Args...)> callback,
- Args... args) {
- auto closure = base::BindOnce(std::move(callback), std::move(args)...);
- task_runner->PostTask(FROM_HERE, std::move(closure));
-}
-
} // namespace internal
// Posts a task to a different thread and blocks waiting for the task to finish
@@ -49,17 +40,6 @@
base::ThreadTaskRunnerHandle::Get(), callback);
}
-// Creates a OnceCallback that will run |callback| on the calling thread. Useful
-// when posting a task on a different thread and expecting a callback when the
-// task finished (and the callback needs to run on the original thread).
-template <typename... Args>
-base::OnceCallback<void(Args...)> CreateSafeOnceCallback(
- base::OnceCallback<void(Args...)> callback) {
- return base::BindOnce(&internal::PostAsyncTaskOnce<Args...>,
- base::ThreadTaskRunnerHandle::Get(),
- std::move(callback));
-}
-
} // namespace ui
#endif // UI_OZONE_PLATFORM_DRM_GPU_PROXY_HELPERS_H_
« no previous file with comments | « ui/ozone/platform/drm/BUILD.gn ('k') | ui/ozone/platform/drm/gpu/proxy_helpers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698