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

Unified Diff: third_party/WebKit/Source/platform/WebFrameScheduler.h

Issue 2652973002: [scheduler] Plumb websocket information to scheduler (Closed)
Patch Set: git Created 3 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
Index: third_party/WebKit/Source/platform/WebFrameScheduler.h
diff --git a/third_party/WebKit/Source/platform/WebFrameScheduler.h b/third_party/WebKit/Source/platform/WebFrameScheduler.h
index 069fedf6b2bbc6dd2eac8d1e6ed62e3edc2c383f..0a14a9d928c02cdfd602481eb4db293fc7d9978a 100644
--- a/third_party/WebKit/Source/platform/WebFrameScheduler.h
+++ b/third_party/WebKit/Source/platform/WebFrameScheduler.h
@@ -7,6 +7,8 @@
#include "wtf/RefPtr.h"
+#include <memory>
+
namespace blink {
class WebTaskRunner;
@@ -16,6 +18,15 @@ class WebFrameScheduler {
public:
virtual ~WebFrameScheduler() {}
+ class ActiveConnectionHandle {
+ public:
+ ActiveConnectionHandle() {}
+ virtual ~ActiveConnectionHandle() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ActiveConnectionHandle);
+ };
+
// The scheduler may throttle tasks associated with offscreen frames.
virtual void setFrameVisible(bool) {}
@@ -67,6 +78,13 @@ class WebFrameScheduler {
// Tells the scheduler that the first meaningful paint has occured for this
// frame.
virtual void onFirstMeaningfulPaint() {}
+
+ // Notifies scheduler that this frame has established an active real time
+ // connection (websocket, webrtc, etc). When connection is closed this handle
+ // must be destroyed.
+ virtual std::unique_ptr<ActiveConnectionHandle> onActiveConnectionCreated() {
+ return nullptr;
+ };
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698