| 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_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
| 6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "content/child/scheduler/scheduler_helper.h" | 10 #include "content/child/scheduler/scheduler_helper.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 base::subtle::Atomic32 flag_; | 92 base::subtle::Atomic32 flag_; |
| 93 base::Lock* write_lock_; // Not owned. | 93 base::Lock* write_lock_; // Not owned. |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(PollableNeedsUpdateFlag); | 95 DISALLOW_COPY_AND_ASSIGN(PollableNeedsUpdateFlag); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 // SchedulerHelperDelegate implementation: | 98 // SchedulerHelperDelegate implementation: |
| 99 bool CanEnterLongIdlePeriod( | 99 bool CanEnterLongIdlePeriod( |
| 100 base::TimeTicks now, | 100 base::TimeTicks now, |
| 101 base::TimeDelta* next_long_idle_period_delay_out) override; | 101 base::TimeDelta* next_long_idle_period_delay_out) override; |
| 102 void IsNotQuiescent() override {} |
| 102 | 103 |
| 103 // Returns the serialized scheduler state for tracing. | 104 // Returns the serialized scheduler state for tracing. |
| 104 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueLocked( | 105 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueLocked( |
| 105 base::TimeTicks optional_now) const; | 106 base::TimeTicks optional_now) const; |
| 106 static const char* TaskQueueIdToString(QueueId queue_id); | 107 static const char* TaskQueueIdToString(QueueId queue_id); |
| 107 static const char* PolicyToString(Policy policy); | 108 static const char* PolicyToString(Policy policy); |
| 108 static const char* InputStreamStateToString(InputStreamState state); | 109 static const char* InputStreamStateToString(InputStreamState state); |
| 109 | 110 |
| 110 static InputStreamState ComputeNewInputStreamState( | 111 static InputStreamState ComputeNewInputStreamState( |
| 111 InputStreamState current_state, | 112 InputStreamState current_state, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 PollableNeedsUpdateFlag policy_may_need_update_; | 178 PollableNeedsUpdateFlag policy_may_need_update_; |
| 178 | 179 |
| 179 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 180 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 180 | 181 |
| 181 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 182 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace content | 185 } // namespace content |
| 185 | 186 |
| 186 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 187 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
| OLD | NEW |