| 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" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "public/platform/scheduler/child/child_scheduler.h" | 12 #include "public/platform/scheduler/child/child_scheduler.h" |
| 13 #include "public/platform/scheduler/child/single_thread_idle_task_runner.h" | 13 #include "public/platform/scheduler/child/single_thread_idle_task_runner.h" |
| 14 #include "public/platform/scheduler/renderer/render_widget_scheduling_state.h" | 14 #include "public/platform/scheduler/renderer/render_widget_scheduling_state.h" |
| 15 #include "public/platform/WebCommon.h" | 15 #include "public/platform/WebCommon.h" |
| 16 #include "public/platform/WebInputEvent.h" | 16 #include "public/platform/WebInputEvent.h" |
| 17 #include "public/platform/WebInputEventResult.h" | |
| 18 #include "public/platform/WebScheduler.h" | 17 #include "public/platform/WebScheduler.h" |
| 19 #include "v8/include/v8.h" | 18 #include "v8/include/v8.h" |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 namespace trace_event { | 21 namespace trace_event { |
| 23 class BlameContext; | 22 class BlameContext; |
| 24 } | 23 } |
| 25 } | 24 } |
| 26 | 25 |
| 27 namespace cc { | 26 namespace cc { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // DidHandleInputEventOnCompositorThread where |event_state| is | 103 // DidHandleInputEventOnCompositorThread where |event_state| is |
| 105 // EVENT_FORWARDED_TO_MAIN_THREAD will be followed by a corresponding call | 104 // EVENT_FORWARDED_TO_MAIN_THREAD will be followed by a corresponding call |
| 106 // to DidHandleInputEventOnMainThread. | 105 // to DidHandleInputEventOnMainThread. |
| 107 virtual void DidHandleInputEventOnCompositorThread( | 106 virtual void DidHandleInputEventOnCompositorThread( |
| 108 const WebInputEvent& web_input_event, | 107 const WebInputEvent& web_input_event, |
| 109 InputEventState event_state) = 0; | 108 InputEventState event_state) = 0; |
| 110 | 109 |
| 111 // Tells the scheduler that the system processed an input event. Must be | 110 // Tells the scheduler that the system processed an input event. Must be |
| 112 // called from the main thread. | 111 // called from the main thread. |
| 113 virtual void DidHandleInputEventOnMainThread( | 112 virtual void DidHandleInputEventOnMainThread( |
| 114 const WebInputEvent& web_input_event, | 113 const WebInputEvent& web_input_event) = 0; |
| 115 WebInputEventResult result) = 0; | |
| 116 | 114 |
| 117 // Tells the scheduler that the system is displaying an input animation (e.g. | 115 // Tells the scheduler that the system is displaying an input animation (e.g. |
| 118 // a fling). Called by the compositor (impl) thread. | 116 // a fling). Called by the compositor (impl) thread. |
| 119 virtual void DidAnimateForInputOnCompositorThread() = 0; | 117 virtual void DidAnimateForInputOnCompositorThread() = 0; |
| 120 | 118 |
| 121 // Tells the scheduler that the renderer process has been backgrounded, i.e., | 119 // Tells the scheduler that the renderer process has been backgrounded, i.e., |
| 122 // there are no critical, user facing activities (visual, audio, etc...) | 120 // there are no critical, user facing activities (visual, audio, etc...) |
| 123 // driven by this process. A stricter condition than |OnRendererHidden()|, the | 121 // driven by this process. A stricter condition than |OnRendererHidden()|, the |
| 124 // process is assumed to be foregrounded when the scheduler is constructed. | 122 // process is assumed to be foregrounded when the scheduler is constructed. |
| 125 // Must be called on the main thread. | 123 // Must be called on the main thread. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 192 |
| 195 protected: | 193 protected: |
| 196 RendererScheduler(); | 194 RendererScheduler(); |
| 197 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 195 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
| 198 }; | 196 }; |
| 199 | 197 |
| 200 } // namespace scheduler | 198 } // namespace scheduler |
| 201 } // namespace blink | 199 } // namespace blink |
| 202 | 200 |
| 203 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_H_ | 201 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_H_ |
| OLD | NEW |