| 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 COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 bool CanEnterLongIdlePeriod( | 175 bool CanEnterLongIdlePeriod( |
| 176 base::TimeTicks now, | 176 base::TimeTicks now, |
| 177 base::TimeDelta* next_long_idle_period_delay_out) override; | 177 base::TimeDelta* next_long_idle_period_delay_out) override; |
| 178 void IsNotQuiescent() override {} | 178 void IsNotQuiescent() override {} |
| 179 void OnIdlePeriodStarted() override; | 179 void OnIdlePeriodStarted() override; |
| 180 void OnIdlePeriodEnded() override; | 180 void OnIdlePeriodEnded() override; |
| 181 | 181 |
| 182 void EndIdlePeriod(); | 182 void EndIdlePeriod(); |
| 183 | 183 |
| 184 // Returns the serialized scheduler state for tracing. | 184 // Returns the serialized scheduler state for tracing. |
| 185 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue( | 185 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue( |
| 186 base::TimeTicks optional_now) const; | 186 base::TimeTicks optional_now) const; |
| 187 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueLocked( | 187 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValueLocked( |
| 188 base::TimeTicks optional_now) const; | 188 base::TimeTicks optional_now) const; |
| 189 | 189 |
| 190 static bool ShouldPrioritizeInputEvent( | 190 static bool ShouldPrioritizeInputEvent( |
| 191 const blink::WebInputEvent& web_input_event); | 191 const blink::WebInputEvent& web_input_event); |
| 192 | 192 |
| 193 // The amount of time which idle periods can continue being scheduled when the | 193 // The amount of time which idle periods can continue being scheduled when the |
| 194 // renderer has been hidden, before going to sleep for good. | 194 // renderer has been hidden, before going to sleep for good. |
| 195 static const int kEndIdleWhenHiddenDelayMillis = 10000; | 195 static const int kEndIdleWhenHiddenDelayMillis = 10000; |
| 196 | 196 |
| 197 // The amount of time for which loading tasks will be prioritized over | 197 // The amount of time for which loading tasks will be prioritized over |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 403 |
| 404 PollableThreadSafeFlag policy_may_need_update_; | 404 PollableThreadSafeFlag policy_may_need_update_; |
| 405 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 405 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 406 | 406 |
| 407 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 407 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 408 }; | 408 }; |
| 409 | 409 |
| 410 } // namespace scheduler | 410 } // namespace scheduler |
| 411 | 411 |
| 412 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 412 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| OLD | NEW |