Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/child/idle_helper.h

Issue 2416803003: Record PendingTaskCount when a backgrounded renderer is suspended. (Closed)
Patch Set: Add unittest Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SOURCE_PLATFORM_SCHEDULER_CHILD_IDLE_HELPER_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_IDLE_HELPER_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_IDLE_HELPER_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_IDLE_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "platform/scheduler/base/cancelable_closure_holder.h" 10 #include "platform/scheduler/base/cancelable_closure_holder.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 base::TimeTicks WillProcessIdleTask() override; 136 base::TimeTicks WillProcessIdleTask() override;
137 void DidProcessIdleTask() override; 137 void DidProcessIdleTask() override;
138 138
139 // base::MessageLoop::TaskObserver implementation: 139 // base::MessageLoop::TaskObserver implementation:
140 void WillProcessTask(const base::PendingTask& pending_task) override; 140 void WillProcessTask(const base::PendingTask& pending_task) override;
141 void DidProcessTask(const base::PendingTask& pending_task) override; 141 void DidProcessTask(const base::PendingTask& pending_task) override;
142 142
143 IdlePeriodState SchedulerIdlePeriodState() const; 143 IdlePeriodState SchedulerIdlePeriodState() const;
144 static const char* IdlePeriodStateToString(IdlePeriodState state); 144 static const char* IdlePeriodStateToString(IdlePeriodState state);
145 145
146 int GetNumberOfPendingIdleTasks();
Sami 2016/10/14 01:38:18 size_t
tasak 2016/10/14 05:55:31 I agree. ...so I found that we don't need this me
147
146 private: 148 private:
147 friend class BaseIdleHelperTest; 149 friend class BaseIdleHelperTest;
148 friend class IdleHelperTest; 150 friend class IdleHelperTest;
149 151
150 class State { 152 class State {
151 public: 153 public:
152 State(SchedulerHelper* helper, 154 State(SchedulerHelper* helper,
153 Delegate* delegate, 155 Delegate* delegate,
154 const char* tracing_category, 156 const char* tracing_category,
155 const char* disabled_by_default_tracing_category, 157 const char* disabled_by_default_tracing_category,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 base::WeakPtr<IdleHelper> weak_idle_helper_ptr_; 234 base::WeakPtr<IdleHelper> weak_idle_helper_ptr_;
233 base::WeakPtrFactory<IdleHelper> weak_factory_; 235 base::WeakPtrFactory<IdleHelper> weak_factory_;
234 236
235 DISALLOW_COPY_AND_ASSIGN(IdleHelper); 237 DISALLOW_COPY_AND_ASSIGN(IdleHelper);
236 }; 238 };
237 239
238 } // namespace scheduler 240 } // namespace scheduler
239 } // namespace blink 241 } // namespace blink
240 242
241 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_IDLE_HELPER_H_ 243 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_IDLE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698