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

Side by Side Diff: components/scheduler/child/task_queue.h

Issue 1314903007: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Responding to feedback Created 5 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 COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_ 5 #ifndef COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
6 #define COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_ 6 #define COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "components/scheduler/scheduler_export.h" 10 #include "components/scheduler/scheduler_export.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // by. 142 // by.
143 virtual bool IsQueueEmpty() const; 143 virtual bool IsQueueEmpty() const;
144 144
145 // Returns the QueueState. Note that this function involves taking a lock, so 145 // Returns the QueueState. Note that this function involves taking a lock, so
146 // calling it has some overhead. 146 // calling it has some overhead.
147 virtual QueueState GetQueueState() const = 0; 147 virtual QueueState GetQueueState() const = 0;
148 148
149 // Can be called on any thread. 149 // Can be called on any thread.
150 virtual const char* GetName() const = 0; 150 virtual const char* GetName() const = 0;
151 151
152 // Sets the origin associated with the task queue (if any).
153 // NOTE this must be called on the thread this TaskQueue was created by.
154 virtual void SetOrigin(const std::string& origin) = 0;
155
156 // Gets the origin associated with the task queue (default is "").
157 // NOTE this must be called on the thread this TaskQueue was created by.
158 virtual const std::string& GetOrigin() = 0;
159
152 // Set the priority of the queue to |priority|. NOTE this must be called on 160 // Set the priority of the queue to |priority|. NOTE this must be called on
153 // the thread this TaskQueue was created by. 161 // the thread this TaskQueue was created by.
154 virtual void SetQueuePriority(QueuePriority priority) = 0; 162 virtual void SetQueuePriority(QueuePriority priority) = 0;
155 163
156 // Set the pumping policy of the queue to |pump_policy|. NOTE this must be 164 // Set the pumping policy of the queue to |pump_policy|. NOTE this must be
157 // called on the thread this TaskQueue was created by. 165 // called on the thread this TaskQueue was created by.
158 virtual void SetPumpPolicy(PumpPolicy pump_policy) = 0; 166 virtual void SetPumpPolicy(PumpPolicy pump_policy) = 0;
159 167
160 // Reloads new tasks from the incoming queue into the work queue, regardless 168 // Reloads new tasks from the incoming queue into the work queue, regardless
161 // of whether the work queue is empty or not. After this, the function ensures 169 // of whether the work queue is empty or not. After this, the function ensures
(...skipping 13 matching lines...) Expand all
175 183
176 protected: 184 protected:
177 ~TaskQueue() override {} 185 ~TaskQueue() override {}
178 186
179 DISALLOW_COPY_AND_ASSIGN(TaskQueue); 187 DISALLOW_COPY_AND_ASSIGN(TaskQueue);
180 }; 188 };
181 189
182 } // namespace scheduler 190 } // namespace scheduler
183 191
184 #endif // COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_ 192 #endif // COMPONENTS_SCHEDULER_CHILD_TASK_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698