content: Add task queue manager
commit1161fca345efbace93bfda2a874f7dde3f3e5381
authorskyostil <skyostil@chromium.org>
Thu, 23 Oct 2014 11:47:09 +0000 (23 04:47 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 23 Oct 2014 11:47:29 +0000 (23 11:47 +0000)
tree653004cebcedb1c8da483533d514a8e741ef52ef
parentca09c95ee45362dfb4a50a9d22a6f8195d28bc41
content: Add task queue manager

This patch introduces a task queue manager class which provides two
main pieces of functionality:

1. An arbitrary number of incoming task queues.

2. A selector interface which allows an outside agent choose the next
   task queue to be serviced.

This allows the selector implementation to dynamically prioritize
between pending tasks in the different queues. Actual task running is
accomplished by posting a task to a separate task runner (usually the
main MessageLoop) so that the task queues can coexist with other work
being done on the same thread.

This class will be used by the Blink scheduler.

Design doc: https://docs.google.com/a/chromium.org/document/d/16f_RIhZa47uEK_OdtTgzWdRU0RFMTQWMpEWyWXIpXUo/edit#heading=h.srz53flt1rrp

BUG=391005

Review URL: https://codereview.chromium.org/637303003

Cr-Commit-Position: refs/heads/master@{#300870}
content/content_renderer.gypi
content/content_tests.gypi
content/renderer/scheduler/task_queue_manager.cc [new file with mode: 0644]
content/renderer/scheduler/task_queue_manager.h [new file with mode: 0644]
content/renderer/scheduler/task_queue_manager_unittest.cc [new file with mode: 0644]
content/renderer/scheduler/task_queue_selector.h [new file with mode: 0644]