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