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

Unified Diff: cc/resources/single_release_callback_impl.h

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 6 years, 3 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 | « cc/resources/scoped_resource_unittest.cc ('k') | cc/resources/single_release_callback_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/single_release_callback_impl.h
diff --git a/cc/resources/single_release_callback_impl.h b/cc/resources/single_release_callback_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..41220dc29e82cb52acb8f1d824eaa40a9b7cc81a
--- /dev/null
+++ b/cc/resources/single_release_callback_impl.h
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_SINGLE_RELEASE_CALLBACK_IMPL_H_
+#define CC_RESOURCES_SINGLE_RELEASE_CALLBACK_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/base/cc_export.h"
+#include "cc/resources/release_callback_impl.h"
+
+namespace cc {
+
+class CC_EXPORT SingleReleaseCallbackImpl {
+ public:
+ static scoped_ptr<SingleReleaseCallbackImpl> Create(
+ const ReleaseCallbackImpl& cb) {
+ return make_scoped_ptr(new SingleReleaseCallbackImpl(cb));
+ }
+
+ ~SingleReleaseCallbackImpl();
+
+ void Run(uint32 sync_point,
+ bool is_lost,
+ BlockingTaskRunner* main_thread_task_runner);
+
+ private:
+ explicit SingleReleaseCallbackImpl(const ReleaseCallbackImpl& callback);
+
+ bool has_been_run_;
+ ReleaseCallbackImpl callback_;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_SINGLE_RELEASE_CALLBACK_IMPL_H_
« no previous file with comments | « cc/resources/scoped_resource_unittest.cc ('k') | cc/resources/single_release_callback_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698