Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| index 099b0a06c1f0981569e5d0a164e0a3a1ef5da2fc..9dd3e1d93c7bb74c686754210d3bbf5f75672f40 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| @@ -34,11 +34,28 @@ WebInspector.Target = function(targetManager, name, capabilitiesMask, connection |
| */ |
| WebInspector.Target.Capability = { |
| Browser: 1, |
| - JS: 2, |
| - Network: 4, |
| - Worker: 8, |
| - DOM: 16 |
| -} |
| + DOM: 2, |
| + JS: 4, |
| + Log: 8, |
| + Network: 16, |
| + Worker: 32 |
| +}; |
| + |
| +WebInspector.Target.PAGE_CAPABILITIES = |
|
dgozman
2016/09/16 01:39:35
We don't use SHOUTY_CASE.
eostroukhov
2016/09/16 20:42:44
Removed the constants altogether.
|
| + WebInspector.Target.Capability.Browser | WebInspector.Target.Capability.DOM | |
| + WebInspector.Target.Capability.JS | WebInspector.Target.Capability.Log | |
| + WebInspector.Target.Capability.Network | WebInspector.Target.Capability.Worker; |
| + |
| +WebInspector.Target.SHARED_WORKER_CAPABILITIES = |
| + WebInspector.Target.Capability.Browser | WebInspector.Target.Capability.Log | |
| + WebInspector.Target.Capability.Network | WebInspector.Target.Capability.Worker; |
| + |
| +WebInspector.Target.SERVICE_WORKER_CAPABILITIES = |
|
dgozman
2016/09/16 01:39:35
I don't think these constants improve things. Havi
eostroukhov
2016/09/16 20:42:44
Done.
|
| + WebInspector.Target.Capability.Log | WebInspector.Target.Capability.Network | |
| + WebInspector.Target.Capability.Worker; |
| + |
| +WebInspector.Target.WORKER_CAPABILITIES = |
| + WebInspector.Target.Capability.JS | WebInspector.Target.Capability.Log; |
| WebInspector.Target._nextId = 1; |
| @@ -123,6 +140,14 @@ WebInspector.Target.prototype = { |
| /** |
| * @return {boolean} |
| */ |
| + hasLogCapability: function() |
| + { |
| + return this.hasAllCapabilities(WebInspector.Target.Capability.Log); |
| + }, |
| + |
| + /** |
| + * @return {boolean} |
| + */ |
| hasNetworkCapability: function() |
| { |
| return this.hasAllCapabilities(WebInspector.Target.Capability.Network); |