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

Unified Diff: content/child/scheduler/worker_scheduler.cc

Issue 1085863002: Revert of Revert of Add a WorkerScheduler and a WebThreadImplForWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « content/child/scheduler/worker_scheduler.h ('k') | content/child/scheduler/worker_scheduler_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/scheduler/worker_scheduler.cc
diff --git a/content/child/scheduler/worker_scheduler.cc b/content/child/scheduler/worker_scheduler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ac30ab3f6138183240f3d450082cadc38a3ed2cd
--- /dev/null
+++ b/content/child/scheduler/worker_scheduler.cc
@@ -0,0 +1,34 @@
+// 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 "content/child/scheduler/worker_scheduler.h"
+
+#include "base/command_line.h"
+#include "base/message_loop/message_loop.h"
+#include "content/child/scheduler/null_worker_scheduler.h"
+#include "content/child/scheduler/scheduler_message_loop_delegate.h"
+#include "content/child/scheduler/worker_scheduler_impl.h"
+#include "content/public/common/content_switches.h"
+
+namespace content {
+
+WorkerScheduler::WorkerScheduler() {
+}
+
+WorkerScheduler::~WorkerScheduler() {
+}
+
+// static
+scoped_ptr<WorkerScheduler> WorkerScheduler::Create(
+ base::MessageLoop* message_loop) {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kDisableBlinkScheduler)) {
+ return make_scoped_ptr(new NullWorkerScheduler());
+ } else {
+ return make_scoped_ptr(new WorkerSchedulerImpl(
+ SchedulerMessageLoopDelegate::Create(message_loop)));
+ }
+}
+
+} // namespace content
« no previous file with comments | « content/child/scheduler/worker_scheduler.h ('k') | content/child/scheduler/worker_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698