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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/base/task_time_tracker.h

Issue 2258133002: [scheduler] Implement time-based cpu throttling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use double instead of base::TimeTicks Created 4 years, 3 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_BASE_TASK_QUEUE_MANAGER_DEL EGATE_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_TRACKER_H_
Sami 2016/09/12 17:49:09 TASK_TIME_TRACKER
altimin 2016/09/14 11:23:15 Deleted.
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_DEL EGATE_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_TRACKER_H_
7 7
8 #include "base/callback.h" 8 #include "base/time/time.h"
9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h"
11 #include "base/time/tick_clock.h"
12 #include "public/platform/WebCommon.h"
13 9
14 namespace blink { 10 namespace blink {
15 namespace scheduler { 11 namespace scheduler {
12 class TaskQueue;
16 13
17 class BLINK_PLATFORM_EXPORT TaskQueueManagerDelegate 14 // Internal alternative to public TaskTimeObserver, exposing more information.
18 : public base::SingleThreadTaskRunner, 15 class TaskTimeTracker {
alex clarke (OOO till 29th) 2016/09/12 17:45:26 Is this used?
altimin 2016/09/14 11:23:15 Deleted.
19 public base::TickClock {
20 public: 16 public:
21 TaskQueueManagerDelegate() {} 17 TaskTimeTracker() {}
18 virtual ~TaskTimeTracker() {}
22 19
23 // Returns true if the task runner is nested (i.e., running a run loop within 20 virtual void OnTaskRunTimeReported(
24 // a nested task). 21 TaskQueue* task_queue,
25 virtual bool IsNested() const = 0; 22 base::TimeTicks start_time,
23 base::TimeTicks end_time) = 0;
26 24
27 protected: 25 DISSALLOW_COPY_AND_ASSIGN(TaskTimeTracker);
Sami 2016/09/12 17:49:09 -S :) (It doesn't look like this file is being us
altimin 2016/09/14 11:23:15 Deleted.
28 ~TaskQueueManagerDelegate() override {}
29 26
30 DISALLOW_COPY_AND_ASSIGN(TaskQueueManagerDelegate);
31 }; 27 };
32 28
33 } // namespace scheduler 29 } // namespace scheduler
34 } // namespace blink 30 } // namespace blink
35 31
36 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_MANAGER_ DELEGATE_H_ 32 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698