| 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_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_ |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include "platform/scheduler/renderer/web_view_scheduler.h" | 8 #include "platform/scheduler/renderer/web_view_scheduler.h" |
| 9 #include "public/platform/WebString.h" | 9 #include "public/platform/WebString.h" |
| 10 #include "public/platform/WebThread.h" | 10 #include "public/platform/WebThread.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // Tells the scheduler that a navigation task is pending. | 94 // Tells the scheduler that a navigation task is pending. |
| 95 // TODO(alexclarke): Long term should this be a task trait? | 95 // TODO(alexclarke): Long term should this be a task trait? |
| 96 virtual void AddPendingNavigation( | 96 virtual void AddPendingNavigation( |
| 97 scheduler::RendererScheduler::NavigatingFrameType) = 0; | 97 scheduler::RendererScheduler::NavigatingFrameType) = 0; |
| 98 | 98 |
| 99 // Tells the scheduler that a navigation task is no longer pending. | 99 // Tells the scheduler that a navigation task is no longer pending. |
| 100 virtual void RemovePendingNavigation( | 100 virtual void RemovePendingNavigation( |
| 101 scheduler::RendererScheduler::NavigatingFrameType) = 0; | 101 scheduler::RendererScheduler::NavigatingFrameType) = 0; |
| 102 | 102 |
| 103 // Test helpers. |
| 104 |
| 105 // Return a reference to an underlying RendererScheduler object. |
| 106 // Can be null if there is no underlying RendererScheduler |
| 107 // (e.g. worker threads). |
| 108 virtual scheduler::RendererScheduler* GetRendererSchedulerForTest() { |
| 109 return nullptr; |
| 110 } |
| 111 |
| 103 #ifdef INSIDE_BLINK | 112 #ifdef INSIDE_BLINK |
| 104 // Helpers for posting bound functions as tasks. | 113 // Helpers for posting bound functions as tasks. |
| 105 typedef Function<void(double deadline_seconds)> IdleTask; | 114 typedef Function<void(double deadline_seconds)> IdleTask; |
| 106 | 115 |
| 107 void PostIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>); | 116 void PostIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>); |
| 108 void PostNonNestableIdleTask(const WebTraceLocation&, | 117 void PostNonNestableIdleTask(const WebTraceLocation&, |
| 109 std::unique_ptr<IdleTask>); | 118 std::unique_ptr<IdleTask>); |
| 110 #endif | 119 #endif |
| 111 }; | 120 }; |
| 112 | 121 |
| 113 } // namespace blink | 122 } // namespace blink |
| 114 | 123 |
| 115 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H
_ | 124 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H
_ |
| OLD | NEW |