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

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

Issue 2416803003: Record PendingTaskCount when a backgrounded renderer is suspended. (Closed)
Patch Set: Add GetNumberOfPendingTasks to TaskQueueManager 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_SCHEDULER_HELPER_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void SetObserver(Observer* observer); 91 void SetObserver(Observer* observer);
92 92
93 // Accessor methods. 93 // Accessor methods.
94 RealTimeDomain* real_time_domain() const; 94 RealTimeDomain* real_time_domain() const;
95 void RegisterTimeDomain(TimeDomain* time_domain); 95 void RegisterTimeDomain(TimeDomain* time_domain);
96 void UnregisterTimeDomain(TimeDomain* time_domain); 96 void UnregisterTimeDomain(TimeDomain* time_domain);
97 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const; 97 const scoped_refptr<SchedulerTqmDelegate>& scheduler_tqm_delegate() const;
98 bool GetAndClearSystemIsQuiescentBit(); 98 bool GetAndClearSystemIsQuiescentBit();
99 TaskQueue* CurrentlyExecutingTaskQueue() const; 99 TaskQueue* CurrentlyExecutingTaskQueue() const;
100 100
101 size_t GetNumberOfPendingTasks() const;
102
101 // Test helpers. 103 // Test helpers.
102 void SetWorkBatchSizeForTesting(size_t work_batch_size); 104 void SetWorkBatchSizeForTesting(size_t work_batch_size);
103 TaskQueueManager* GetTaskQueueManagerForTesting(); 105 TaskQueueManager* GetTaskQueueManagerForTesting();
104 106
105 private: 107 private:
106 friend class SchedulerHelperTest; 108 friend class SchedulerHelperTest;
107 109
108 base::ThreadChecker thread_checker_; 110 base::ThreadChecker thread_checker_;
109 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_; 111 scoped_refptr<SchedulerTqmDelegate> task_queue_manager_delegate_;
110 std::unique_ptr<TaskQueueManager> task_queue_manager_; 112 std::unique_ptr<TaskQueueManager> task_queue_manager_;
111 scoped_refptr<TaskQueue> control_task_runner_; 113 scoped_refptr<TaskQueue> control_task_runner_;
112 scoped_refptr<TaskQueue> default_task_runner_; 114 scoped_refptr<TaskQueue> default_task_runner_;
113 115
114 Observer* observer_; // NOT OWNED 116 Observer* observer_; // NOT OWNED
115 const char* tracing_category_; 117 const char* tracing_category_;
116 const char* disabled_by_default_tracing_category_; 118 const char* disabled_by_default_tracing_category_;
117 119
118 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper); 120 DISALLOW_COPY_AND_ASSIGN(SchedulerHelper);
119 }; 121 };
120 122
121 } // namespace scheduler 123 } // namespace scheduler
122 } // namespace blink 124 } // namespace blink
123 125
124 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H _ 126 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_SCHEDULER_HELPER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698