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

Unified Diff: public/platform/WebFrameScheduler.h

Issue 1316233010: Adds a WebPageScheduler and a WebFrameScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use std::string Created 5 years, 3 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 | « public/BUILD.gn ('k') | public/platform/WebPageScheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebFrameScheduler.h
diff --git a/public/platform/WebFrameScheduler.h b/public/platform/WebFrameScheduler.h
new file mode 100644
index 0000000000000000000000000000000000000000..2e6e015c5d7cb1a6f3675498b2085c43e3fd3bd4
--- /dev/null
+++ b/public/platform/WebFrameScheduler.h
@@ -0,0 +1,37 @@
+// 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 WebFrameScheduler_h
+#define WebFrameScheduler_h
+
+#include "WebCommon.h"
+
+#include <string>
+
+namespace blink {
+
+class WebTaskRunner;
+
+class BLINK_PLATFORM_EXPORT WebFrameScheduler {
+public:
+ virtual ~WebFrameScheduler() {}
+
+ // The scheduler may throttle tasks associated with offscreen frames.
+ virtual void setFrameVisible(bool) {}
+
+ // Returns the WebTaskRunner for loading tasks.
+ // WebFrameScheduler owns the returned WebTaskRunner.
+ virtual WebTaskRunner* loadingTaskRunner() { return nullptr; }
+
+ // Returns the WebTaskRunner for timer tasks.
+ // WebFrameScheduler owns the returned WebTaskRunner.
+ virtual WebTaskRunner* timerTaskRunner() { return nullptr; }
+
+ // Record the current origin. This is for tracing.
+ virtual void setFrameOrigin(const std::string&) { }
Mike West 2015/09/07 07:45:18 Nit: Be consistent, please. Either `{}` or `{ }` t
alex clarke (OOO till 29th) 2015/09/08 15:58:05 Currently it's for annotating task queues in traci
+};
+
+} // namespace blink
+
+#endif // WebFrameScheduler_h
« no previous file with comments | « public/BUILD.gn ('k') | public/platform/WebPageScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698