diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 02:38:24 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 02:38:24 +0000 |
commit | 7ef6b79bd40c9e7ce84b05a7b8cc3ed28a0ddc72 (patch) | |
tree | 035507f07c0928c6ca8043fa7d01f64817bed3eb /ppapi/shared_impl/test_globals.cc | |
parent | fd8609d8bd5255ab0a46b7169921a98de7837025 (diff) | |
download | chromium_src-7ef6b79bd40c9e7ce84b05a7b8cc3ed28a0ddc72.zip chromium_src-7ef6b79bd40c9e7ce84b05a7b8cc3ed28a0ddc72.tar.gz chromium_src-7ef6b79bd40c9e7ce84b05a7b8cc3ed28a0ddc72.tar.bz2 |
Pepper: Introduce ThreadAwareCallback.
Some PPB interfaces have methods that set a custom callback. Usually, the callback has to be called on the same thread as the one it was set on. ThreadAwareCallback keeps track of the target thread, and posts a task to run on it if requested from a different thread.
BUG=None
TEST=newly added unittests.
Review URL: https://chromiumcodereview.appspot.com/11859015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177319 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/test_globals.cc')
-rw-r--r-- | ppapi/shared_impl/test_globals.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ppapi/shared_impl/test_globals.cc b/ppapi/shared_impl/test_globals.cc index cf19286..913d53c 100644 --- a/ppapi/shared_impl/test_globals.cc +++ b/ppapi/shared_impl/test_globals.cc @@ -11,8 +11,8 @@ TestGlobals::TestGlobals() callback_tracker_(new CallbackTracker) { } -TestGlobals::TestGlobals(PpapiGlobals::ForTest for_test) - : ppapi::PpapiGlobals(for_test), +TestGlobals::TestGlobals(PpapiGlobals::PerThreadForTest per_thread_for_test) + : ppapi::PpapiGlobals(per_thread_for_test), callback_tracker_(new CallbackTracker) { } |