| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 class BLINK_PLATFORM_EXPORT RendererScheduler : public ChildScheduler { | 41 class BLINK_PLATFORM_EXPORT RendererScheduler : public ChildScheduler { |
| 42 public: | 42 public: |
| 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 |
| 51 enum class RendererType { |
| 52 kForegroundOnly, |
| 53 kForegroundAndBackground, |
| 54 }; |
| 55 static std::unique_ptr<RendererScheduler> Create(RendererType type); |
| 51 | 56 |
| 52 // Returns the compositor task runner. | 57 // Returns the compositor task runner. |
| 53 virtual scoped_refptr<base::SingleThreadTaskRunner> | 58 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 54 CompositorTaskRunner() = 0; | 59 CompositorTaskRunner() = 0; |
| 55 | 60 |
| 56 // Creates a WebThread implementation for the renderer main thread. | 61 // Creates a WebThread implementation for the renderer main thread. |
| 57 virtual std::unique_ptr<WebThread> CreateMainThread() = 0; | 62 virtual std::unique_ptr<WebThread> CreateMainThread() = 0; |
| 58 | 63 |
| 59 // Returns the loading task runner. This queue is intended for tasks related | 64 // Returns the loading task runner. This queue is intended for tasks related |
| 60 // to resource dispatch, foreground HTML parsing, etc... | 65 // to resource dispatch, foreground HTML parsing, etc... |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 196 |
| 192 protected: | 197 protected: |
| 193 RendererScheduler(); | 198 RendererScheduler(); |
| 194 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 199 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
| 195 }; | 200 }; |
| 196 | 201 |
| 197 } // namespace scheduler | 202 } // namespace scheduler |
| 198 } // namespace blink | 203 } // namespace blink |
| 199 | 204 |
| 200 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_H_ | 205 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_H_ |
| OLD | NEW |