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

Unified Diff: components/html_viewer/web_scheduler_impl.cc

Issue 1112573003: Hook up the scheduler component to html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 8 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 | « components/html_viewer/web_scheduler_impl.h ('k') | components/html_viewer/web_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/web_scheduler_impl.cc
diff --git a/components/html_viewer/web_scheduler_impl.cc b/components/html_viewer/web_scheduler_impl.cc
deleted file mode 100644
index 7f1ada5c1fb87506119f28da1b587086ed0ff913..0000000000000000000000000000000000000000
--- a/components/html_viewer/web_scheduler_impl.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// 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.
-
-// An implementation of WebThread in terms of base::MessageLoop and
-// base::Thread
-
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "base/tracked_objects.h"
-#include "components/html_viewer/web_scheduler_impl.h"
-
-namespace html_viewer {
-
-WebSchedulerImpl::WebSchedulerImpl(
- scoped_refptr<base::SingleThreadTaskRunner> task_runner)
- : task_runner_(task_runner) {
-}
-
-WebSchedulerImpl::~WebSchedulerImpl() {
-}
-
-void WebSchedulerImpl::postIdleTask(const blink::WebTraceLocation& web_location,
- blink::WebThread::IdleTask* task) {
- scoped_ptr<blink::WebThread::IdleTask> scoped_task(task);
- tracked_objects::Location location(web_location.functionName(),
- web_location.fileName(), -1, nullptr);
- task_runner_->PostTask(location, base::Bind(&WebSchedulerImpl::RunIdleTask,
- base::Passed(&scoped_task)));
-}
-
-void WebSchedulerImpl::postLoadingTask(
- const blink::WebTraceLocation& web_location,
- blink::WebThread::Task* task) {
- scoped_ptr<blink::WebThread::Task> scoped_task(task);
- tracked_objects::Location location(web_location.functionName(),
- web_location.fileName(), -1, nullptr);
- task_runner_->PostTask(location, base::Bind(&WebSchedulerImpl::RunTask,
- base::Passed(&scoped_task)));
-}
-
-void WebSchedulerImpl::postTimerTask(
- const blink::WebTraceLocation& web_location,
- blink::WebThread::Task* task,
- long long delayMs) {
- scoped_ptr<blink::WebThread::Task> scoped_task(task);
- tracked_objects::Location location(web_location.functionName(),
- web_location.fileName(), -1, nullptr);
- task_runner_->PostDelayedTask(
- location,
- base::Bind(&WebSchedulerImpl::RunTask, base::Passed(&scoped_task)),
- base::TimeDelta::FromMilliseconds(delayMs));
-}
-
-// static
-void WebSchedulerImpl::RunIdleTask(
- scoped_ptr<blink::WebThread::IdleTask> task) {
- // TODO(davemoore) Implement idle scheduling.
- task->run(0);
-}
-
-// static
-void WebSchedulerImpl::RunTask(scoped_ptr<blink::WebThread::Task> task) {
- task->run();
-}
-
-} // namespace html_viewer
« no previous file with comments | « components/html_viewer/web_scheduler_impl.h ('k') | components/html_viewer/web_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698