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

Unified Diff: ppapi/shared_impl/ppapi_globals.cc

Issue 1174543002: ppapi: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix V8VarConverterTest. Created 5 years, 6 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 | « ppapi/shared_impl/ppapi_globals.h ('k') | ppapi/shared_impl/ppb_message_loop_shared.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppapi_globals.cc
diff --git a/ppapi/shared_impl/ppapi_globals.cc b/ppapi/shared_impl/ppapi_globals.cc
index eef3f5c9004d6a65c0a063f01e13938d3565b498..c282ffacbe20494ca2fddb696b06730b7ce70501 100644
--- a/ppapi/shared_impl/ppapi_globals.cc
+++ b/ppapi/shared_impl/ppapi_globals.cc
@@ -6,7 +6,8 @@
#include "base/lazy_instance.h" // For testing purposes only.
#include "base/logging.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/thread_local.h" // For testing purposes only.
namespace ppapi {
@@ -23,12 +24,12 @@ PpapiGlobals* ppapi_globals = NULL;
PpapiGlobals::PpapiGlobals() {
DCHECK(!ppapi_globals);
ppapi_globals = this;
- main_loop_proxy_ = base::MessageLoopProxy::current();
+ main_task_runner_ = base::ThreadTaskRunnerHandle::Get();
}
PpapiGlobals::PpapiGlobals(PerThreadForTest) {
DCHECK(!ppapi_globals);
- main_loop_proxy_ = base::MessageLoopProxy::current();
+ main_task_runner_ = base::ThreadTaskRunnerHandle::Get();
}
PpapiGlobals::~PpapiGlobals() {
@@ -53,12 +54,12 @@ void PpapiGlobals::SetPpapiGlobalsOnThreadForTest(PpapiGlobals* ptr) {
tls_ppapi_globals_for_test.Pointer()->Set(ptr);
}
-base::MessageLoopProxy* PpapiGlobals::GetMainThreadMessageLoop() {
- return main_loop_proxy_.get();
+base::SingleThreadTaskRunner* PpapiGlobals::GetMainThreadMessageLoop() {
+ return main_task_runner_.get();
}
void PpapiGlobals::ResetMainThreadMessageLoopForTesting() {
- main_loop_proxy_ = base::MessageLoopProxy::current();
+ main_task_runner_ = base::ThreadTaskRunnerHandle::Get();
}
bool PpapiGlobals::IsHostGlobals() const { return false; }
« no previous file with comments | « ppapi/shared_impl/ppapi_globals.h ('k') | ppapi/shared_impl/ppb_message_loop_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698