Begin to enable extension APIs in Extension Service Worker.
This CL adds "tabs" API support in extension SW and adds an end-to-end
test for it.
This CL also puts the feature behind a runtime flag which is disabled for non trunk builds by default.
Some known issues:
1) Lifetime improvement of UIThreadWorkerResponseCallbackWrapper is missing.
I am currently cleaning up on RPH shutdown, but this is not idea, we should
be cleaning up on worker thread shutdown.
2) IPC send<->receive from/to Worker Thread can be made better, see
comment above WorkerThreadDispatcher in patch set #1.
3) Currently if an extension is not "active" in a process, then API calls
from that process is not classified correctly. I'm using
"extension_service_worker" context, which allows running tabs API. In
theory since a worker cannot be spawned from outside of the extension
process (TODO: Verify this), we can <fingers_crossed>safely</fingers_crossed>
classify this as a blessed context.
BUG=602442
Test=Register an extension with "tabs" permission, register a service
worker from the extension and call chrome.tabs.create() from SW code!
Expect it to work
Review-Url: https://codereview.chromium.org/1880933002
Cr-Commit-Position: refs/heads/master@{#395494}