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

Unified Diff: mojo/services/html_viewer/webscheduler_impl.h

Issue 959873003: Add WebScheduler implementation to HTMLViewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 10 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 | « mojo/services/html_viewer/blink_platform_impl.cc ('k') | mojo/services/html_viewer/webscheduler_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/webscheduler_impl.h
diff --git a/mojo/services/html_viewer/webscheduler_impl.h b/mojo/services/html_viewer/webscheduler_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..dac46ec0f600028cea02fa207f0e0fc621009224
--- /dev/null
+++ b/mojo/services/html_viewer/webscheduler_impl.h
@@ -0,0 +1,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.
+
+#ifndef MOJO_SERVICES_HTML_VIEWER_WEBSCHEDULER_IMPL_H_
+#define MOJO_SERVICES_HTML_VIEWER_WEBSCHEDULER_IMPL_H_
+
+#include "third_party/WebKit/public/platform/WebScheduler.h"
+#include "third_party/WebKit/public/platform/WebThread.h"
+#include "third_party/WebKit/public/platform/WebTraceLocation.h"
+
+namespace html_viewer {
+
+class WebSchedulerImpl : public blink::WebScheduler {
+ public:
+ explicit WebSchedulerImpl(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+ ~WebSchedulerImpl() override;
+
+ private:
+ void postIdleTask(const blink::WebTraceLocation& location,
jamesr 2015/02/25 20:53:22 document that these functions implement blink::Web
+ blink::WebScheduler::IdleTask* task) override;
jamesr 2015/02/25 20:53:22 these functions implement a cross-repo interface,
+ void postLoadingTask(const blink::WebTraceLocation& location,
+ blink::WebThread::Task* task) override;
+ void shutdown() override;
+
+ static void runIdleTask(scoped_ptr<blink::WebScheduler::IdleTask> task);
jamesr 2015/02/25 20:53:22 this is chrome code so it should follow chromium n
+ static void runTask(scoped_ptr<blink::WebThread::Task> task);
+
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+};
jamesr 2015/02/25 20:53:22 DISALLOW_COPY_AND_ASSIGN
+
+} // namespace html_viewer
+
+#endif // MOJO_SERVICES_HTML_VIEWER_WEBSCHEDULER_IMPL_H_
« no previous file with comments | « mojo/services/html_viewer/blink_platform_impl.cc ('k') | mojo/services/html_viewer/webscheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698