summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/scheduler/utility/webthread_impl_for_utility_thread.cc
blob: c37f106f8860f9a5e51306956bb8cdb2ceb366b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2015 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.

#include "third_party/blink/renderer/platform/scheduler/utility/webthread_impl_for_utility_thread.h"

#include "base/threading/thread_task_runner_handle.h"

namespace blink {
namespace scheduler {

WebThreadImplForUtilityThread::WebThreadImplForUtilityThread()
    : task_runner_(base::ThreadTaskRunnerHandle::Get()),
      thread_id_(base::PlatformThread::CurrentId()) {}

WebThreadImplForUtilityThread::~WebThreadImplForUtilityThread() = default;

blink::ThreadScheduler* WebThreadImplForUtilityThread::Scheduler() const {
  NOTIMPLEMENTED();
  return nullptr;
}

blink::PlatformThreadId WebThreadImplForUtilityThread::ThreadId() const {
  return thread_id_;
}

scoped_refptr<base::SingleThreadTaskRunner>
WebThreadImplForUtilityThread::GetTaskRunner() const {
  return task_runner_;
}

void WebThreadImplForUtilityThread::Init() {}

}  // namespace scheduler
}  // namespace blink