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

Side by Side Diff: third_party/WebKit/public/platform/WebFrameScheduler.h

Issue 2527143002: Suspend frame schedulers on a page suspension (Closed)
Patch Set: mod a comment Created 4 years 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "WebCommon.h" 8 #include "WebCommon.h"
9 9
10 #include <string> 10 #include <string>
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class WebSecurityOrigin; 14 class WebSecurityOrigin;
15 class WebTaskRunner; 15 class WebTaskRunner;
16 class WebViewScheduler; 16 class WebViewScheduler;
17 17
18 class BLINK_PLATFORM_EXPORT WebFrameScheduler { 18 class BLINK_PLATFORM_EXPORT WebFrameScheduler {
19 public: 19 public:
20 virtual ~WebFrameScheduler() {} 20 virtual ~WebFrameScheduler() {}
21 21
22 // The scheduler may throttle tasks associated with offscreen frames. 22 // The scheduler may throttle tasks associated with offscreen frames.
23 virtual void setFrameVisible(bool) {} 23 virtual void setFrameVisible(bool) {}
24 24
25 // Tells the scheduler that the page this frame belongs to is not visible. 25 // Tells the scheduler that the page this frame belongs to is not visible.
26 // The scheduler may throttle tasks associated with pages that are not 26 // The scheduler may throttle tasks associated with pages that are not
27 // visible. 27 // visible.
28 virtual void setPageVisible(bool) {} 28 virtual void setPageVisible(bool) {}
29 29
30 // Set whether this frame is suspended. Only unthrottledTaskRunner tasks are
31 // allowed to run on a suspended frame.
32 virtual void setSuspended(bool) {}
33
30 // Set whether this frame is cross origin w.r.t. the top level frame. Cross 34 // Set whether this frame is cross origin w.r.t. the top level frame. Cross
31 // origin frames may use a different scheduling policy from same origin 35 // origin frames may use a different scheduling policy from same origin
32 // frames. 36 // frames.
33 virtual void setCrossOrigin(bool) {} 37 virtual void setCrossOrigin(bool) {}
34 38
35 // Returns the WebTaskRunner for loading tasks. 39 // Returns the WebTaskRunner for loading tasks.
36 // WebFrameScheduler owns the returned WebTaskRunner. 40 // WebFrameScheduler owns the returned WebTaskRunner.
37 virtual WebTaskRunner* loadingTaskRunner() { return nullptr; } 41 virtual WebTaskRunner* loadingTaskRunner() { return nullptr; }
38 42
39 // Returns the WebTaskRunner for timer tasks. 43 // Returns the WebTaskRunner for timer tasks.
(...skipping 21 matching lines...) Expand all
61 65
62 // Tells the scheduler if we are parsing a document on another thread. This 66 // 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 67 // tells the scheduler not to advance virtual time if it's using the
64 // DETERMINISTIC_LOADING policy. 68 // DETERMINISTIC_LOADING policy.
65 virtual void setDocumentParsingInBackground(bool) {} 69 virtual void setDocumentParsingInBackground(bool) {}
66 }; 70 };
67 71
68 } // namespace blink 72 } // namespace blink
69 73
70 #endif // WebFrameScheduler_h 74 #endif // WebFrameScheduler_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698