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

Side by Side Diff: gin/v8_platform.cc

Issue 1169923009: Remove remaining use of the deprecated MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. 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 unified diff | Download patch
« no previous file with comments | « gin/per_isolate_data.cc ('k') | media/audio/audio_output_device_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "gin/public/v8_platform.h" 5 #include "gin/public/v8_platform.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/threading/worker_pool.h" 10 #include "base/threading/worker_pool.h"
(...skipping 17 matching lines...) Expand all
28 void V8Platform::CallOnBackgroundThread( 28 void V8Platform::CallOnBackgroundThread(
29 v8::Task* task, 29 v8::Task* task,
30 v8::Platform::ExpectedRuntime expected_runtime) { 30 v8::Platform::ExpectedRuntime expected_runtime) {
31 base::WorkerPool::PostTask( 31 base::WorkerPool::PostTask(
32 FROM_HERE, 32 FROM_HERE,
33 base::Bind(&v8::Task::Run, base::Owned(task)), 33 base::Bind(&v8::Task::Run, base::Owned(task)),
34 expected_runtime == v8::Platform::kLongRunningTask); 34 expected_runtime == v8::Platform::kLongRunningTask);
35 } 35 }
36 36
37 void V8Platform::CallOnForegroundThread(v8::Isolate* isolate, v8::Task* task) { 37 void V8Platform::CallOnForegroundThread(v8::Isolate* isolate, v8::Task* task) {
38 PerIsolateData::From(isolate)->message_loop_proxy()->PostTask( 38 PerIsolateData::From(isolate)->task_runner()->PostTask(
39 FROM_HERE, base::Bind(&v8::Task::Run, base::Owned(task))); 39 FROM_HERE, base::Bind(&v8::Task::Run, base::Owned(task)));
40 } 40 }
41 41
42 double V8Platform::MonotonicallyIncreasingTime() { 42 double V8Platform::MonotonicallyIncreasingTime() {
43 return base::TimeTicks::Now().ToInternalValue() / 43 return base::TimeTicks::Now().ToInternalValue() /
44 static_cast<double>(base::Time::kMicrosecondsPerSecond); 44 static_cast<double>(base::Time::kMicrosecondsPerSecond);
45 } 45 }
46 46
47 } // namespace gin 47 } // namespace gin
OLDNEW
« no previous file with comments | « gin/per_isolate_data.cc ('k') | media/audio/audio_output_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698