| 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 CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ |
| 6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ | 6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include "content/renderer/scheduler/single_thread_idle_task_runner.h" | 8 #include "content/renderer/scheduler/single_thread_idle_task_runner.h" |
| 9 #include "content/renderer/scheduler/task_queue_manager.h" | 9 #include "content/renderer/scheduler/task_queue_manager.h" |
| 10 #include "third_party/WebKit/public/web/WebInputEvent.h" | 10 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // main thread. | 40 // main thread. |
| 41 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; | 41 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; |
| 42 | 42 |
| 43 // Called to notify that a previously begun frame was committed. Must be | 43 // Called to notify that a previously begun frame was committed. Must be |
| 44 // called from the main thread. | 44 // called from the main thread. |
| 45 virtual void DidCommitFrameToCompositor() = 0; | 45 virtual void DidCommitFrameToCompositor() = 0; |
| 46 | 46 |
| 47 // Tells the scheduler that the system received an input event. Called by the | 47 // Tells the scheduler that the system received an input event. Called by the |
| 48 // compositor (impl) thread. | 48 // compositor (impl) thread. |
| 49 virtual void DidReceiveInputEventOnCompositorThread( | 49 virtual void DidReceiveInputEventOnCompositorThread( |
| 50 blink::WebInputEvent::Type type) = 0; | 50 const blink::WebInputEvent& web_input_event) = 0; |
| 51 | 51 |
| 52 // Tells the scheduler that the system is displaying an input animation (e.g. | 52 // Tells the scheduler that the system is displaying an input animation (e.g. |
| 53 // a fling). Called by the compositor (impl) thread. | 53 // a fling). Called by the compositor (impl) thread. |
| 54 virtual void DidAnimateForInputOnCompositorThread() = 0; | 54 virtual void DidAnimateForInputOnCompositorThread() = 0; |
| 55 | 55 |
| 56 // Returns true if the scheduler has reason to believe that high priority work | 56 // Returns true if the scheduler has reason to believe that high priority work |
| 57 // may soon arrive on the main thread, e.g., if gesture events were observed | 57 // may soon arrive on the main thread, e.g., if gesture events were observed |
| 58 // recently. | 58 // recently. |
| 59 // Must be called from the main thread. | 59 // Must be called from the main thread. |
| 60 virtual bool IsHighPriorityWorkAnticipated() = 0; | 60 virtual bool IsHighPriorityWorkAnticipated() = 0; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 72 virtual void Shutdown() = 0; | 72 virtual void Shutdown() = 0; |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 RendererScheduler(); | 75 RendererScheduler(); |
| 76 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 76 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace content | 79 } // namespace content |
| 80 | 80 |
| 81 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ | 81 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ |
| OLD | NEW |