| OLD | NEW |
| 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 // An implementation of WebThread in terms of base::MessageLoop and | 5 // An implementation of WebThread in terms of base::MessageLoop and |
| 6 // base::Thread | 6 // base::Thread |
| 7 | 7 |
| 8 #include "public/platform/scheduler/child/webthread_base.h" | 8 #include "public/platform/scheduler/child/webthread_base.h" |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/pending_task.h" | 13 #include "base/pending_task.h" |
| 14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 15 #include "platform/scheduler/child/compositor_worker_scheduler.h" |
| 15 #include "platform/scheduler/child/webthread_impl_for_worker_scheduler.h" | 16 #include "platform/scheduler/child/webthread_impl_for_worker_scheduler.h" |
| 16 #include "public/platform/WebTraceLocation.h" | 17 #include "public/platform/WebTraceLocation.h" |
| 17 #include "public/platform/scheduler/child/compositor_worker_scheduler.h" | |
| 18 #include "public/platform/scheduler/child/single_thread_idle_task_runner.h" | 18 #include "public/platform/scheduler/child/single_thread_idle_task_runner.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 namespace scheduler { | 21 namespace scheduler { |
| 22 | 22 |
| 23 class WebThreadBase::TaskObserverAdapter | 23 class WebThreadBase::TaskObserverAdapter |
| 24 : public base::MessageLoop::TaskObserver { | 24 : public base::MessageLoop::TaskObserver { |
| 25 public: | 25 public: |
| 26 explicit TaskObserverAdapter(WebThread::TaskObserver* observer) | 26 explicit TaskObserverAdapter(WebThread::TaskObserver* observer) |
| 27 : observer_(observer) {} | 27 : observer_(observer) {} |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 return base::MakeUnique<WebThreadImplForWorkerScheduler>(name, options); | 130 return base::MakeUnique<WebThreadImplForWorkerScheduler>(name, options); |
| 131 } | 131 } |
| 132 | 132 |
| 133 std::unique_ptr<WebThreadBase> WebThreadBase::CreateCompositorThread( | 133 std::unique_ptr<WebThreadBase> WebThreadBase::CreateCompositorThread( |
| 134 base::Thread::Options options) { | 134 base::Thread::Options options) { |
| 135 return base::MakeUnique<WebThreadForCompositor>(options); | 135 return base::MakeUnique<WebThreadForCompositor>(options); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace scheduler | 138 } // namespace scheduler |
| 139 } // namespace blink | 139 } // namespace blink |
| OLD | NEW |