Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebFrameScheduler_h | 5 #ifndef WebFrameScheduler_h |
| 6 #define WebFrameScheduler_h | 6 #define WebFrameScheduler_h |
| 7 | 7 |
| 8 #include "wtf/RefPtr.h" | 8 #include "wtf/RefPtr.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 virtual WebViewScheduler* webViewScheduler() { return nullptr; } | 52 virtual WebViewScheduler* webViewScheduler() { return nullptr; } |
| 53 | 53 |
| 54 // Tells the scheduler a resource load has started. The scheduler may make | 54 // Tells the scheduler a resource load has started. The scheduler may make |
| 55 // policy decisions based on this. | 55 // policy decisions based on this. |
| 56 virtual void didStartLoading(unsigned long identifier) {} | 56 virtual void didStartLoading(unsigned long identifier) {} |
| 57 | 57 |
| 58 // Tells the scheduler a resource load has stopped. The scheduler may make | 58 // Tells the scheduler a resource load has stopped. The scheduler may make |
| 59 // policy decisions based on this. | 59 // policy decisions based on this. |
| 60 virtual void didStopLoading(unsigned long identifier) {} | 60 virtual void didStopLoading(unsigned long identifier) {} |
| 61 | 61 |
| 62 // Tells the scheduler that websocket connections was established or | |
| 63 // destroyed. | |
| 64 virtual void didOpenWebSocket() {} | |
| 65 virtual void didCloseWebSocket() {} | |
|
alex clarke (OOO till 29th)
2017/01/24 18:15:33
I wonder if these should really all be pure virtua
haraken
2017/01/24 21:49:08
Yeah, pure virtual sounds nicer.
altimin
2017/01/26 11:26:15
I prefer keeping EmptyFrameScheduler free of unnee
Sami
2017/01/26 15:53:34
I think everything here should be pure virtual. Th
alex clarke (OOO till 29th)
2017/01/26 16:02:36
Fell free to add TODO(alexclarke): Make this API p
| |
| 66 | |
| 62 // Tells the scheduler if we are parsing a document on another thread. This | 67 // Tells the scheduler if we are parsing a document on another thread. This |
| 63 // tells the scheduler not to advance virtual time if it's using the | 68 // tells the scheduler not to advance virtual time if it's using the |
| 64 // DETERMINISTIC_LOADING policy. | 69 // DETERMINISTIC_LOADING policy. |
| 65 virtual void setDocumentParsingInBackground(bool) {} | 70 virtual void setDocumentParsingInBackground(bool) {} |
| 66 | 71 |
| 67 // Tells the scheduler that the first meaningful paint has occured for this | 72 // Tells the scheduler that the first meaningful paint has occured for this |
| 68 // frame. | 73 // frame. |
| 69 virtual void onFirstMeaningfulPaint() {} | 74 virtual void onFirstMeaningfulPaint() {} |
| 70 }; | 75 }; |
| 71 | 76 |
| 72 } // namespace blink | 77 } // namespace blink |
| 73 | 78 |
| 74 #endif // WebFrameScheduler_h | 79 #endif // WebFrameScheduler_h |
| OLD | NEW |