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 {} | |
103 | 102 |
104 // Returns the serialized scheduler state for tracing. | 103 // Returns the serialized scheduler state for tracing. |
105 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueLocked( | 104 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueLocked( |
106 base::TimeTicks optional_now) const; | 105 base::TimeTicks optional_now) const; |
107 static const char* TaskQueueIdToString(QueueId queue_id); | 106 static const char* TaskQueueIdToString(QueueId queue_id); |
108 static const char* PolicyToString(Policy policy); | 107 static const char* PolicyToString(Policy policy); |
109 static const char* InputStreamStateToString(InputStreamState state); | 108 static const char* InputStreamStateToString(InputStreamState state); |
110 | 109 |
111 static InputStreamState ComputeNewInputStreamState( | 110 static InputStreamState ComputeNewInputStreamState( |
112 InputStreamState current_state, | 111 InputStreamState current_state, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 PollableNeedsUpdateFlag policy_may_need_update_; | 177 PollableNeedsUpdateFlag policy_may_need_update_; |
179 | 178 |
180 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 179 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
181 | 180 |
182 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 181 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
183 }; | 182 }; |
184 | 183 |
185 } // namespace content | 184 } // namespace content |
186 | 185 |
187 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 186 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
OLD | NEW |