Index: public/platform/WebFrameScheduler.h |
diff --git a/public/platform/WebFrameScheduler.h b/public/platform/WebFrameScheduler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8ca9b932c7b8b396cfb1d9468413de00cd12b49c |
--- /dev/null |
+++ b/public/platform/WebFrameScheduler.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 WebFrameScheduler_h |
+#define WebFrameScheduler_h |
+ |
+#include "WebCommon.h" |
+ |
+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 char*) { } |
Sami
2015/09/04 10:13:35
Should this be a std::string now given that we can
alex clarke (OOO till 29th)
2015/09/04 10:19:34
Done.
|
+}; |
+ |
+} // namespace blink |
+ |
+#endif // WebFrameScheduler_h |