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

Side by Side Diff: third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h

Issue 2812313002: [scheduler] Remove blink::scheduler::TaskQueue from public API. (Closed)
Patch Set: Rebased & addressed skyostil@'s comment Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_
6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class BLINK_PLATFORM_EXPORT RAILModeObserver { 43 class BLINK_PLATFORM_EXPORT RAILModeObserver {
44 public: 44 public:
45 virtual ~RAILModeObserver(); 45 virtual ~RAILModeObserver();
46 virtual void OnRAILModeChanged(v8::RAILMode rail_mode) = 0; 46 virtual void OnRAILModeChanged(v8::RAILMode rail_mode) = 0;
47 }; 47 };
48 48
49 ~RendererScheduler() override; 49 ~RendererScheduler() override;
50 static std::unique_ptr<RendererScheduler> Create(); 50 static std::unique_ptr<RendererScheduler> Create();
51 51
52 // Returns the compositor task runner. 52 // Returns the compositor task runner.
53 virtual scoped_refptr<TaskQueue> CompositorTaskRunner() = 0; 53 virtual scoped_refptr<base::SingleThreadTaskRunner>
54 CompositorTaskRunner() = 0;
54 55
55 // Creates a WebThread implementation for the renderer main thread. 56 // Creates a WebThread implementation for the renderer main thread.
56 virtual std::unique_ptr<WebThread> CreateMainThread() = 0; 57 virtual std::unique_ptr<WebThread> CreateMainThread() = 0;
57 58
58 // Returns the loading task runner. This queue is intended for tasks related 59 // Returns the loading task runner. This queue is intended for tasks related
59 // to resource dispatch, foreground HTML parsing, etc... 60 // to resource dispatch, foreground HTML parsing, etc...
60 virtual scoped_refptr<TaskQueue> LoadingTaskRunner() = 0; 61 virtual scoped_refptr<base::SingleThreadTaskRunner> LoadingTaskRunner() = 0;
61 62
62 // Returns the timer task runner. This queue is intended for DOM Timers. 63 // Returns the timer task runner. This queue is intended for DOM Timers.
63 // TODO(alexclarke): Get rid of this default timer queue. 64 // TODO(alexclarke): Get rid of this default timer queue.
64 virtual scoped_refptr<TaskQueue> TimerTaskRunner() = 0; 65 virtual scoped_refptr<base::SingleThreadTaskRunner> TimerTaskRunner() = 0;
65
66 // Returns a new loading task runner. This queue is intended for tasks related
67 // to resource dispatch, foreground HTML parsing, etc...
68 virtual scoped_refptr<TaskQueue> NewLoadingTaskRunner(
69 TaskQueue::QueueType queue_type) = 0;
70
71 // Returns a new timer task runner. This queue is intended for DOM Timers.
72 virtual scoped_refptr<TaskQueue> NewTimerTaskRunner(
73 TaskQueue::QueueType queue_type) = 0;
74
75 // Returns a task runner for tasks which should never get throttled.
76 virtual scoped_refptr<TaskQueue> NewUnthrottledTaskRunner(
77 TaskQueue::QueueType queue_type) = 0;
78 66
79 // Returns a new RenderWidgetSchedulingState. The signals from this will be 67 // Returns a new RenderWidgetSchedulingState. The signals from this will be
80 // used to make scheduling decisions. 68 // used to make scheduling decisions.
81 virtual std::unique_ptr<RenderWidgetSchedulingState> 69 virtual std::unique_ptr<RenderWidgetSchedulingState>
82 NewRenderWidgetSchedulingState() = 0; 70 NewRenderWidgetSchedulingState() = 0;
83 71
84 // Called to notify about the start of an extended period where no frames 72 // Called to notify about the start of an extended period where no frames
85 // need to be drawn. Must be called from the main thread. 73 // need to be drawn. Must be called from the main thread.
86 virtual void BeginFrameNotExpectedSoon() = 0; 74 virtual void BeginFrameNotExpectedSoon() = 0;
87 75
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 184
197 protected: 185 protected:
198 RendererScheduler(); 186 RendererScheduler();
199 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); 187 DISALLOW_COPY_AND_ASSIGN(RendererScheduler);
200 }; 188 };
201 189
202 } // namespace scheduler 190 } // namespace scheduler
203 } // namespace blink 191 } // namespace blink
204 192
205 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_ 193 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698