| Index: content/renderer/scheduler/webthread_impl_for_scheduler.cc
|
| diff --git a/content/renderer/scheduler/webthread_impl_for_scheduler.cc b/content/renderer/scheduler/webthread_impl_for_scheduler.cc
|
| index c84548d9570691c64dc9df529440df0e98f96679..b328142846ada43cee212c0b59c25fb2845acbd9 100644
|
| --- a/content/renderer/scheduler/webthread_impl_for_scheduler.cc
|
| +++ b/content/renderer/scheduler/webthread_impl_for_scheduler.cc
|
| @@ -16,58 +16,20 @@ WebThreadImplForScheduler::WebThreadImplForScheduler(
|
| thread_id_(base::PlatformThread::CurrentId()) {
|
| }
|
|
|
| -void WebThreadImplForScheduler::postTask(Task* task) {
|
| - postDelayedTask(task, 0);
|
| -}
|
| -
|
| -void WebThreadImplForScheduler::postTask(
|
| - const blink::WebTraceLocation& location,
|
| - Task* task) {
|
| - postDelayedTask(location, task, 0);
|
| -}
|
| -
|
| -void WebThreadImplForScheduler::postDelayedTask(Task* task,
|
| - long long delay_ms) {
|
| - task_runner_->PostDelayedTask(
|
| - FROM_HERE,
|
| - base::Bind(RunWebThreadTask, base::Passed(make_scoped_ptr(task))),
|
| - base::TimeDelta::FromMilliseconds(delay_ms));
|
| -}
|
| -
|
| -void WebThreadImplForScheduler::postDelayedTask(
|
| - const blink::WebTraceLocation& web_location,
|
| - Task* task,
|
| - long long delay_ms) {
|
| - tracked_objects::Location location(web_location.functionName(),
|
| - web_location.fileName(), -1, nullptr);
|
| - task_runner_->PostDelayedTask(
|
| - location,
|
| - base::Bind(RunWebThreadTask, base::Passed(make_scoped_ptr(task))),
|
| - base::TimeDelta::FromMilliseconds(delay_ms));
|
| -}
|
| -
|
| -void WebThreadImplForScheduler::enterRunLoop() {
|
| - CHECK(isCurrentThread());
|
| - // We don't support nesting.
|
| - CHECK(!base::MessageLoop::current()->is_running());
|
| - base::MessageLoop::current()->Run();
|
| -}
|
| -
|
| -void WebThreadImplForScheduler::exitRunLoop() {
|
| - CHECK(isCurrentThread());
|
| - CHECK(base::MessageLoop::current()->is_running());
|
| - base::MessageLoop::current()->Quit();
|
| -}
|
| -
|
| -bool WebThreadImplForScheduler::isCurrentThread() const {
|
| - return task_runner_->BelongsToCurrentThread();
|
| +WebThreadImplForScheduler::~WebThreadImplForScheduler() {
|
| }
|
|
|
| blink::PlatformThreadId WebThreadImplForScheduler::threadId() const {
|
| return thread_id_;
|
| }
|
|
|
| -WebThreadImplForScheduler::~WebThreadImplForScheduler() {
|
| +base::MessageLoop* WebThreadImplForScheduler::MessageLoop() const {
|
| + DCHECK(isCurrentThread());
|
| + return base::MessageLoop::current();
|
| +}
|
| +
|
| +base::SingleThreadTaskRunner* WebThreadImplForScheduler::TaskRunner() const {
|
| + return task_runner_.get();
|
| }
|
|
|
| void WebThreadImplForScheduler::AddTaskObserverInternal(
|
|
|