diff --git a/source/ChromeDevTools/ChromeProcess.cs b/source/ChromeDevTools/ChromeProcess.cs deleted file mode 100644 index 97181b30968a6fef3720d970bf6a217f33df84a3..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/ChromeProcess.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Net; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; - -namespace MasterDevs.ChromeDevTools -{ - public class ChromeProcess : IChromeProcess - { - public DirectoryInfo UserDirectory { get; set; } - - public Process Process { get; set; } - - public string RemoteDebuggingUri { get; set; } - - public void Dispose() - { - Process.Kill(); - try - { - UserDirectory.Delete(true); - } - catch - { - Thread.Sleep(500); // i'm being lazy because i'm tired - UserDirectory.Delete(true); - } - } - - public async Task<string[]> GetSessions() - { - var remoteSessionUrls = new List<string>(); - var webClient = new HttpClient(); - var uriBuilder = new UriBuilder(RemoteDebuggingUri); - uriBuilder.Path = "/json"; - var remoteSessions = await webClient.GetStringAsync(uriBuilder.Uri); - using (var stringReader = new StringReader(remoteSessions)) - using (var jsonReader = new JsonTextReader(stringReader)) - { - var sessionsObject = JToken.ReadFrom(jsonReader) as JArray; - foreach (var sessionObject in sessionsObject) - { - var sessionUrl = sessionObject["webSocketDebuggerUrl"].GetSafeString(); - if (!String.IsNullOrEmpty(sessionUrl)) - { - remoteSessionUrls.Add(sessionUrl); - } - } - } - return remoteSessionUrls.ToArray(); - } - } -} \ No newline at end of file diff --git a/source/ChromeDevTools/ChromeProcessFactory.cs b/source/ChromeDevTools/ChromeProcessFactory.cs index ba30cdccb5c20eeb723c66ad0271dcd439f1a535..85017bf103915e7f72bad087d2742f0efde9c079 100644 --- a/source/ChromeDevTools/ChromeProcessFactory.cs +++ b/source/ChromeDevTools/ChromeProcessFactory.cs @@ -1,25 +1,42 @@ -using System.Diagnostics; +using System; +using System.Collections.Generic; +using System.Diagnostics; using System.IO; namespace MasterDevs.ChromeDevTools { public class ChromeProcessFactory : IChromeProcessFactory { - public IChromeProcess Create(int port) + public IDirectoryCleaner DirectoryCleaner { get; set; } + public string ChromePath { get; } + + public ChromeProcessFactory(IDirectoryCleaner directoryCleaner, string chromePath = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe") + { + DirectoryCleaner = directoryCleaner; + ChromePath = chromePath; + } + + public IChromeProcess Create(int port, bool headless) { string path = Path.GetRandomFileName(); var directoryInfo = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), path)); - var remoteDebuggingArg = "--remote-debugging-port=" + port; - var userDirectoryArg = "--user-data-dir=\"" + directoryInfo.FullName + "\""; - var chromeProcessArgs = remoteDebuggingArg + " " + userDirectoryArg + " --bwsi --no-first-run"; - var processStartInfo = new ProcessStartInfo(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", chromeProcessArgs); - var chromeProcess = Process.Start(processStartInfo); - return new ChromeProcess + var remoteDebuggingArg = $"--remote-debugging-port={port}"; + var userDirectoryArg = $"--user-data-dir=\"{directoryInfo.FullName}\""; + const string headlessArg = "--headless --disable-gpu"; + var chromeProcessArgs = new List<string> { - Process = chromeProcess, - UserDirectory = directoryInfo, - RemoteDebuggingUri = "http://localhost:" + port + remoteDebuggingArg, + userDirectoryArg, + "--bwsi", + "--no-first-run" }; + if (headless) + chromeProcessArgs.Add(headlessArg); + var processStartInfo = new ProcessStartInfo(ChromePath, string.Join(" ", chromeProcessArgs)); + var chromeProcess = Process.Start(processStartInfo); + + string remoteDebuggingUrl = "http://localhost:" + port; + return new LocalChromeProcess(new Uri(remoteDebuggingUrl), () => DirectoryCleaner.Delete(directoryInfo), chromeProcess); } } } \ No newline at end of file diff --git a/source/ChromeDevTools/ChromeSession.cs b/source/ChromeDevTools/ChromeSession.cs index 7c0d7cefc3b8e876708bdb79a6227fbeb61970c0..c8d6971f19304fe7ddfc4218d8057a3728ca1860 100644 --- a/source/ChromeDevTools/ChromeSession.cs +++ b/source/ChromeDevTools/ChromeSession.cs @@ -81,10 +81,23 @@ namespace MasterDevs.ChromeDevTools return SendCommand(command, cancellationToken); } - public Task<ICommandResponse> SendAsync<T>(T parameter, CancellationToken cancellationToken) + public Task<CommandResponse<T>> SendAsync<T>(ICommand<T> parameter, CancellationToken cancellationToken) { var command = _commandFactory.Create(parameter); - return SendCommand(command, cancellationToken); + var task = SendCommand(command, cancellationToken); + return CastTaskResult<ICommandResponse, CommandResponse<T>>(task); + } + + private Task<TDerived> CastTaskResult<TBase, TDerived>(Task<TBase> task) where TDerived: TBase + { + var tcs = new TaskCompletionSource<TDerived>(); + task.ContinueWith(t => tcs.SetResult((TDerived)t.Result), + TaskContinuationOptions.OnlyOnRanToCompletion); + task.ContinueWith(t => tcs.SetException(t.Exception.InnerExceptions), + TaskContinuationOptions.OnlyOnFaulted); + task.ContinueWith(t => tcs.SetCanceled(), + TaskContinuationOptions.OnlyOnCanceled); + return tcs.Task; } public void Subscribe<T>(Action<T> handler) where T : class diff --git a/source/ChromeDevTools/ChromeSessionExtensions.cs b/source/ChromeDevTools/ChromeSessionExtensions.cs index b0817f80c44879ea185aa619e559729877620097..667890c086956f17f350d80bcafdb9226300d2fc 100644 --- a/source/ChromeDevTools/ChromeSessionExtensions.cs +++ b/source/ChromeDevTools/ChromeSessionExtensions.cs @@ -5,9 +5,9 @@ namespace MasterDevs.ChromeDevTools { public static class ChromeSessionExtensions { - public static Task<ICommandResponse> SendAsync<T>(this IChromeSession session, T parameter) + public static Task<CommandResponse<T>> SendAsync<T>(this IChromeSession session, ICommand<T> parameter) { - return session.SendAsync<T>(parameter, CancellationToken.None); + return session.SendAsync(parameter, CancellationToken.None); } public static Task<ICommandResponse> SendAsync<T>(this IChromeSession session) diff --git a/source/ChromeDevTools/ChromeSessionFactory.cs b/source/ChromeDevTools/ChromeSessionFactory.cs index 4aa60b63748a8e2227a1cc3993b6910594abc25b..36facc276af65494456c252e8bbcf2c84b29a720 100644 --- a/source/ChromeDevTools/ChromeSessionFactory.cs +++ b/source/ChromeDevTools/ChromeSessionFactory.cs @@ -3,6 +3,11 @@ namespace MasterDevs.ChromeDevTools { public class ChromeSessionFactory : IChromeSessionFactory { + public IChromeSession Create(ChromeSessionInfo sessionInfo) + { + return Create(sessionInfo.WebSocketDebuggerUrl); + } + public IChromeSession Create(string endpointUrl) { // Sometimes binding to localhost might resolve wrong AddressFamily, force IPv4 diff --git a/source/ChromeDevTools/ChromeSessionInfo.cs b/source/ChromeDevTools/ChromeSessionInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..c08553f5dbe25e07f3ae7af38a780985076691f8 --- /dev/null +++ b/source/ChromeDevTools/ChromeSessionInfo.cs @@ -0,0 +1,14 @@ +namespace MasterDevs.ChromeDevTools +{ + public class ChromeSessionInfo + { + public string Description { get; set; } + + public string DevtoolsFrontendUrl { get; set; } + public string Id { get; set; } + public string Title { get; set; } + public string Type { get; set; } + public string Url { get; set; } + public string WebSocketDebuggerUrl { get; set; } + } +} \ No newline at end of file diff --git a/source/ChromeDevTools/IChromeProcess.cs b/source/ChromeDevTools/IChromeProcess.cs index a6ee6e57458bba29956fb16cb097520cfcafa5b9..b6d6242307b24f6e8d680c4619850f4773311345 100644 --- a/source/ChromeDevTools/IChromeProcess.cs +++ b/source/ChromeDevTools/IChromeProcess.cs @@ -1,18 +1,14 @@ using System; -using System.Diagnostics; -using System.IO; using System.Threading.Tasks; namespace MasterDevs.ChromeDevTools { public interface IChromeProcess : IDisposable { - Task<string[]> GetSessions(); + Task<ChromeSessionInfo[]> GetSessionInfo(); - DirectoryInfo UserDirectory { get; } + Task<ChromeSessionInfo> StartNewSession(); - Process Process { get; } - - string RemoteDebuggingUri { get; } + Uri RemoteDebuggingUri { get; } } } \ No newline at end of file diff --git a/source/ChromeDevTools/IChromeProcessFactory.cs b/source/ChromeDevTools/IChromeProcessFactory.cs index ddf57955e97a993ed0f5341c94e362af2c9d86ee..fcac1ce28ce0cec469a2e073f8a1b4857aa9a4f7 100644 --- a/source/ChromeDevTools/IChromeProcessFactory.cs +++ b/source/ChromeDevTools/IChromeProcessFactory.cs @@ -2,6 +2,6 @@ { public interface IChromeProcessFactory { - IChromeProcess Create(int port); + IChromeProcess Create(int port, bool headless); } } \ No newline at end of file diff --git a/source/ChromeDevTools/IChromeSession.cs b/source/ChromeDevTools/IChromeSession.cs index e5ae25f6e9b0497ef15f1aa17652f5146ae3162b..ef5d88e89b3880a67ee76b7a5b13da8e78be0396 100644 --- a/source/ChromeDevTools/IChromeSession.cs +++ b/source/ChromeDevTools/IChromeSession.cs @@ -4,9 +4,13 @@ using System.Threading.Tasks; namespace MasterDevs.ChromeDevTools { + public interface ICommand<T> + { + + } public interface IChromeSession { - Task<ICommandResponse> SendAsync<T>(T parameter, CancellationToken cancellationToken); + Task<CommandResponse<TResponse>> SendAsync<TResponse>(ICommand<TResponse> parameter, CancellationToken cancellationToken); Task<ICommandResponse> SendAsync<T>(CancellationToken cancellationToken); diff --git a/source/ChromeDevTools/IDirectoryCleaner.cs b/source/ChromeDevTools/IDirectoryCleaner.cs new file mode 100644 index 0000000000000000000000000000000000000000..d27977c86040fd8f43155e9887cd267fc330c956 --- /dev/null +++ b/source/ChromeDevTools/IDirectoryCleaner.cs @@ -0,0 +1,9 @@ +using System.IO; + +namespace MasterDevs.ChromeDevTools +{ + public interface IDirectoryCleaner + { + void Delete(DirectoryInfo dir); + } +} \ No newline at end of file diff --git a/source/ChromeDevTools/LocalChromeProcess.cs b/source/ChromeDevTools/LocalChromeProcess.cs new file mode 100644 index 0000000000000000000000000000000000000000..10ae6357da58bfd107fb6cc42d107014fe058106 --- /dev/null +++ b/source/ChromeDevTools/LocalChromeProcess.cs @@ -0,0 +1,28 @@ +using System; +using System.Diagnostics; + +namespace MasterDevs.ChromeDevTools +{ + public class LocalChromeProcess : RemoteChromeProcess + { + public LocalChromeProcess(Uri remoteDebuggingUri, Action disposeUserDirectory, Process process) + : base(remoteDebuggingUri) + { + DisposeUserDirectory = disposeUserDirectory; + Process = process; + } + + public Action DisposeUserDirectory { get; set; } + public Process Process { get; set; } + + public override void Dispose() + { + base.Dispose(); + + Process.Kill(); + Process.WaitForExit(); +// Process.Close(); + DisposeUserDirectory(); + } + } +} \ No newline at end of file diff --git a/source/ChromeDevTools/MasterDevs.ChromeDevTools.csproj b/source/ChromeDevTools/MasterDevs.ChromeDevTools.csproj index 7d03ee8b2a942b03db17ac477a3bbc5ea05adb46..edd8226b61c0174acfe5d62aec314100a16b43b6 100644 --- a/source/ChromeDevTools/MasterDevs.ChromeDevTools.csproj +++ b/source/ChromeDevTools/MasterDevs.ChromeDevTools.csproj @@ -60,10 +60,12 @@ </ItemGroup> <ItemGroup> <Compile Include="ChromeProcessFactory.cs" /> - <Compile Include="ChromeProcess.cs" /> + <Compile Include="IDirectoryCleaner.cs" /> + <Compile Include="LocalChromeProcess.cs" /> <Compile Include="ChromeSession.cs" /> <Compile Include="ChromeSessionExtensions.cs" /> <Compile Include="ChromeSessionFactory.cs" /> + <Compile Include="ChromeSessionInfo.cs" /> <Compile Include="Command.cs" /> <Compile Include="CommandAttribute.cs" /> <Compile Include="Extensions\JTokenExtensions.cs" /> @@ -90,7 +92,9 @@ <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="ProtocolNameAttribute.cs" /> <Compile Include="Protocol\**\*.cs" /> + <Compile Include="RemoteChromeProcess.cs" /> <Compile Include="Serialization\MessageContractResolver.cs" /> + <Compile Include="StubbornDirectoryCleaner.cs" /> <Compile Include="SupportedByAttribute.cs" /> </ItemGroup> <ItemGroup> diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXGlobalStates.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXGlobalStates.cs index 97e25e2a9e9f7e6ac5d0dec0d25fd67a5d0049bf..bd022a4662d9fe176d18b13044fee9136592346d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXGlobalStates.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXGlobalStates.cs @@ -15,5 +15,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility{ Hidden, HiddenRoot, Invalid, + Keyshortcuts, + Roledescription, } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXNode.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXNode.cs index e9e8770b3409489b0ae11bc37f79cb9b4ece6bd2..12b11478f6541303dbc6ffcd2b9227f22637641a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXNode.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXNode.cs @@ -15,8 +15,18 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility /// </summary> public string NodeId { get; set; } /// <summary> + /// Gets or sets Whether this node is ignored for accessibility + /// </summary> + public bool Ignored { get; set; } + /// <summary> + /// Gets or sets Collection of reasons why this node is hidden. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public AXProperty[] IgnoredReasons { get; set; } + /// <summary> /// Gets or sets This <code>Node</code>'s role, whether explicit or implicit. /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public AXValue Role { get; set; } /// <summary> /// Gets or sets The accessible name for this <code>Node</code>. @@ -34,13 +44,19 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public AXValue Value { get; set; } /// <summary> - /// Gets or sets Help. + /// Gets or sets All other properties + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public AXProperty[] Properties { get; set; } + /// <summary> + /// Gets or sets IDs for each of this node's child nodes. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public AXValue Help { get; set; } + public string[] ChildIds { get; set; } /// <summary> - /// Gets or sets All other properties + /// Gets or sets The backend ID for the associated DOM node, if any. /// </summary> - public AXProperty[] Properties { get; set; } + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? BackendDOMNodeId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXPropertySource.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXPropertySource.cs deleted file mode 100644 index c6aee5ff8417490c743e9993ab708f515e62ca4e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXPropertySource.cs +++ /dev/null @@ -1,40 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility -{ - /// <summary> - /// A single source for a computed AX property. - /// </summary> - [SupportedBy("Chrome")] - public class AXPropertySource - { - /// <summary> - /// Gets or sets The name/label of this source. - /// </summary> - public string Name { get; set; } - /// <summary> - /// Gets or sets What type of source this is. - /// </summary> - public AXPropertySourceType SourceType { get; set; } - /// <summary> - /// Gets or sets The value of this property source. - /// </summary> - public object Value { get; set; } - /// <summary> - /// Gets or sets What type the value should be interpreted as. - /// </summary> - public AXValueType Type { get; set; } - /// <summary> - /// Gets or sets Whether the value for this property is invalid. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? Invalid { get; set; } - /// <summary> - /// Gets or sets Reason for the value being invalid, if it is. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string InvalidReason { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelatedNode.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelatedNode.cs index a71fea1a62c32725d8d97ce1a5ac326f255705ce..986ccbd0210b12294ff9585b41837c7b213a31c7 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelatedNode.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelatedNode.cs @@ -10,14 +10,19 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility [SupportedBy("Chrome")] public class AXRelatedNode { + /// <summary> + /// Gets or sets The BackendNodeId of the related DOM node. + /// </summary> + public long BackendDOMNodeId { get; set; } /// <summary> /// Gets or sets The IDRef value provided, if any. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Idref { get; set; } /// <summary> - /// Gets or sets The BackendNodeId of the related node. + /// Gets or sets The text alternative of this node in the current context. /// </summary> - public long BackendNodeId { get; set; } + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Text { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelationshipAttributes.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelationshipAttributes.cs index b9a77e6a5221f9f676b072a2d611b32743a691cd..d9623f2af6bedb8d75c8c11e499252254212b580 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelationshipAttributes.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXRelationshipAttributes.cs @@ -12,9 +12,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility{ public enum AXRelationshipAttributes { Activedescendant, - Flowto, Controls, Describedby, + Details, + Errormessage, + Flowto, Labelledby, Owns, } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValue.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValue.cs index faa253ea4ff5d8572cb8d3638141620610daf2db..d6a7050fc212d1919648a54b5e434fb7c445b875 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValue.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValue.cs @@ -20,19 +20,14 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public object Value { get; set; } /// <summary> - /// Gets or sets The related node value, if any. + /// Gets or sets One or more related nodes, if applicable. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public AXRelatedNode RelatedNodeValue { get; set; } - /// <summary> - /// Gets or sets Multiple relted nodes, if applicable. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public AXRelatedNode[] RelatedNodeArrayValue { get; set; } + public AXRelatedNode[] RelatedNodes { get; set; } /// <summary> /// Gets or sets The sources which contributed to the computation of this property. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public AXPropertySource[] Sources { get; set; } + public AXValueSource[] Sources { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueNativeSourceType.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueNativeSourceType.cs new file mode 100644 index 0000000000000000000000000000000000000000..91e68f5150614bae55db7cb6dacfa06fe951e856 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueNativeSourceType.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility{ + /// <summary> + /// Enum of possible native property sources (as a subtype of a particular AXValueSourceType). + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum AXValueNativeSourceType + { + Figcaption, + Label, + Labelfor, + Labelwrapped, + Legend, + Tablecaption, + Title, + Other, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueSource.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueSource.cs new file mode 100644 index 0000000000000000000000000000000000000000..7a87fc5c7acc6daa3510d76249256e2b0f880d9b --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueSource.cs @@ -0,0 +1,58 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility +{ + /// <summary> + /// A single source for a computed AX property. + /// </summary> + [SupportedBy("Chrome")] + public class AXValueSource + { + /// <summary> + /// Gets or sets What type of source this is. + /// </summary> + public AXValueSourceType Type { get; set; } + /// <summary> + /// Gets or sets The value of this property source. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public AXValue Value { get; set; } + /// <summary> + /// Gets or sets The name of the relevant attribute, if any. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Attribute { get; set; } + /// <summary> + /// Gets or sets The value of the relevant attribute, if any. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public AXValue AttributeValue { get; set; } + /// <summary> + /// Gets or sets Whether this source is superseded by a higher priority source. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Superseded { get; set; } + /// <summary> + /// Gets or sets The native markup source for this value, e.g. a <label> element. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public AXValueNativeSourceType NativeSource { get; set; } + /// <summary> + /// Gets or sets The value, such as a node or node list, of the native source. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public AXValue NativeSourceValue { get; set; } + /// <summary> + /// Gets or sets Whether the value for this property is invalid. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Invalid { get; set; } + /// <summary> + /// Gets or sets Reason for the value being invalid, if it is. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string InvalidReason { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXPropertySourceType.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueSourceType.cs similarity index 81% rename from source/ChromeDevTools/Protocol/Chrome/Accessibility/AXPropertySourceType.cs rename to source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueSourceType.cs index 86e7d840e3ab17e8100c32319fc34b6a52163cb6..84afdece65d1402a969a7875bbdc09e9b81d05c9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXPropertySourceType.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueSourceType.cs @@ -9,10 +9,13 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility{ /// Enum of possible property sources. /// </summary> [JsonConverter(typeof(StringEnumConverter))] - public enum AXPropertySourceType + public enum AXValueSourceType { Attribute, Implicit, Style, + Contents, + Placeholder, + RelatedElement, } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueType.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueType.cs index e3e2bca045bdfff3c64d72a49842de2bb42602e3..672f5af8d225523a56ce786fd84f613a377b1565 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueType.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXValueType.cs @@ -17,12 +17,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility{ Idref, IdrefList, Integer, + Node, + NodeList, Number, String, + ComputedString, Token, TokenList, DomRelation, Role, InternalRole, + ValueUndefined, } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXWidgetStates.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXWidgetStates.cs index 210cf0dcdb1a5ed1eede2a9b79d4fc3947290f27..9d83c7ac7ed922e49335da0919e075d31b924e10 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXWidgetStates.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/AXWidgetStates.cs @@ -13,6 +13,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility{ { Checked, Expanded, + Modal, Pressed, Selected, } diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetAXNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetAXNodeCommand.cs deleted file mode 100644 index 80e70cfb43d80785bc1fa2610255894a68b16b75..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetAXNodeCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility -{ - /// <summary> - /// Fetches the accessibility node for this DOM node, if it exists. - /// </summary> - [Command(ProtocolName.Accessibility.GetAXNode)] - [SupportedBy("Chrome")] - public class GetAXNodeCommand - { - /// <summary> - /// Gets or sets ID of node to get accessibility node for. - /// </summary> - public long NodeId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetAXNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetAXNodeCommandResponse.cs deleted file mode 100644 index e83341d753993d9cabf28c86cea0e88ea525c8d6..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetAXNodeCommandResponse.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility -{ - /// <summary> - /// Fetches the accessibility node for this DOM node, if it exists. - /// </summary> - [CommandResponse(ProtocolName.Accessibility.GetAXNode)] - [SupportedBy("Chrome")] - public class GetAXNodeCommandResponse - { - /// <summary> - /// Gets or sets The <code>Accessibility.AXNode</code> for this DOM node, if it exists. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public AXNode AccessibilityNode { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetPartialAXTreeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetPartialAXTreeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e979669b0e197558b5447ee045b209965c334b8 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetPartialAXTreeCommand.cs @@ -0,0 +1,24 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility +{ + /// <summary> + /// Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. + /// </summary> + [Command(ProtocolName.Accessibility.GetPartialAXTree)] + [SupportedBy("Chrome")] + public class GetPartialAXTreeCommand: ICommand<GetPartialAXTreeCommandResponse> + { + /// <summary> + /// Gets or sets ID of node to get the partial accessibility tree for. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets Whether to fetch this nodes ancestors, siblings and children. Defaults to true. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? FetchRelatives { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetPartialAXTreeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetPartialAXTreeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8c3c2ddac957a5a7e8b1200ab952b26225fb47d0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Accessibility/GetPartialAXTreeCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility +{ + /// <summary> + /// Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. + /// </summary> + [CommandResponse(ProtocolName.Accessibility.GetPartialAXTree)] + [SupportedBy("Chrome")] + public class GetPartialAXTreeCommandResponse + { + /// <summary> + /// Gets or sets The <code>Accessibility.AXNode</code> for this DOM node, if it exists, plus its ancestors, siblings and children, if requested. + /// </summary> + public AXNode[] Nodes { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/Animation.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/Animation.cs new file mode 100644 index 0000000000000000000000000000000000000000..55c6090688db072f2fc2b0b1d05bcdbfada24127 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/Animation.cs @@ -0,0 +1,55 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Animation instance. + /// </summary> + [SupportedBy("Chrome")] + public class Animation + { + /// <summary> + /// Gets or sets <code>Animation</code>'s id. + /// </summary> + public string Id { get; set; } + /// <summary> + /// Gets or sets <code>Animation</code>'s name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets <code>Animation</code>'s internal paused state. + /// </summary> + public bool PausedState { get; set; } + /// <summary> + /// Gets or sets <code>Animation</code>'s play state. + /// </summary> + public string PlayState { get; set; } + /// <summary> + /// Gets or sets <code>Animation</code>'s playback rate. + /// </summary> + public double PlaybackRate { get; set; } + /// <summary> + /// Gets or sets <code>Animation</code>'s start time. + /// </summary> + public double StartTime { get; set; } + /// <summary> + /// Gets or sets <code>Animation</code>'s current time. + /// </summary> + public double CurrentTime { get; set; } + /// <summary> + /// Gets or sets <code>Animation</code>'s source animation node. + /// </summary> + public AnimationEffect Source { get; set; } + /// <summary> + /// Gets or sets Animation type of <code>Animation</code>. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets A unique ID for <code>Animation</code> representing the sources that triggered this CSS animation/transition. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string CssId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationCanceledEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationCanceledEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..b87737b1b99b069381482b83f702050aae9a242a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationCanceledEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Event for when an animation has been cancelled. + /// </summary> + [Event(ProtocolName.Animation.AnimationCanceled)] + [SupportedBy("Chrome")] + public class AnimationCanceledEvent + { + /// <summary> + /// Gets or sets Id of the animation that was cancelled. + /// </summary> + public string Id { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..dda0e6170edbfa36d87355c229b172a08174be10 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationCreatedEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Event for each animation that has been created. + /// </summary> + [Event(ProtocolName.Animation.AnimationCreated)] + [SupportedBy("Chrome")] + public class AnimationCreatedEvent + { + /// <summary> + /// Gets or sets Id of the animation that was created. + /// </summary> + public string Id { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationNode.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationEffect.cs similarity index 52% rename from source/ChromeDevTools/Protocol/Chrome/Animation/AnimationNode.cs rename to source/ChromeDevTools/Protocol/Chrome/Animation/AnimationEffect.cs index d14a3932bc60d747b2c4cce0bf874d31529682e7..1df786e36ac0ae3ff30d040302a92f92fa5c63a2 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationNode.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationEffect.cs @@ -5,58 +5,50 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation { /// <summary> - /// AnimationNode instance + /// AnimationEffect instance /// </summary> [SupportedBy("Chrome")] - public class AnimationNode + public class AnimationEffect { /// <summary> - /// Gets or sets <code>AnimationNode</code>'s delay. + /// Gets or sets <code>AnimationEffect</code>'s delay. /// </summary> public double Delay { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s end delay. + /// Gets or sets <code>AnimationEffect</code>'s end delay. /// </summary> public double EndDelay { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s playbackRate. - /// </summary> - public double PlaybackRate { get; set; } - /// <summary> - /// Gets or sets <code>AnimationNode</code>'s iteration start. + /// Gets or sets <code>AnimationEffect</code>'s iteration start. /// </summary> public double IterationStart { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s iterations. + /// Gets or sets <code>AnimationEffect</code>'s iterations. /// </summary> public double Iterations { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s iteration duration. + /// Gets or sets <code>AnimationEffect</code>'s iteration duration. /// </summary> public double Duration { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s playback direction. + /// Gets or sets <code>AnimationEffect</code>'s playback direction. /// </summary> public string Direction { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s fill mode. + /// Gets or sets <code>AnimationEffect</code>'s fill mode. /// </summary> public string Fill { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s name. - /// </summary> - public string Name { get; set; } - /// <summary> - /// Gets or sets <code>AnimationNode</code>'s target node. + /// Gets or sets <code>AnimationEffect</code>'s target node. /// </summary> public long BackendNodeId { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s keyframes. + /// Gets or sets <code>AnimationEffect</code>'s keyframes. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public KeyframesRule KeyframesRule { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s timing function. + /// Gets or sets <code>AnimationEffect</code>'s timing function. /// </summary> public string Easing { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayer.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayer.cs deleted file mode 100644 index 0530e4021576233e040262fe8e069fbf360e9363..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayer.cs +++ /dev/null @@ -1,46 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation -{ - /// <summary> - /// AnimationPlayer instance. - /// </summary> - [SupportedBy("Chrome")] - public class AnimationPlayer - { - /// <summary> - /// Gets or sets <code>AnimationPlayer</code>'s id. - /// </summary> - public string Id { get; set; } - /// <summary> - /// Gets or sets <code>AnimationPlayer</code>'s internal paused state. - /// </summary> - public bool PausedState { get; set; } - /// <summary> - /// Gets or sets <code>AnimationPlayer</code>'s play state. - /// </summary> - public string PlayState { get; set; } - /// <summary> - /// Gets or sets <code>AnimationPlayer</code>'s playback rate. - /// </summary> - public double PlaybackRate { get; set; } - /// <summary> - /// Gets or sets <code>AnimationPlayer</code>'s start time. - /// </summary> - public double StartTime { get; set; } - /// <summary> - /// Gets or sets <code>AnimationPlayer</code>'s current time. - /// </summary> - public double CurrentTime { get; set; } - /// <summary> - /// Gets or sets <code>AnimationPlayer</code>'s source animation node. - /// </summary> - public AnimationNode Source { get; set; } - /// <summary> - /// Gets or sets Animation type of <code>AnimationPlayer</code>. - /// </summary> - public string Type { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayerCanceledEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayerCanceledEvent.cs deleted file mode 100644 index 9371e7885960ffddb74fcc1d7a0fff80f3c3d919..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayerCanceledEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation -{ - /// <summary> - /// Event for AnimationPlayers in the frontend that have been cancelled. - /// </summary> - [Event(ProtocolName.Animation.AnimationPlayerCanceled)] - [SupportedBy("Chrome")] - public class AnimationPlayerCanceledEvent - { - /// <summary> - /// Gets or sets Id of the AnimationPlayer that was cancelled. - /// </summary> - public string PlayerId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayerCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayerCreatedEvent.cs deleted file mode 100644 index 4b29a0bc071ec19b5e722a6242b17b97b89462af..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationPlayerCreatedEvent.cs +++ /dev/null @@ -1,21 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation -{ - /// <summary> - /// Event for each animation player that has been created. - /// </summary> - [Event(ProtocolName.Animation.AnimationPlayerCreated)] - [SupportedBy("Chrome")] - public class AnimationPlayerCreatedEvent - { - /// <summary> - /// Gets or sets AnimationPlayer that was created. - /// </summary> - public AnimationPlayer Player { get; set; } - /// <summary> - /// Gets or sets Whether the timeline should be reset. - /// </summary> - public bool ResetTimeline { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationStartedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationStartedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..293a9bf3fe74ac27c8050ff7cb06bc2b76b4daa2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/AnimationStartedEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Event for animation that has been started. + /// </summary> + [Event(ProtocolName.Animation.AnimationStarted)] + [SupportedBy("Chrome")] + public class AnimationStartedEvent + { + /// <summary> + /// Gets or sets Animation that was started. + /// </summary> + public Animation Animation { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SetCurrentTimeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/DisableCommand.cs similarity index 58% rename from source/ChromeDevTools/Protocol/Chrome/Animation/SetCurrentTimeCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Animation/DisableCommand.cs index 21cd6f3efc303bbf143f0b8728cf38f0bc24cbee..1a6fbdb12f25e53cebff073c37db2a6465a58c7e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/SetCurrentTimeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/DisableCommand.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation { /// <summary> - /// Sets the current time of the document timeline. + /// Disables animation domain notifications. /// </summary> - [CommandResponse(ProtocolName.Animation.SetCurrentTime)] + [Command(ProtocolName.Animation.Disable)] [SupportedBy("Chrome")] - public class SetCurrentTimeCommandResponse + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/DisableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/DisableCommandResponse.cs similarity index 54% rename from source/ChromeDevTools/Protocol/Chrome/Canvas/DisableCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Animation/DisableCommandResponse.cs index c9a9bde1066846d5bcbfd9f8103ac0cd4ea1957a..d219dae7cade8b7813d1be90f0d10bf54ef874b5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/DisableCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/DisableCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation { /// <summary> - /// Disables Canvas inspection. + /// Disables animation domain notifications. /// </summary> - [CommandResponse(ProtocolName.Canvas.Disable)] + [CommandResponse(ProtocolName.Animation.Disable)] [SupportedBy("Chrome")] public class DisableCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/EnableCommand.cs index 8c28819d3d75541e1e8694f712020ae18e416854..a1b2b4eb4571b77999fac872eda02a75fa023bce 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation /// </summary> [Command(ProtocolName.Animation.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/GetAnimationPlayersForNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/GetAnimationPlayersForNodeCommand.cs deleted file mode 100644 index b119b43d3b8b4ff80b87a89bbd4a6fc62019d33c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/GetAnimationPlayersForNodeCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation -{ - /// <summary> - /// Returns animation players relevant to the node. - /// </summary> - [Command(ProtocolName.Animation.GetAnimationPlayersForNode)] - [SupportedBy("Chrome")] - public class GetAnimationPlayersForNodeCommand - { - /// <summary> - /// Gets or sets Id of the node to get animation players for. - /// </summary> - public long NodeId { get; set; } - /// <summary> - /// Gets or sets Include animations from elements subtree. - /// </summary> - public bool IncludeSubtreeAnimations { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/GetAnimationPlayersForNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/GetAnimationPlayersForNodeCommandResponse.cs deleted file mode 100644 index a963d5c42133fa8e483fc24b96a2ccaea378a0f0..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/GetAnimationPlayersForNodeCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation -{ - /// <summary> - /// Returns animation players relevant to the node. - /// </summary> - [CommandResponse(ProtocolName.Animation.GetAnimationPlayersForNode)] - [SupportedBy("Chrome")] - public class GetAnimationPlayersForNodeCommandResponse - { - /// <summary> - /// Gets or sets Array of animation players. - /// </summary> - public AnimationPlayer[] AnimationPlayers { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/GetCurrentTimeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/GetCurrentTimeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..06c868f77f5b0df01e74a0e9efb19cfd924d63b5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/GetCurrentTimeCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Returns the current time of the an animation. + /// </summary> + [Command(ProtocolName.Animation.GetCurrentTime)] + [SupportedBy("Chrome")] + public class GetCurrentTimeCommand: ICommand<GetCurrentTimeCommandResponse> + { + /// <summary> + /// Gets or sets Id of animation. + /// </summary> + public string Id { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SetCurrentTimeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/GetCurrentTimeCommandResponse.cs similarity index 59% rename from source/ChromeDevTools/Protocol/Chrome/Animation/SetCurrentTimeCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Animation/GetCurrentTimeCommandResponse.cs index a33f7bb07a772d58a51ededd13a84c3e158fae3a..9b895539323bcd3fe01b1c77be2e2cac7ace9722 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/SetCurrentTimeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/GetCurrentTimeCommandResponse.cs @@ -5,14 +5,14 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation { /// <summary> - /// Sets the current time of the document timeline. + /// Returns the current time of the an animation. /// </summary> - [Command(ProtocolName.Animation.SetCurrentTime)] + [CommandResponse(ProtocolName.Animation.GetCurrentTime)] [SupportedBy("Chrome")] - public class SetCurrentTimeCommand + public class GetCurrentTimeCommandResponse { /// <summary> - /// Gets or sets Current time for the page animation timeline + /// Gets or sets Current time of the page. /// </summary> public double CurrentTime { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/GetPlaybackRateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/GetPlaybackRateCommand.cs index c3769a50d8c2743ee1adbf488aa7135bf7128dd1..39db814cb34f1d83b96310837e5daa4a44d6aae0 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/GetPlaybackRateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/GetPlaybackRateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation /// </summary> [Command(ProtocolName.Animation.GetPlaybackRate)] [SupportedBy("Chrome")] - public class GetPlaybackRateCommand + public class GetPlaybackRateCommand: ICommand<GetPlaybackRateCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/KeyframeStyle.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/KeyframeStyle.cs index 447d89b748ad715d10697df503c9abf4bf4d8c5e..1aa6abf6c6974104a188abbda4bc445d0cb1354e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/KeyframeStyle.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/KeyframeStyle.cs @@ -15,7 +15,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation /// </summary> public string Offset { get; set; } /// <summary> - /// Gets or sets <code>AnimationNode</code>'s timing function. + /// Gets or sets <code>AnimationEffect</code>'s timing function. /// </summary> public string Easing { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/ReleaseAnimationsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/ReleaseAnimationsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e0bd6d21adf94346db084647f61117ef3fd9643 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/ReleaseAnimationsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Releases a set of animations to no longer be manipulated. + /// </summary> + [Command(ProtocolName.Animation.ReleaseAnimations)] + [SupportedBy("Chrome")] + public class ReleaseAnimationsCommand: ICommand<ReleaseAnimationsCommandResponse> + { + /// <summary> + /// Gets or sets List of animation ids to seek. + /// </summary> + public string[] Animations { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/ReleaseAnimationsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/ReleaseAnimationsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8b52f71fb9f51725510b8b5e5710c0a274d7120c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/ReleaseAnimationsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Releases a set of animations to no longer be manipulated. + /// </summary> + [CommandResponse(ProtocolName.Animation.ReleaseAnimations)] + [SupportedBy("Chrome")] + public class ReleaseAnimationsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/ResolveAnimationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/ResolveAnimationCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..25a0ceeb0aff7fe2b2747cdcfa06a015fde0a1e3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/ResolveAnimationCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Gets the remote object of the Animation. + /// </summary> + [Command(ProtocolName.Animation.ResolveAnimation)] + [SupportedBy("Chrome")] + public class ResolveAnimationCommand: ICommand<ResolveAnimationCommandResponse> + { + /// <summary> + /// Gets or sets Animation id. + /// </summary> + public string AnimationId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/ResolveAnimationCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/ResolveAnimationCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..418c601f3668c36ad6152c39340063bddde7eb68 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/ResolveAnimationCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Gets the remote object of the Animation. + /// </summary> + [CommandResponse(ProtocolName.Animation.ResolveAnimation)] + [SupportedBy("Chrome")] + public class ResolveAnimationCommandResponse + { + /// <summary> + /// Gets or sets Corresponding remote object. + /// </summary> + public Runtime.RemoteObject RemoteObject { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SeekAnimationsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/SeekAnimationsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..adff95bbf553b757047dd1890114b5d714c99123 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/SeekAnimationsCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Seek a set of animations to a particular time within each animation. + /// </summary> + [Command(ProtocolName.Animation.SeekAnimations)] + [SupportedBy("Chrome")] + public class SeekAnimationsCommand: ICommand<SeekAnimationsCommandResponse> + { + /// <summary> + /// Gets or sets List of animation ids to seek. + /// </summary> + public string[] Animations { get; set; } + /// <summary> + /// Gets or sets Set the current time of each animation. + /// </summary> + public double CurrentTime { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SeekAnimationsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/SeekAnimationsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3e8b72654ac1dfa192378e9676a73d8700941a94 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/SeekAnimationsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Seek a set of animations to a particular time within each animation. + /// </summary> + [CommandResponse(ProtocolName.Animation.SeekAnimations)] + [SupportedBy("Chrome")] + public class SeekAnimationsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SetPausedCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/SetPausedCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..53c44d93069c1d7c59ced04a8b2f6a372fe23891 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/SetPausedCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Sets the paused state of a set of animations. + /// </summary> + [Command(ProtocolName.Animation.SetPaused)] + [SupportedBy("Chrome")] + public class SetPausedCommand: ICommand<SetPausedCommandResponse> + { + /// <summary> + /// Gets or sets Animations to set the pause state of. + /// </summary> + public string[] Animations { get; set; } + /// <summary> + /// Gets or sets Paused state to set to. + /// </summary> + public bool Paused { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SetPausedCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/SetPausedCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c2f67398983cc6e48463da3dd13c6109ca6f49b --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/SetPausedCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation +{ + /// <summary> + /// Sets the paused state of a set of animations. + /// </summary> + [CommandResponse(ProtocolName.Animation.SetPaused)] + [SupportedBy("Chrome")] + public class SetPausedCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SetPlaybackRateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/SetPlaybackRateCommand.cs index 651aeba58688f01f044d85acd0378a45d7c91954..4aa7c4a181252c5e8a32ff1e7c917e2b408a3704 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/SetPlaybackRateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/SetPlaybackRateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation /// </summary> [Command(ProtocolName.Animation.SetPlaybackRate)] [SupportedBy("Chrome")] - public class SetPlaybackRateCommand + public class SetPlaybackRateCommand: ICommand<SetPlaybackRateCommandResponse> { /// <summary> /// Gets or sets Playback rate for animations on page diff --git a/source/ChromeDevTools/Protocol/Chrome/Animation/SetTimingCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Animation/SetTimingCommand.cs index bd885a3dc51d24a118886e38374b5ab0d5ab0761..7ee3e5a8f67b62e99a38810ecb3bf7f1248c0d1e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Animation/SetTimingCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Animation/SetTimingCommand.cs @@ -9,12 +9,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation /// </summary> [Command(ProtocolName.Animation.SetTiming)] [SupportedBy("Chrome")] - public class SetTimingCommand + public class SetTimingCommand: ICommand<SetTimingCommandResponse> { /// <summary> - /// Gets or sets AnimationPlayer id. + /// Gets or sets Animation id. /// </summary> - public string PlayerId { get; set; } + public string AnimationId { get; set; } /// <summary> /// Gets or sets Duration of the animation. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/EnableCommand.cs index ffff30c9310042b5a6fcaf34dbad61fa1c17ce3c..fe564db6a8f33d6c9e83fe46f94d523f7d19d96a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetApplicationCacheForFrameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetApplicationCacheForFrameCommand.cs index 6dca4b431ca60dda674338201d5b449aadacc5fc..4dfb87180483c0e918fdc14d878371c6cd14396e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetApplicationCacheForFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetApplicationCacheForFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.GetApplicationCacheForFrame)] [SupportedBy("Chrome")] - public class GetApplicationCacheForFrameCommand + public class GetApplicationCacheForFrameCommand: ICommand<GetApplicationCacheForFrameCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame containing document whose application cache is retrieved. diff --git a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetFramesWithManifestsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetFramesWithManifestsCommand.cs index 0cd1f98da273cda97fe652c13005ea683a4df3a6..2d766a502cec81c9a1178e93dbcd9709389566d1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetFramesWithManifestsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetFramesWithManifestsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.GetFramesWithManifests)] [SupportedBy("Chrome")] - public class GetFramesWithManifestsCommand + public class GetFramesWithManifestsCommand: ICommand<GetFramesWithManifestsCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetManifestForFrameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetManifestForFrameCommand.cs index 5faa27ee4b08e129c24ca6f7b0ca6202955bf7fc..9c83755f5d5ff8adb10c468c9dcb115e5b0bd393 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetManifestForFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ApplicationCache/GetManifestForFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.GetManifestForFrame)] [SupportedBy("Chrome")] - public class GetManifestForFrameCommand + public class GetManifestForFrameCommand: ICommand<GetManifestForFrameCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame containing document whose manifest is retrieved. diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/Bounds.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/Bounds.cs new file mode 100644 index 0000000000000000000000000000000000000000..58d0cedb615307413b48e739bc723a12e57987f1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/Bounds.cs @@ -0,0 +1,39 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Browser window bounds information + /// </summary> + [SupportedBy("Chrome")] + public class Bounds + { + /// <summary> + /// Gets or sets The offset from the left edge of the screen to the window in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Left { get; set; } + /// <summary> + /// Gets or sets The offset from the top edge of the screen to the window in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Top { get; set; } + /// <summary> + /// Gets or sets The window width in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Width { get; set; } + /// <summary> + /// Gets or sets The window height in pixels. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Height { get; set; } + /// <summary> + /// Gets or sets The window state. Default to normal. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public WindowState WindowState { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..baefafe20cf3912236f37d593e41fa995879f5bd --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get position and size of the browser window. + /// </summary> + [Command(ProtocolName.Browser.GetWindowBounds)] + [SupportedBy("Chrome")] + public class GetWindowBoundsCommand: ICommand<GetWindowBoundsCommandResponse> + { + /// <summary> + /// Gets or sets Browser window id. + /// </summary> + public long WindowId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c7c028be14f16db99b384f5319acb56c13996ec2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowBoundsCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get position and size of the browser window. + /// </summary> + [CommandResponse(ProtocolName.Browser.GetWindowBounds)] + [SupportedBy("Chrome")] + public class GetWindowBoundsCommandResponse + { + /// <summary> + /// Gets or sets Bounds information of the window. When window state is 'minimized', the restored window position and size are returned. + /// </summary> + public Bounds Bounds { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf8bd7601609a41ff430b9c1656d6e870c6e3f62 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get the browser window that contains the devtools target. + /// </summary> + [Command(ProtocolName.Browser.GetWindowForTarget)] + [SupportedBy("Chrome")] + public class GetWindowForTargetCommand: ICommand<GetWindowForTargetCommandResponse> + { + /// <summary> + /// Gets or sets Devtools agent host id. + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3c50de895bacf9488431a4d6810436a36c7629bc --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/GetWindowForTargetCommandResponse.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Get the browser window that contains the devtools target. + /// </summary> + [CommandResponse(ProtocolName.Browser.GetWindowForTarget)] + [SupportedBy("Chrome")] + public class GetWindowForTargetCommandResponse + { + /// <summary> + /// Gets or sets Browser window id. + /// </summary> + public long WindowId { get; set; } + /// <summary> + /// Gets or sets Bounds information of the window. When window state is 'minimized', the restored window position and size are returned. + /// </summary> + public Bounds Bounds { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f1b8829bdf5c5b8160bdf2e0d5c8c7a701334634 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Set position and/or size of the browser window. + /// </summary> + [Command(ProtocolName.Browser.SetWindowBounds)] + [SupportedBy("Chrome")] + public class SetWindowBoundsCommand: ICommand<SetWindowBoundsCommandResponse> + { + /// <summary> + /// Gets or sets Browser window id. + /// </summary> + public long WindowId { get; set; } + /// <summary> + /// Gets or sets New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged. + /// </summary> + public Bounds Bounds { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..20e1c12c553cf2d56523f227b3796ebc0c408707 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/SetWindowBoundsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser +{ + /// <summary> + /// Set position and/or size of the browser window. + /// </summary> + [CommandResponse(ProtocolName.Browser.SetWindowBounds)] + [SupportedBy("Chrome")] + public class SetWindowBoundsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Browser/WindowState.cs b/source/ChromeDevTools/Protocol/Chrome/Browser/WindowState.cs new file mode 100644 index 0000000000000000000000000000000000000000..104f3a24e64e25f449fcb54d47f5110856b91b45 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Browser/WindowState.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser{ + /// <summary> + /// The state of the browser window. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum WindowState + { + Normal, + Minimized, + Maximized, + Fullscreen, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/AddRuleCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/AddRuleCommand.cs index ba3998c0c36e3274c560751e7e12aea93342671d..b4cc84b128e668ac99b71c50534147508379c0ce 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/AddRuleCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/AddRuleCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.AddRule)] [SupportedBy("Chrome")] - public class AddRuleCommand + public class AddRuleCommand: ICommand<AddRuleCommandResponse> { /// <summary> /// Gets or sets The css style sheet identifier where a new rule should be inserted. diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSKeyframeRule.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSKeyframeRule.cs new file mode 100644 index 0000000000000000000000000000000000000000..460ad6ea4b0ebc4d2d7cb0523a8cee29dd98d8a3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSKeyframeRule.cs @@ -0,0 +1,31 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// CSS keyframe rule representation. + /// </summary> + [SupportedBy("Chrome")] + public class CSSKeyframeRule + { + /// <summary> + /// Gets or sets The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Parent stylesheet's origin. + /// </summary> + public StyleSheetOrigin Origin { get; set; } + /// <summary> + /// Gets or sets Associated key text. + /// </summary> + public Value KeyText { get; set; } + /// <summary> + /// Gets or sets Associated style declaration. + /// </summary> + public CSSStyle Style { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSKeyframesRule.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSKeyframesRule.cs new file mode 100644 index 0000000000000000000000000000000000000000..3357022b52c74b7dd305a49cfdb9bd7f3cabcbef --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSKeyframesRule.cs @@ -0,0 +1,22 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// CSS keyframes rule representation. + /// </summary> + [SupportedBy("Chrome")] + public class CSSKeyframesRule + { + /// <summary> + /// Gets or sets Animation name. + /// </summary> + public Value AnimationName { get; set; } + /// <summary> + /// Gets or sets List of keyframes. + /// </summary> + public CSSKeyframeRule[] Keyframes { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSMedia.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSMedia.cs index 20f2a00b0d9aa41b7258456aee17a8b545752c6b..f532fe4390afc71c7dab41687b496a19c123f7dd 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSMedia.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSMedia.cs @@ -32,7 +32,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// Gets or sets Identifier of the stylesheet containing this object (if exists). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ParentStyleSheetId { get; set; } + public string StyleSheetId { get; set; } /// <summary> /// Gets or sets Array of media queries. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs index 5944a4c6af62866423b0fcb9e734c5ba1fd7bbe3..6787728bfaa2f68e7d774cbf6271d9c398f514e7 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CSSStyleSheetHeader.cs @@ -61,5 +61,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// Gets or sets Column offset of the stylesheet within the resource (zero based). /// </summary> public double StartColumn { get; set; } + /// <summary> + /// Gets or sets Size of the content (in characters). + /// </summary> + public double Length { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CollectClassNamesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CollectClassNamesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..da408eca665b47cffdd6ee37eb37aa9f4b08e0a4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CollectClassNamesCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Returns all class names from specified stylesheet. + /// </summary> + [Command(ProtocolName.CSS.CollectClassNames)] + [SupportedBy("Chrome")] + public class CollectClassNamesCommand: ICommand<CollectClassNamesCommandResponse> + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CollectClassNamesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CollectClassNamesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..4130459ec93739cac3490a6c7d2c286ed34cb4b0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CollectClassNamesCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Returns all class names from specified stylesheet. + /// </summary> + [CommandResponse(ProtocolName.CSS.CollectClassNames)] + [SupportedBy("Chrome")] + public class CollectClassNamesCommandResponse + { + /// <summary> + /// Gets or sets Class name list. + /// </summary> + public string[] ClassNames { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/ComputedStyle.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/ComputedStyle.cs new file mode 100644 index 0000000000000000000000000000000000000000..0921ea1b29f629784e30939f6a1447aa193f5016 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/ComputedStyle.cs @@ -0,0 +1,18 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// A subset of the full ComputedStyle as defined by the request whitelist. + /// </summary> + [SupportedBy("Chrome")] + public class ComputedStyle + { + /// <summary> + /// Gets or sets Properties + /// </summary> + public CSSComputedStyleProperty[] Properties { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/CreateStyleSheetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/CreateStyleSheetCommand.cs index 26b472d5d42070d606164504ed5e374d76f99731..30e8b019960244331154642da9f3b5d014678103 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/CreateStyleSheetCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/CreateStyleSheetCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.CreateStyleSheet)] [SupportedBy("Chrome")] - public class CreateStyleSheetCommand + public class CreateStyleSheetCommand: ICommand<CreateStyleSheetCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame where "via-inspector" stylesheet should be created. diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/DisableCommand.cs index 7d08df8a8c0553d5e854447b9554f2679e38beac..6e8fb95e0f8499d81873bb04e97af130bed7a88b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/EnableCommand.cs index c0d53df9ff4229ca0747a38acde8429ec6e2b863..73c7a75e0afe251ea3e93eaa60f4151fc05b4384 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/FontsUpdatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/FontsUpdatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf9505a03712904354e6b106f794afe468c74125 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/FontsUpdatedEvent.cs @@ -0,0 +1,13 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Fires whenever a web font gets loaded. + /// </summary> + [Event(ProtocolName.CSS.FontsUpdated)] + [SupportedBy("Chrome")] + public class FontsUpdatedEvent + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/ForcePseudoStateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/ForcePseudoStateCommand.cs index 74007097f7af90126810287b037abe6b12310d8c..cd3f05ff50fe7c5fb52a172d1446eb3abc15acf6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/ForcePseudoStateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/ForcePseudoStateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.ForcePseudoState)] [SupportedBy("Chrome")] - public class ForcePseudoStateCommand + public class ForcePseudoStateCommand: ICommand<ForcePseudoStateCommandResponse> { /// <summary> /// Gets or sets The element id for which to force the pseudo state. diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetBackgroundColorsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetBackgroundColorsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d04e602dd532d2ea5e0e97dec99c4c3bc1a7cff7 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetBackgroundColorsCommand.cs @@ -0,0 +1,16 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + [Command(ProtocolName.CSS.GetBackgroundColors)] + [SupportedBy("Chrome")] + public class GetBackgroundColorsCommand: ICommand<GetBackgroundColorsCommandResponse> + { + /// <summary> + /// Gets or sets Id of the node to get background colors for. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetBackgroundColorsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetBackgroundColorsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..acae41355f8bae1076c563bc45ad2a60edca0c53 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetBackgroundColorsCommandResponse.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + [CommandResponse(ProtocolName.CSS.GetBackgroundColors)] + [SupportedBy("Chrome")] + public class GetBackgroundColorsCommandResponse + { + /// <summary> + /// Gets or sets The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string[] BackgroundColors { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetComputedStyleForNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetComputedStyleForNodeCommand.cs index 9247eafbc0302023ff462db2a3f75c600bc7ca4f..e303d901784792ba078a243a374c7c5aa8627c85 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetComputedStyleForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetComputedStyleForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.GetComputedStyleForNode)] [SupportedBy("Chrome")] - public class GetComputedStyleForNodeCommand + public class GetComputedStyleForNodeCommand: ICommand<GetComputedStyleForNodeCommandResponse> { /// <summary> /// Gets or sets NodeId diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetInlineStylesForNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetInlineStylesForNodeCommand.cs index 1437f8abb6b7261dd81667c9f29b277e2512b77b..c31633e9902bf2052af3d84ac36de26c285a64a0 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetInlineStylesForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetInlineStylesForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.GetInlineStylesForNode)] [SupportedBy("Chrome")] - public class GetInlineStylesForNodeCommand + public class GetInlineStylesForNodeCommand: ICommand<GetInlineStylesForNodeCommandResponse> { /// <summary> /// Gets or sets NodeId diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetLayoutTreeAndStylesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetLayoutTreeAndStylesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f7d11ddabdac1bac93d29337fc21ecc998e9aa37 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetLayoutTreeAndStylesCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1. + /// </summary> + [Command(ProtocolName.CSS.GetLayoutTreeAndStyles)] + [SupportedBy("Chrome")] + public class GetLayoutTreeAndStylesCommand: ICommand<GetLayoutTreeAndStylesCommandResponse> + { + /// <summary> + /// Gets or sets Whitelist of computed styles to return. + /// </summary> + public string[] ComputedStyleWhitelist { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetLayoutTreeAndStylesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetLayoutTreeAndStylesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e83cc296f5d4aa10eda60b5bceadd216226e8e59 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetLayoutTreeAndStylesCommandResponse.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1. + /// </summary> + [CommandResponse(ProtocolName.CSS.GetLayoutTreeAndStyles)] + [SupportedBy("Chrome")] + public class GetLayoutTreeAndStylesCommandResponse + { + /// <summary> + /// Gets or sets LayoutTreeNodes + /// </summary> + public LayoutTreeNode[] LayoutTreeNodes { get; set; } + /// <summary> + /// Gets or sets ComputedStyles + /// </summary> + public ComputedStyle[] ComputedStyles { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommand.cs index 315b8253746b3161463d051440e3442b3ea4afc0..3b8bda19684af7f19810f3276f9cd21b40c31d32 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommand.cs @@ -9,21 +9,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.GetMatchedStylesForNode)] [SupportedBy("Chrome")] - public class GetMatchedStylesForNodeCommand + public class GetMatchedStylesForNodeCommand: ICommand<GetMatchedStylesForNodeCommandResponse> { /// <summary> /// Gets or sets NodeId /// </summary> public long NodeId { get; set; } - /// <summary> - /// Gets or sets Whether to exclude pseudo styles (default: false). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? ExcludePseudo { get; set; } - /// <summary> - /// Gets or sets Whether to exclude inherited styles (default: false). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? ExcludeInherited { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommandResponse.cs index be70f684b45346bad951826e4e46a84346372ffe..5b57feb08314700e95b15b2715caad0293764652 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetMatchedStylesForNodeCommandResponse.cs @@ -11,6 +11,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS [SupportedBy("Chrome")] public class GetMatchedStylesForNodeCommandResponse { + /// <summary> + /// Gets or sets Inline style for the specified DOM node. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public CSSStyle InlineStyle { get; set; } + /// <summary> + /// Gets or sets Attribute-defined element style (e.g. resulting from "width=20 height=100%"). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public CSSStyle AttributesStyle { get; set; } /// <summary> /// Gets or sets CSS rules matching this node, from all applicable stylesheets. /// </summary> @@ -20,11 +30,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// Gets or sets Pseudo style matches for this node. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public PseudoIdMatches[] PseudoElements { get; set; } + public PseudoElementMatches[] PseudoElements { get; set; } /// <summary> /// Gets or sets A chain of inherited styles (from the immediate node parent up to the DOM tree root). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public InheritedStyleEntry[] Inherited { get; set; } + /// <summary> + /// Gets or sets A list of CSS keyframed animations matching this node. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public CSSKeyframesRule[] CssKeyframesRules { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetMediaQueriesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetMediaQueriesCommand.cs index fea14f361f086730cff44dc0c21989bfb926411b..0008763023bf1b9d3da799162955f391a3b5fa7f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetMediaQueriesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetMediaQueriesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.GetMediaQueries)] [SupportedBy("Chrome")] - public class GetMediaQueriesCommand + public class GetMediaQueriesCommand: ICommand<GetMediaQueriesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommand.cs index f1c0a8484c1ce5a740a476142f382f51a92d77a2..cff0f3e4524475d2569ec7ae6dcf29570e42a253 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.GetPlatformFontsForNode)] [SupportedBy("Chrome")] - public class GetPlatformFontsForNodeCommand + public class GetPlatformFontsForNodeCommand: ICommand<GetPlatformFontsForNodeCommandResponse> { /// <summary> /// Gets or sets NodeId diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommandResponse.cs index b1a7608e5c11278551a3b6b20046f1c6a99076a2..2f8184f8489c4c219d5b46af2dbf985111b768fb 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetPlatformFontsForNodeCommandResponse.cs @@ -11,10 +11,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS [SupportedBy("Chrome")] public class GetPlatformFontsForNodeCommandResponse { - /// <summary> - /// Gets or sets Font family name which is determined by computed style. - /// </summary> - public string CssFamilyName { get; set; } /// <summary> /// Gets or sets Usage statistics for every employed platform font. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/GetStyleSheetTextCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/GetStyleSheetTextCommand.cs index 229c292cf02020575bd8038b9f789f08895cf771..9a999053c1175267253ce8854d8d8723be2c4a82 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/GetStyleSheetTextCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/GetStyleSheetTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.GetStyleSheetText)] [SupportedBy("Chrome")] - public class GetStyleSheetTextCommand + public class GetStyleSheetTextCommand: ICommand<GetStyleSheetTextCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/InlineTextBox.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/InlineTextBox.cs new file mode 100644 index 0000000000000000000000000000000000000000..6c31f39dbc15680641ae79f78b81bd2261692ce7 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/InlineTextBox.cs @@ -0,0 +1,26 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions. + /// </summary> + [SupportedBy("Chrome")] + public class InlineTextBox + { + /// <summary> + /// Gets or sets The absolute position bounding box. + /// </summary> + public DOM.Rect BoundingBox { get; set; } + /// <summary> + /// Gets or sets The starting index in characters, for this post layout textbox substring. + /// </summary> + public long StartCharacterIndex { get; set; } + /// <summary> + /// Gets or sets The number of characters in this post layout textbox substring. + /// </summary> + public long NumCharacters { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/LayoutTreeNode.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/LayoutTreeNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..49bb32249cacac7185f7dcd527a34a927d8b298a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/LayoutTreeNode.cs @@ -0,0 +1,37 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Details of an element in the DOM tree with a LayoutObject. + /// </summary> + [SupportedBy("Chrome")] + public class LayoutTreeNode + { + /// <summary> + /// Gets or sets The id of the related DOM node matching one from DOM.GetDocument. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets The absolute position bounding box. + /// </summary> + public DOM.Rect BoundingBox { get; set; } + /// <summary> + /// Gets or sets Contents of the LayoutText if any + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string LayoutText { get; set; } + /// <summary> + /// Gets or sets The post layout inline text nodes, if any. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public InlineTextBox[] InlineTextNodes { get; set; } + /// <summary> + /// Gets or sets Index into the computedStyles array returned by getLayoutTreeAndStyles. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? StyleIndex { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/PlatformFontUsage.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/PlatformFontUsage.cs index 0adf890122a5ecb7d4c15e141f427a45d297bdb9..e87037d0673becb37e408915258fa348bace4668 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/PlatformFontUsage.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/PlatformFontUsage.cs @@ -15,6 +15,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> public string FamilyName { get; set; } /// <summary> + /// Gets or sets Indicates if the font was downloaded or resolved locally. + /// </summary> + public bool IsCustomFont { get; set; } + /// <summary> /// Gets or sets Amount of glyphs that were rendered with this font. /// </summary> public double GlyphCount { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/PseudoIdMatches.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/PseudoElementMatches.cs similarity index 70% rename from source/ChromeDevTools/Protocol/Chrome/CSS/PseudoIdMatches.cs rename to source/ChromeDevTools/Protocol/Chrome/CSS/PseudoElementMatches.cs index 57bc395ffc2a6b995a2dca3590c6039679e7755b..c96e752aba58eab7149bf765ae11d417628c2331 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/PseudoIdMatches.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/PseudoElementMatches.cs @@ -8,12 +8,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// CSS rule collection for a single pseudo style. /// </summary> [SupportedBy("Chrome")] - public class PseudoIdMatches + public class PseudoElementMatches { /// <summary> - /// Gets or sets Pseudo style identifier (see <code>enum PseudoId</code> in <code>ComputedStyleConstants.h</code>). + /// Gets or sets Pseudo element type. /// </summary> - public long PseudoId { get; set; } + public DOM.PseudoType PseudoType { get; set; } /// <summary> /// Gets or sets Matches of CSS rules applicable to the pseudo style. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/RuleUsage.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/RuleUsage.cs new file mode 100644 index 0000000000000000000000000000000000000000..57d6499b9804b552b6bef6c14bb7f613155afb15 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/RuleUsage.cs @@ -0,0 +1,30 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// CSS coverage information. + /// </summary> + [SupportedBy("Chrome")] + public class RuleUsage + { + /// <summary> + /// Gets or sets The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Offset of the start of the rule (including selector) from the beginning of the stylesheet. + /// </summary> + public double StartOffset { get; set; } + /// <summary> + /// Gets or sets Offset of the end of the rule body from the beginning of the stylesheet. + /// </summary> + public double EndOffset { get; set; } + /// <summary> + /// Gets or sets Indicates whether the rule was actually used by some element in the page. + /// </summary> + public bool Used { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SelectorList.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SelectorList.cs index 7a23b6738eab79fdf2f5f8cdc684350569493642..6107aee50fa21a714497eb597d48610c2891f2ca 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SelectorList.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SelectorList.cs @@ -13,7 +13,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// <summary> /// Gets or sets Selectors in the list. /// </summary> - public Selector[] Selectors { get; set; } + public Value[] Selectors { get; set; } /// <summary> /// Gets or sets Rule selector text. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetEffectivePropertyValueForNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetEffectivePropertyValueForNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..699b97791bfd4eee82f52ea73cf27694eb88120f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetEffectivePropertyValueForNodeCommand.cs @@ -0,0 +1,27 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Find a rule with the given active property for the given node and set the new value for this property + /// </summary> + [Command(ProtocolName.CSS.SetEffectivePropertyValueForNode)] + [SupportedBy("Chrome")] + public class SetEffectivePropertyValueForNodeCommand: ICommand<SetEffectivePropertyValueForNodeCommandResponse> + { + /// <summary> + /// Gets or sets The element id for which to set property. + /// </summary> + public long NodeId { get; set; } + /// <summary> + /// Gets or sets PropertyName + /// </summary> + public string PropertyName { get; set; } + /// <summary> + /// Gets or sets Value + /// </summary> + public string Value { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetEffectivePropertyValueForNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetEffectivePropertyValueForNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ce0121f6c73eb311c11c51d212933bc9bb823528 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetEffectivePropertyValueForNodeCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Find a rule with the given active property for the given node and set the new value for this property + /// </summary> + [CommandResponse(ProtocolName.CSS.SetEffectivePropertyValueForNode)] + [SupportedBy("Chrome")] + public class SetEffectivePropertyValueForNodeCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetKeyframeKeyCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetKeyframeKeyCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0284cad093e1d3b5ae05d9ab7eacf23af0210b20 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetKeyframeKeyCommand.cs @@ -0,0 +1,27 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Modifies the keyframe rule key text. + /// </summary> + [Command(ProtocolName.CSS.SetKeyframeKey)] + [SupportedBy("Chrome")] + public class SetKeyframeKeyCommand: ICommand<SetKeyframeKeyCommandResponse> + { + /// <summary> + /// Gets or sets StyleSheetId + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets Range + /// </summary> + public SourceRange Range { get; set; } + /// <summary> + /// Gets or sets KeyText + /// </summary> + public string KeyText { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetKeyframeKeyCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetKeyframeKeyCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..88c0aa46d60eb0795b0ad49b242b6e7670cce17b --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetKeyframeKeyCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Modifies the keyframe rule key text. + /// </summary> + [CommandResponse(ProtocolName.CSS.SetKeyframeKey)] + [SupportedBy("Chrome")] + public class SetKeyframeKeyCommandResponse + { + /// <summary> + /// Gets or sets The resulting key text after modification. + /// </summary> + public Value KeyText { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetMediaTextCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetMediaTextCommand.cs index 7439107f813e047e0365c5806ca26e11b335febf..cae0a86181fbf4f337136ac2a71f7dd826a0d54e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SetMediaTextCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetMediaTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.SetMediaText)] [SupportedBy("Chrome")] - public class SetMediaTextCommand + public class SetMediaTextCommand: ICommand<SetMediaTextCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetPropertyTextCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetPropertyTextCommand.cs deleted file mode 100644 index 38143062179f283009e095724640aac86a4af5d9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SetPropertyTextCommand.cs +++ /dev/null @@ -1,27 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS -{ - /// <summary> - /// Either replaces a property identified by <code>styleSheetId</code> and <code>range</code> with <code>text</code> or inserts a new property <code>text</code> at the position identified by an empty <code>range</code>. - /// </summary> - [Command(ProtocolName.CSS.SetPropertyText)] - [SupportedBy("Chrome")] - public class SetPropertyTextCommand - { - /// <summary> - /// Gets or sets StyleSheetId - /// </summary> - public string StyleSheetId { get; set; } - /// <summary> - /// Gets or sets Either a source range of the property to be edited or an empty range representing a position for the property insertion. - /// </summary> - public SourceRange Range { get; set; } - /// <summary> - /// Gets or sets Text - /// </summary> - public string Text { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetPropertyTextCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetPropertyTextCommandResponse.cs deleted file mode 100644 index 5536ef372b491fcd0e62b0e54e6d29577b024a89..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SetPropertyTextCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS -{ - /// <summary> - /// Either replaces a property identified by <code>styleSheetId</code> and <code>range</code> with <code>text</code> or inserts a new property <code>text</code> at the position identified by an empty <code>range</code>. - /// </summary> - [CommandResponse(ProtocolName.CSS.SetPropertyText)] - [SupportedBy("Chrome")] - public class SetPropertyTextCommandResponse - { - /// <summary> - /// Gets or sets The resulting style after the property text modification. - /// </summary> - public CSSStyle Style { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommand.cs index 2fb444b83816cc46d9ef3f5067f64347ce66b5c3..09ec4c87b1f1c443fbf5e3b209ab2fb24d56d82a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.SetRuleSelector)] [SupportedBy("Chrome")] - public class SetRuleSelectorCommand + public class SetRuleSelectorCommand: ICommand<SetRuleSelectorCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommandResponse.cs index 5f37509d2e9d270b9ae9d07e84bf22bf050b9a33..96efee74fd6750a2b9da9c975e0e96c8e231e31e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetRuleSelectorCommandResponse.cs @@ -12,8 +12,8 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS public class SetRuleSelectorCommandResponse { /// <summary> - /// Gets or sets The resulting rule after the selector modification. + /// Gets or sets The resulting selector list after modification. /// </summary> - public CSSRule Rule { get; set; } + public SelectorList SelectorList { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommand.cs index 0522008c7ec478cb3d6a655c59848d736e76f509..02149afcefebde78231c3a491fe89d628e6b900c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// </summary> [Command(ProtocolName.CSS.SetStyleSheetText)] [SupportedBy("Chrome")] - public class SetStyleSheetTextCommand + public class SetStyleSheetTextCommand: ICommand<SetStyleSheetTextCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommandResponse.cs index b7e35d98491a0263dd98448bffebc0dc98b48371..9ee94e08f43030dade5092812aa5bdd6c5b9c1da 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleSheetTextCommandResponse.cs @@ -11,5 +11,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS [SupportedBy("Chrome")] public class SetStyleSheetTextCommandResponse { + /// <summary> + /// Gets or sets URL of source map associated with script (if any). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string SourceMapURL { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleTextsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleTextsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c41d83dc6d3259657b39ddc4291ddeaf5c1b3aee --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleTextsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Applies specified style edits one after another in the given order. + /// </summary> + [Command(ProtocolName.CSS.SetStyleTexts)] + [SupportedBy("Chrome")] + public class SetStyleTextsCommand: ICommand<SetStyleTextsCommandResponse> + { + /// <summary> + /// Gets or sets Edits + /// </summary> + public StyleDeclarationEdit[] Edits { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleTextsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleTextsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a843c39cbda2aaf7168251c7ebf6dc6ebec3b7f2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/SetStyleTextsCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Applies specified style edits one after another in the given order. + /// </summary> + [CommandResponse(ProtocolName.CSS.SetStyleTexts)] + [SupportedBy("Chrome")] + public class SetStyleTextsCommandResponse + { + /// <summary> + /// Gets or sets The resulting styles after modification. + /// </summary> + public CSSStyle[] Styles { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/ShorthandEntry.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/ShorthandEntry.cs index 76a21c1c4ddc91ac00b9c31446bcc6ee2c825b5c..dd9c49cd4c1af41125239fd75cd7d6a8061e4aaa 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/ShorthandEntry.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/ShorthandEntry.cs @@ -18,5 +18,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// Gets or sets Shorthand value. /// </summary> public string Value { get; set; } + /// <summary> + /// Gets or sets Whether the property has "!important" annotation (implies <code>false</code> if absent). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Important { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/StartRuleUsageTrackingCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/StartRuleUsageTrackingCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..06970030003a554c4f0eaea9d5cfa57164ea060d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/StartRuleUsageTrackingCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Enables the selector recording. + /// </summary> + [Command(ProtocolName.CSS.StartRuleUsageTracking)] + [SupportedBy("Chrome")] + public class StartRuleUsageTrackingCommand: ICommand<StartRuleUsageTrackingCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/StartRuleUsageTrackingCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/StartRuleUsageTrackingCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f96bb330f1ca7276d5615e47552e96a2c87b1e13 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/StartRuleUsageTrackingCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Enables the selector recording. + /// </summary> + [CommandResponse(ProtocolName.CSS.StartRuleUsageTracking)] + [SupportedBy("Chrome")] + public class StartRuleUsageTrackingCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/StopRuleUsageTrackingCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/StopRuleUsageTrackingCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d1fb1b3dc0b2277e3a50840cf5dc28825a7127df --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/StopRuleUsageTrackingCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// The list of rules with an indication of whether these were used + /// </summary> + [Command(ProtocolName.CSS.StopRuleUsageTracking)] + [SupportedBy("Chrome")] + public class StopRuleUsageTrackingCommand: ICommand<StopRuleUsageTrackingCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/StopRuleUsageTrackingCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/StopRuleUsageTrackingCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9cfe35a851c7b143e7e638def5b6dc287bbc9741 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/StopRuleUsageTrackingCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// The list of rules with an indication of whether these were used + /// </summary> + [CommandResponse(ProtocolName.CSS.StopRuleUsageTracking)] + [SupportedBy("Chrome")] + public class StopRuleUsageTrackingCommandResponse + { + /// <summary> + /// Gets or sets RuleUsage + /// </summary> + public RuleUsage[] RuleUsage { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/StyleDeclarationEdit.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/StyleDeclarationEdit.cs new file mode 100644 index 0000000000000000000000000000000000000000..fadf2c14eb4fa83a9f9a41629f33d2da5b54df34 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/StyleDeclarationEdit.cs @@ -0,0 +1,26 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// A descriptor of operation to mutate style declaration text. + /// </summary> + [SupportedBy("Chrome")] + public class StyleDeclarationEdit + { + /// <summary> + /// Gets or sets The css style sheet identifier. + /// </summary> + public string StyleSheetId { get; set; } + /// <summary> + /// Gets or sets The range of the style text in the enclosing stylesheet. + /// </summary> + public SourceRange Range { get; set; } + /// <summary> + /// Gets or sets New style text. + /// </summary> + public string Text { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..50f9115c76311457818a794696748735a5e7722f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation) + /// </summary> + [Command(ProtocolName.CSS.TakeCoverageDelta)] + [SupportedBy("Chrome")] + public class TakeCoverageDeltaCommand: ICommand<TakeCoverageDeltaCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7cee60163c817722a89c629aef6a68e1e09e79fc --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/TakeCoverageDeltaCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS +{ + /// <summary> + /// Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation) + /// </summary> + [CommandResponse(ProtocolName.CSS.TakeCoverageDelta)] + [SupportedBy("Chrome")] + public class TakeCoverageDeltaCommandResponse + { + /// <summary> + /// Gets or sets Coverage + /// </summary> + public RuleUsage[] Coverage { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CSS/Selector.cs b/source/ChromeDevTools/Protocol/Chrome/CSS/Value.cs similarity index 73% rename from source/ChromeDevTools/Protocol/Chrome/CSS/Selector.cs rename to source/ChromeDevTools/Protocol/Chrome/CSS/Value.cs index 3abfb80e863317c73681ef8ce43866a3e4b26bf0..d92c80a3a49525c9bd44eff6bf89f958c7c53c28 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CSS/Selector.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CSS/Value.cs @@ -8,14 +8,14 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS /// Data for a simple selector (these are delimited by commas in a selector list). /// </summary> [SupportedBy("Chrome")] - public class Selector + public class Value { /// <summary> - /// Gets or sets Selector text. + /// Gets or sets Value text. /// </summary> - public string Value { get; set; } + public string Text { get; set; } /// <summary> - /// Gets or sets Selector range in the underlying resource (if available). + /// Gets or sets Value range in the underlying resource (if available). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public SourceRange Range { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DataEntry.cs b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DataEntry.cs index 32371cc626b26b6d46d3f5d99a1714e4d7b1b7ce..aaf5bf3a9212f30a76b1d2ed4c97d3c51144745e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DataEntry.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DataEntry.cs @@ -11,11 +11,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CacheStorage public class DataEntry { /// <summary> - /// Gets or sets JSON-stringified request object. + /// Gets or sets Request url spec. /// </summary> public string Request { get; set; } /// <summary> - /// Gets or sets JSON-stringified response object. + /// Gets or sets Response stataus text. /// </summary> public string Response { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteCacheCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteCacheCommand.cs index 7471b1db4056b1a01503332a9d3d651ff60a55a9..f2d627e932cd7e178a5bc330de198c3b54727d04 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteCacheCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteCacheCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CacheStorage /// </summary> [Command(ProtocolName.CacheStorage.DeleteCache)] [SupportedBy("Chrome")] - public class DeleteCacheCommand + public class DeleteCacheCommand: ICommand<DeleteCacheCommandResponse> { /// <summary> /// Gets or sets Id of cache for deletion. diff --git a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteEntryCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteEntryCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4abbab3206d2500adfaf2ae1c42a3b9f1dfa2b15 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteEntryCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CacheStorage +{ + /// <summary> + /// Deletes a cache entry. + /// </summary> + [Command(ProtocolName.CacheStorage.DeleteEntry)] + [SupportedBy("Chrome")] + public class DeleteEntryCommand: ICommand<DeleteEntryCommandResponse> + { + /// <summary> + /// Gets or sets Id of cache where the entry will be deleted. + /// </summary> + public string CacheId { get; set; } + /// <summary> + /// Gets or sets URL spec of the request. + /// </summary> + public string Request { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteEntryCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteEntryCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed4708c2c3b0c85be68b537a153c1a53cb6b912d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/DeleteEntryCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CacheStorage +{ + /// <summary> + /// Deletes a cache entry. + /// </summary> + [CommandResponse(ProtocolName.CacheStorage.DeleteEntry)] + [SupportedBy("Chrome")] + public class DeleteEntryCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestCacheNamesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestCacheNamesCommand.cs index 616de72548cf69f798501b6483aae922eb53dcfe..f1a0eb80cc6e6dcd5a88281a3502c23d8b8cda9b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestCacheNamesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestCacheNamesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CacheStorage /// </summary> [Command(ProtocolName.CacheStorage.RequestCacheNames)] [SupportedBy("Chrome")] - public class RequestCacheNamesCommand + public class RequestCacheNamesCommand: ICommand<RequestCacheNamesCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestEntriesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestEntriesCommand.cs index 878856f160107ff3d2718175f943e705adc8c360..4bddb419db20225658cb080822d612b273e1b6a4 100644 --- a/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestEntriesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/CacheStorage/RequestEntriesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CacheStorage /// </summary> [Command(ProtocolName.CacheStorage.RequestEntries)] [SupportedBy("Chrome")] - public class RequestEntriesCommand + public class RequestEntriesCommand: ICommand<RequestEntriesCommandResponse> { /// <summary> /// Gets or sets ID of cache to get entries from. diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/Call.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/Call.cs deleted file mode 100644 index 71d72dbac11ab6355a849a14712fb61b45a04607..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/Call.cs +++ /dev/null @@ -1,68 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// - /// </summary> - [SupportedBy("Chrome")] - public class Call - { - /// <summary> - /// Gets or sets ContextId - /// </summary> - public string ContextId { get; set; } - /// <summary> - /// Gets or sets FunctionName - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string FunctionName { get; set; } - /// <summary> - /// Gets or sets Arguments - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public CallArgument[] Arguments { get; set; } - /// <summary> - /// Gets or sets Result - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public CallArgument Result { get; set; } - /// <summary> - /// Gets or sets IsDrawingCall - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDrawingCall { get; set; } - /// <summary> - /// Gets or sets IsFrameEndCall - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsFrameEndCall { get; set; } - /// <summary> - /// Gets or sets Property - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Property { get; set; } - /// <summary> - /// Gets or sets Value - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public CallArgument Value { get; set; } - /// <summary> - /// Gets or sets SourceURL - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string SourceURL { get; set; } - /// <summary> - /// Gets or sets LineNumber - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? LineNumber { get; set; } - /// <summary> - /// Gets or sets ColumnNumber - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnNumber { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/CallArgument.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/CallArgument.cs deleted file mode 100644 index 4275208c619b4ae07db1a0d17083c8ed72576b04..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/CallArgument.cs +++ /dev/null @@ -1,43 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// - /// </summary> - [SupportedBy("Chrome")] - public class CallArgument - { - /// <summary> - /// Gets or sets String representation of the object. - /// </summary> - public string Description { get; set; } - /// <summary> - /// Gets or sets Enum name, if any, that stands for the value (for example, a WebGL enum name). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string EnumName { get; set; } - /// <summary> - /// Gets or sets Resource identifier. Specified for <code>Resource</code> objects only. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ResourceId { get; set; } - /// <summary> - /// Gets or sets Object type. Specified for non <code>Resource</code> objects only. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - /// <summary> - /// Gets or sets Object subtype hint. Specified for <code>object</code> type values only. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Subtype { get; set; } - /// <summary> - /// Gets or sets The <code>RemoteObject</code>, if requested. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Runtime.RemoteObject RemoteObject { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/CaptureFrameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/CaptureFrameCommand.cs deleted file mode 100644 index 6ffc545e2ad46126ab57daf64ee99bf203d44fed..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/CaptureFrameCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared. - /// </summary> - [Command(ProtocolName.Canvas.CaptureFrame)] - [SupportedBy("Chrome")] - public class CaptureFrameCommand - { - /// <summary> - /// Gets or sets Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string FrameId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/CaptureFrameCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/CaptureFrameCommandResponse.cs deleted file mode 100644 index f8b11978d93d7976e6cd77ddd39bacd86d8c7fce..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/CaptureFrameCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared. - /// </summary> - [CommandResponse(ProtocolName.Canvas.CaptureFrame)] - [SupportedBy("Chrome")] - public class CaptureFrameCommandResponse - { - /// <summary> - /// Gets or sets Identifier of the trace log containing captured canvas calls. - /// </summary> - public string TraceLogId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/ContextCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/ContextCreatedEvent.cs deleted file mode 100644 index 388fcf82afce07ad0a448616da4227e654673c01..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/ContextCreatedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command). - /// </summary> - [Event(ProtocolName.Canvas.ContextCreated)] - [SupportedBy("Chrome")] - public class ContextCreatedEvent - { - /// <summary> - /// Gets or sets Identifier of the frame containing a canvas with a context. - /// </summary> - public string FrameId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/DisableCommand.cs deleted file mode 100644 index c673832b312ad77da3a630535fc39957401ed88d..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/DisableCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Disables Canvas inspection. - /// </summary> - [Command(ProtocolName.Canvas.Disable)] - [SupportedBy("Chrome")] - public class DisableCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/DropTraceLogCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/DropTraceLogCommand.cs deleted file mode 100644 index 0938475417febc59f645df8aaf7113b071cae91b..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/DropTraceLogCommand.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [Command(ProtocolName.Canvas.DropTraceLog)] - [SupportedBy("Chrome")] - public class DropTraceLogCommand - { - /// <summary> - /// Gets or sets TraceLogId - /// </summary> - public string TraceLogId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/DropTraceLogCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/DropTraceLogCommandResponse.cs deleted file mode 100644 index 6e7360d09084d88ef2200d04fde3625c0cfb81f7..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/DropTraceLogCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [CommandResponse(ProtocolName.Canvas.DropTraceLog)] - [SupportedBy("Chrome")] - public class DropTraceLogCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/EnableCommand.cs deleted file mode 100644 index be2d04a587bc8ef9c4b6fca4fd46cbcc2fc0832b..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/EnableCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Enables Canvas inspection. - /// </summary> - [Command(ProtocolName.Canvas.Enable)] - [SupportedBy("Chrome")] - public class EnableCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/EvaluateTraceLogCallArgumentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/EvaluateTraceLogCallArgumentCommand.cs deleted file mode 100644 index 0e960904fc5dbefa0c6f2914fd2e02bc9585521f..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/EvaluateTraceLogCallArgumentCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Evaluates a given trace call argument or its result. - /// </summary> - [Command(ProtocolName.Canvas.EvaluateTraceLogCallArgument)] - [SupportedBy("Chrome")] - public class EvaluateTraceLogCallArgumentCommand - { - /// <summary> - /// Gets or sets TraceLogId - /// </summary> - public string TraceLogId { get; set; } - /// <summary> - /// Gets or sets Index of the call to evaluate on (zero based). - /// </summary> - public long CallIndex { get; set; } - /// <summary> - /// Gets or sets Index of the argument to evaluate (zero based). Provide <code>-1</code> to evaluate call result. - /// </summary> - public long ArgumentIndex { get; set; } - /// <summary> - /// Gets or sets String object group name to put result into (allows rapid releasing resulting object handles using <code>Runtime.releaseObjectGroup</code>). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectGroup { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/EvaluateTraceLogCallArgumentCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/EvaluateTraceLogCallArgumentCommandResponse.cs deleted file mode 100644 index da274cc2655ceff2f33b19a6e0c4c1f40b91369c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/EvaluateTraceLogCallArgumentCommandResponse.cs +++ /dev/null @@ -1,25 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Evaluates a given trace call argument or its result. - /// </summary> - [CommandResponse(ProtocolName.Canvas.EvaluateTraceLogCallArgument)] - [SupportedBy("Chrome")] - public class EvaluateTraceLogCallArgumentCommandResponse - { - /// <summary> - /// Gets or sets Object wrapper for the evaluation result. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Runtime.RemoteObject Result { get; set; } - /// <summary> - /// Gets or sets State of the <code>Resource</code> object. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public ResourceState ResourceState { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetResourceStateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/GetResourceStateCommand.cs deleted file mode 100644 index d7bff830e4d909bc4230f0c60fbb68be886632c5..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetResourceStateCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [Command(ProtocolName.Canvas.GetResourceState)] - [SupportedBy("Chrome")] - public class GetResourceStateCommand - { - /// <summary> - /// Gets or sets TraceLogId - /// </summary> - public string TraceLogId { get; set; } - /// <summary> - /// Gets or sets ResourceId - /// </summary> - public string ResourceId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetResourceStateCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/GetResourceStateCommandResponse.cs deleted file mode 100644 index 796e7ab5f62faee039181ca1cdfef818d0d0f621..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetResourceStateCommandResponse.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [CommandResponse(ProtocolName.Canvas.GetResourceState)] - [SupportedBy("Chrome")] - public class GetResourceStateCommandResponse - { - /// <summary> - /// Gets or sets ResourceState - /// </summary> - public ResourceState ResourceState { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetTraceLogCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/GetTraceLogCommand.cs deleted file mode 100644 index de96338724f11ece255c58ac371fc19b57c839cf..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetTraceLogCommand.cs +++ /dev/null @@ -1,26 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [Command(ProtocolName.Canvas.GetTraceLog)] - [SupportedBy("Chrome")] - public class GetTraceLogCommand - { - /// <summary> - /// Gets or sets TraceLogId - /// </summary> - public string TraceLogId { get; set; } - /// <summary> - /// Gets or sets StartOffset - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? StartOffset { get; set; } - /// <summary> - /// Gets or sets MaxLength - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? MaxLength { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetTraceLogCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/GetTraceLogCommandResponse.cs deleted file mode 100644 index 4fa291579ecba80572e4a78841d90cd74e16e0b8..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/GetTraceLogCommandResponse.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [CommandResponse(ProtocolName.Canvas.GetTraceLog)] - [SupportedBy("Chrome")] - public class GetTraceLogCommandResponse - { - /// <summary> - /// Gets or sets TraceLog - /// </summary> - public TraceLog TraceLog { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/HasUninstrumentedCanvasesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/HasUninstrumentedCanvasesCommand.cs deleted file mode 100644 index 2ac3ffe76b8e468fe1d31c84df2a8a84f0cfd396..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/HasUninstrumentedCanvasesCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Checks if there is any uninstrumented canvas in the inspected page. - /// </summary> - [Command(ProtocolName.Canvas.HasUninstrumentedCanvases)] - [SupportedBy("Chrome")] - public class HasUninstrumentedCanvasesCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/HasUninstrumentedCanvasesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/HasUninstrumentedCanvasesCommandResponse.cs deleted file mode 100644 index dd24ea0c120109d2f469f3a2edccf95d79a053c5..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/HasUninstrumentedCanvasesCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Checks if there is any uninstrumented canvas in the inspected page. - /// </summary> - [CommandResponse(ProtocolName.Canvas.HasUninstrumentedCanvases)] - [SupportedBy("Chrome")] - public class HasUninstrumentedCanvasesCommandResponse - { - /// <summary> - /// Gets or sets Result - /// </summary> - public bool Result { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/ReplayTraceLogCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/ReplayTraceLogCommand.cs deleted file mode 100644 index 34fc57033cf71e6380ac5130407d0227a60e9929..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/ReplayTraceLogCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [Command(ProtocolName.Canvas.ReplayTraceLog)] - [SupportedBy("Chrome")] - public class ReplayTraceLogCommand - { - /// <summary> - /// Gets or sets TraceLogId - /// </summary> - public string TraceLogId { get; set; } - /// <summary> - /// Gets or sets Last call index in the trace log to replay (zero based). - /// </summary> - public long StepNo { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/ReplayTraceLogCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/ReplayTraceLogCommandResponse.cs deleted file mode 100644 index 16ec6f5be4a9b54d86b38d4fe6041753f6faea9c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/ReplayTraceLogCommandResponse.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [CommandResponse(ProtocolName.Canvas.ReplayTraceLog)] - [SupportedBy("Chrome")] - public class ReplayTraceLogCommandResponse - { - /// <summary> - /// Gets or sets ResourceState - /// </summary> - public ResourceState ResourceState { get; set; } - /// <summary> - /// Gets or sets Replay time (in milliseconds). - /// </summary> - public double ReplayTime { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/ResourceState.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/ResourceState.cs deleted file mode 100644 index 37d45894cec4ce456c604705d4af0abb5a8d54ac..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/ResourceState.cs +++ /dev/null @@ -1,32 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Resource state. - /// </summary> - [SupportedBy("Chrome")] - public class ResourceState - { - /// <summary> - /// Gets or sets Id - /// </summary> - public string Id { get; set; } - /// <summary> - /// Gets or sets TraceLogId - /// </summary> - public string TraceLogId { get; set; } - /// <summary> - /// Gets or sets Describes current <code>Resource</code> state. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public ResourceStateDescriptor[] Descriptors { get; set; } - /// <summary> - /// Gets or sets Screenshot image data URL. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ImageURL { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/ResourceStateDescriptor.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/ResourceStateDescriptor.cs deleted file mode 100644 index 7b9ca5c0286286fb47312a6c22dd081828376bce..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/ResourceStateDescriptor.cs +++ /dev/null @@ -1,38 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Resource state descriptor. - /// </summary> - [SupportedBy("Chrome")] - public class ResourceStateDescriptor - { - /// <summary> - /// Gets or sets State name. - /// </summary> - public string Name { get; set; } - /// <summary> - /// Gets or sets String representation of the enum value, if <code>name</code> stands for an enum. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string EnumValueForName { get; set; } - /// <summary> - /// Gets or sets The value associated with the particular state. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public CallArgument Value { get; set; } - /// <summary> - /// Gets or sets Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public ResourceStateDescriptor[] Values { get; set; } - /// <summary> - /// Gets or sets True iff the given <code>values</code> items stand for an array rather than a list of grouped states. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsArray { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/StartCapturingCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/StartCapturingCommand.cs deleted file mode 100644 index f898829e2bc6cfd060f21a3f3e95b9c20f7ab0c5..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/StartCapturingCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command. - /// </summary> - [Command(ProtocolName.Canvas.StartCapturing)] - [SupportedBy("Chrome")] - public class StartCapturingCommand - { - /// <summary> - /// Gets or sets Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string FrameId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/StartCapturingCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/StartCapturingCommandResponse.cs deleted file mode 100644 index 3cab6c72143201d9a13ac0ecc1a9613a2e7941e9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/StartCapturingCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command. - /// </summary> - [CommandResponse(ProtocolName.Canvas.StartCapturing)] - [SupportedBy("Chrome")] - public class StartCapturingCommandResponse - { - /// <summary> - /// Gets or sets Identifier of the trace log containing captured canvas calls. - /// </summary> - public string TraceLogId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/StopCapturingCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/StopCapturingCommand.cs deleted file mode 100644 index 0dcb94a498f1e07bee0b472633d69c169f5b701e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/StopCapturingCommand.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [Command(ProtocolName.Canvas.StopCapturing)] - [SupportedBy("Chrome")] - public class StopCapturingCommand - { - /// <summary> - /// Gets or sets TraceLogId - /// </summary> - public string TraceLogId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/StopCapturingCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/StopCapturingCommandResponse.cs deleted file mode 100644 index 22f72e072948bd2398399beef643d180f1453771..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/StopCapturingCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - [CommandResponse(ProtocolName.Canvas.StopCapturing)] - [SupportedBy("Chrome")] - public class StopCapturingCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/TraceLog.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/TraceLog.cs deleted file mode 100644 index 0ac0af4bf86cb12d94e9742668e1dbda15539ef7..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/TraceLog.cs +++ /dev/null @@ -1,38 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// - /// </summary> - [SupportedBy("Chrome")] - public class TraceLog - { - /// <summary> - /// Gets or sets Id - /// </summary> - public string Id { get; set; } - /// <summary> - /// Gets or sets Calls - /// </summary> - public Call[] Calls { get; set; } - /// <summary> - /// Gets or sets Contexts - /// </summary> - public CallArgument[] Contexts { get; set; } - /// <summary> - /// Gets or sets StartOffset - /// </summary> - public long StartOffset { get; set; } - /// <summary> - /// Gets or sets Alive - /// </summary> - public bool Alive { get; set; } - /// <summary> - /// Gets or sets TotalAvailableCalls - /// </summary> - public double TotalAvailableCalls { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/TraceLogsRemovedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Canvas/TraceLogsRemovedEvent.cs deleted file mode 100644 index be7e7273e73fefd90b45907da16f9694674ba412..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/TraceLogsRemovedEvent.cs +++ /dev/null @@ -1,23 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas -{ - /// <summary> - /// Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed. - /// </summary> - [Event(ProtocolName.Canvas.TraceLogsRemoved)] - [SupportedBy("Chrome")] - public class TraceLogsRemovedEvent - { - /// <summary> - /// Gets or sets If given, trace logs from the given frame were removed. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string FrameId { get; set; } - /// <summary> - /// Gets or sets If given, trace log with the given ID was removed. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string TraceLogId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/AsyncStackTrace.cs b/source/ChromeDevTools/Protocol/Chrome/Console/AsyncStackTrace.cs deleted file mode 100644 index 6bc8dbcf9fa5d1e0c1c43c9db09d434fe4e2678f..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Console/AsyncStackTrace.cs +++ /dev/null @@ -1,28 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console -{ - /// <summary> - /// Asynchronous JavaScript call stack. - /// </summary> - [SupportedBy("Chrome")] - public class AsyncStackTrace - { - /// <summary> - /// Gets or sets Call frames of the stack trace. - /// </summary> - public CallFrame[] CallFrames { get; set; } - /// <summary> - /// Gets or sets String label of this stack trace. For async traces this may be a name of the function that initiated the async call. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - /// <summary> - /// Gets or sets Next asynchronous stack trace, if any. - /// </summary> - [JsonProperty("asyncStackTrace")] - public AsyncStackTrace AsyncStackTraceChild { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommand.cs index 400f9eb55dcb2e025248673dd5f98ad265af6d73..d123bc570a6aa7c0148889bbd4fed2ac0b2b1413 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommand.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console { /// <summary> - /// Clears console messages collected in the browser. + /// Does nothing. /// </summary> [Command(ProtocolName.Console.ClearMessages)] [SupportedBy("Chrome")] - public class ClearMessagesCommand + public class ClearMessagesCommand: ICommand<ClearMessagesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommandResponse.cs index 95a2094d768342c750218d1400b5908ed40c7a5f..f9d5a628d45d547506f53574e23b81aba526d522 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Console/ClearMessagesCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console { /// <summary> - /// Clears console messages collected in the browser. + /// Does nothing. /// </summary> [CommandResponse(ProtocolName.Console.ClearMessages)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/ConsoleMessage.cs b/source/ChromeDevTools/Protocol/Chrome/Console/ConsoleMessage.cs index 4ea754811cd9f7f88d411904fa817bc26215d2fd..659878df5002d2766056b70e6b8e85fdda26338e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Console/ConsoleMessage.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Console/ConsoleMessage.cs @@ -23,63 +23,19 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console /// </summary> public string Text { get; set; } /// <summary> - /// Gets or sets Console message type. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - /// <summary> - /// Gets or sets Script ID of the message origin. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ScriptId { get; set; } - /// <summary> /// Gets or sets URL of the message origin. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Url { get; set; } /// <summary> - /// Gets or sets Line number in the resource that generated this message. + /// Gets or sets Line number in the resource that generated this message (1-based). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? Line { get; set; } /// <summary> - /// Gets or sets Column number in the resource that generated this message. + /// Gets or sets Column number in the resource that generated this message (1-based). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? Column { get; set; } - /// <summary> - /// Gets or sets Repeat count for repeated messages. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? RepeatCount { get; set; } - /// <summary> - /// Gets or sets Message parameters in case of the formatted message. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Runtime.RemoteObject[] Parameters { get; set; } - /// <summary> - /// Gets or sets JavaScript stack trace for assertions and error messages. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public CallFrame[] StackTrace { get; set; } - /// <summary> - /// Gets or sets Asynchronous JavaScript stack trace that preceded this message, if available. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public AsyncStackTrace AsyncStackTrace { get; set; } - /// <summary> - /// Gets or sets Identifier of the network request associated with this message. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string NetworkRequestId { get; set; } - /// <summary> - /// Gets or sets Timestamp, when this message was fired. - /// </summary> - public double Timestamp { get; set; } - /// <summary> - /// Gets or sets Identifier of the context where this message was created - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? ExecutionContextId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Console/DisableCommand.cs index 24ebcf98a733b0658b2780a71eef56033271a6cc..88056d92729046d1b3a09f34f5f60bc03a0cd7d6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Console/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Console/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console /// </summary> [Command(ProtocolName.Console.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Console/EnableCommand.cs index 7e98dd7b4e590f0d61303eac9bd62c33b3f92d1e..b88c914097704ba1e75f410216d96ff6abce3c9d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Console/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Console/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console /// </summary> [Command(ProtocolName.Console.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/MessageRepeatCountUpdatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Console/MessageRepeatCountUpdatedEvent.cs deleted file mode 100644 index e608bce2cc90cb96478a944e0182320cf26d1d81..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Console/MessageRepeatCountUpdatedEvent.cs +++ /dev/null @@ -1,21 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console -{ - /// <summary> - /// Is not issued. Will be gone in the future versions of the protocol. - /// </summary> - [Event(ProtocolName.Console.MessageRepeatCountUpdated)] - [SupportedBy("Chrome")] - public class MessageRepeatCountUpdatedEvent - { - /// <summary> - /// Gets or sets New repeat count value. - /// </summary> - public long Count { get; set; } - /// <summary> - /// Gets or sets Timestamp of most recent message in batch. - /// </summary> - public double Timestamp { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/MessagesClearedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Console/MessagesClearedEvent.cs deleted file mode 100644 index 31166480cfa546d194aae84511647862c5f76afb..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Console/MessagesClearedEvent.cs +++ /dev/null @@ -1,13 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console -{ - /// <summary> - /// Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation. - /// </summary> - [Event(ProtocolName.Console.MessagesCleared)] - [SupportedBy("Chrome")] - public class MessagesClearedEvent - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/CollectClassNamesFromSubtreeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/CollectClassNamesFromSubtreeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e6767fd162f826e0762b9e289ce2dbb15c9b3c8 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/CollectClassNamesFromSubtreeCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +{ + /// <summary> + /// Collects class names for the node with given id and all of it's child nodes. + /// </summary> + [Command(ProtocolName.DOM.CollectClassNamesFromSubtree)] + [SupportedBy("Chrome")] + public class CollectClassNamesFromSubtreeCommand: ICommand<CollectClassNamesFromSubtreeCommandResponse> + { + /// <summary> + /// Gets or sets Id of the node to collect class names. + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/CollectClassNamesFromSubtreeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/CollectClassNamesFromSubtreeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..4158d5f153b560a37553797d8cdcd7d055152204 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/CollectClassNamesFromSubtreeCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +{ + /// <summary> + /// Collects class names for the node with given id and all of it's child nodes. + /// </summary> + [CommandResponse(ProtocolName.DOM.CollectClassNamesFromSubtree)] + [SupportedBy("Chrome")] + public class CollectClassNamesFromSubtreeCommandResponse + { + /// <summary> + /// Gets or sets Class name list. + /// </summary> + public string[] ClassNames { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/CopyToCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/CopyToCommand.cs index d9857fdcc542ef9ce011c99ed6d05334bdd75e17..1dd4acb7176482d797181b48a1e3c03a2401a439 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/CopyToCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/CopyToCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.CopyTo)] [SupportedBy("Chrome")] - public class CopyToCommand + public class CopyToCommand: ICommand<CopyToCommandResponse> { /// <summary> /// Gets or sets Id of the node to copy. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/DisableCommand.cs index 82931bd121b3afacd294f08877dfea2a741e1d3c..fa4b32cfeac09a979f5692b8af0b5d8d05a4d0ce 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/DiscardSearchResultsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/DiscardSearchResultsCommand.cs index 6283ea640c3a4a136991d2bfe08cb461b825f335..33268db99bf44f068ff207db3d2aa72ec34822f3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/DiscardSearchResultsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/DiscardSearchResultsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.DiscardSearchResults)] [SupportedBy("Chrome")] - public class DiscardSearchResultsCommand + public class DiscardSearchResultsCommand: ICommand<DiscardSearchResultsCommandResponse> { /// <summary> /// Gets or sets Unique search session identifier. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/EnableCommand.cs index 9334d2b9adadcf32c630d3bb10d90abce349c76c..1ba5d183c97c34775e41664c58fdf02bf8c24da1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/EventListener.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/EventListener.cs deleted file mode 100644 index 83ddbf52105166344c1590ed76e3134311e65e79..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/EventListener.cs +++ /dev/null @@ -1,39 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM -{ - /// <summary> - /// DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type. - /// </summary> - [SupportedBy("Chrome")] - public class EventListener - { - /// <summary> - /// Gets or sets <code>EventListener</code>'s type. - /// </summary> - public string Type { get; set; } - /// <summary> - /// Gets or sets <code>EventListener</code>'s useCapture. - /// </summary> - public bool UseCapture { get; set; } - /// <summary> - /// Gets or sets <code>EventListener</code>'s isAttribute. - /// </summary> - public bool IsAttribute { get; set; } - /// <summary> - /// Gets or sets Target <code>DOMNode</code> id. - /// </summary> - public long NodeId { get; set; } - /// <summary> - /// Gets or sets Handler code location. - /// </summary> - public Debugger.Location Location { get; set; } - /// <summary> - /// Gets or sets Event handler function value. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Runtime.RemoteObject Handler { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/FocusCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/FocusCommand.cs index ef3e41ab7d6e349bfb4c05505acd7543e5819427..cb2c6db8976c85a52375ab7391de94eb1b5e83af 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/FocusCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/FocusCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.Focus)] [SupportedBy("Chrome")] - public class FocusCommand + public class FocusCommand: ICommand<FocusCommandResponse> { /// <summary> /// Gets or sets Id of the node to focus. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetAttributesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetAttributesCommand.cs index 214beab7a2d290d21fc99947ae869f3124fc6084..5a5a3d0622938b7c56a4555219ca6b493b737378 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetAttributesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetAttributesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.GetAttributes)] [SupportedBy("Chrome")] - public class GetAttributesCommand + public class GetAttributesCommand: ICommand<GetAttributesCommandResponse> { /// <summary> /// Gets or sets Id of the node to retrieve attibutes for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetBoxModelCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetBoxModelCommand.cs index 9c2d8b81497854eeb19a238adf7330fadebf1070..684fcec524458157c97470c64cbb0c2d41f6b753 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetBoxModelCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetBoxModelCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.GetBoxModel)] [SupportedBy("Chrome")] - public class GetBoxModelCommand + public class GetBoxModelCommand: ICommand<GetBoxModelCommandResponse> { /// <summary> /// Gets or sets Id of the node to get box model for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommand.cs index f54815767818c671c0775a38156a4d12336f6710..e1a7d0977819a084063f1e2d4daaa1a8bd1ddd35 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommand.cs @@ -5,11 +5,21 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Returns the root DOM node to the caller. + /// Returns the root DOM node (and optionally the subtree) to the caller. /// </summary> [Command(ProtocolName.DOM.GetDocument)] [SupportedBy("Chrome")] - public class GetDocumentCommand + public class GetDocumentCommand: ICommand<GetDocumentCommandResponse> { + /// <summary> + /// Gets or sets The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Depth { get; set; } + /// <summary> + /// Gets or sets Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Pierce { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommandResponse.cs index bf91bddbcc8b39ed712fe8b810160ee515122be9..900ef72737562b661da95f42c8160122ff361fb9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetDocumentCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Returns the root DOM node to the caller. + /// Returns the root DOM node (and optionally the subtree) to the caller. /// </summary> [CommandResponse(ProtocolName.DOM.GetDocument)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetEventListenersForNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetEventListenersForNodeCommand.cs deleted file mode 100644 index b717a8aa71d3a0f787c0b9b1883f6a35cb6795f2..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetEventListenersForNodeCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM -{ - /// <summary> - /// Returns event listeners relevant to the node. - /// </summary> - [Command(ProtocolName.DOM.GetEventListenersForNode)] - [SupportedBy("Chrome")] - public class GetEventListenersForNodeCommand - { - /// <summary> - /// Gets or sets Id of the node to get listeners for. - /// </summary> - public long NodeId { get; set; } - /// <summary> - /// Gets or sets Symbolic group name for handler value. Handler value is not returned without this parameter specified. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectGroup { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetEventListenersForNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetEventListenersForNodeCommandResponse.cs deleted file mode 100644 index 8540f9486f85272a1f950bb3798859d071ffe4b1..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetEventListenersForNodeCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM -{ - /// <summary> - /// Returns event listeners relevant to the node. - /// </summary> - [CommandResponse(ProtocolName.DOM.GetEventListenersForNode)] - [SupportedBy("Chrome")] - public class GetEventListenersForNodeCommandResponse - { - /// <summary> - /// Gets or sets Array of relevant listeners. - /// </summary> - public EventListener[] Listeners { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetFlattenedDocumentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetFlattenedDocumentCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f8d62eee0ec0a529a27fd8ad29ace5473c63dbeb --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetFlattenedDocumentCommand.cs @@ -0,0 +1,25 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +{ + /// <summary> + /// Returns the root DOM node (and optionally the subtree) to the caller. + /// </summary> + [Command(ProtocolName.DOM.GetFlattenedDocument)] + [SupportedBy("Chrome")] + public class GetFlattenedDocumentCommand: ICommand<GetFlattenedDocumentCommandResponse> + { + /// <summary> + /// Gets or sets The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Depth { get; set; } + /// <summary> + /// Gets or sets Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Pierce { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetFlattenedDocumentCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetFlattenedDocumentCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7fc36610cc43ba22d84cda931b4ac8ee07a8e48f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetFlattenedDocumentCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +{ + /// <summary> + /// Returns the root DOM node (and optionally the subtree) to the caller. + /// </summary> + [CommandResponse(ProtocolName.DOM.GetFlattenedDocument)] + [SupportedBy("Chrome")] + public class GetFlattenedDocumentCommandResponse + { + /// <summary> + /// Gets or sets Resulting node. + /// </summary> + public Node[] Nodes { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs index 7f9b51dd9f333f50aed3afdb0abf2d6ac6932aac..37202b7dee51be2dee44f78dc68e8fe692b35c91 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetNodeForLocationCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.GetNodeForLocation)] [SupportedBy("Chrome")] - public class GetNodeForLocationCommand + public class GetNodeForLocationCommand: ICommand<GetNodeForLocationCommandResponse> { /// <summary> /// Gets or sets X coordinate. @@ -19,5 +19,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// Gets or sets Y coordinate. /// </summary> public long Y { get; set; } + /// <summary> + /// Gets or sets False to skip to the nearest non-UA shadow root ancestor (default: false). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IncludeUserAgentShadowDOM { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetOuterHTMLCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetOuterHTMLCommand.cs index 279c92b5451acfcbc2bb5e47adb94b3feaa38a19..d8229db4e817bb72af66f0b19bba453842ef2dda 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetOuterHTMLCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetOuterHTMLCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.GetOuterHTML)] [SupportedBy("Chrome")] - public class GetOuterHTMLCommand + public class GetOuterHTMLCommand: ICommand<GetOuterHTMLCommandResponse> { /// <summary> /// Gets or sets Id of the node to get markup for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetRelayoutBoundaryCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetRelayoutBoundaryCommand.cs index 4a8da01fd8e61c8fee417f1d0c1a20a100bdf57e..f092478b1bc07ad5d3280fabef3e2ca3d8786c48 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetRelayoutBoundaryCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetRelayoutBoundaryCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.GetRelayoutBoundary)] [SupportedBy("Chrome")] - public class GetRelayoutBoundaryCommand + public class GetRelayoutBoundaryCommand: ICommand<GetRelayoutBoundaryCommandResponse> { /// <summary> /// Gets or sets Id of the node. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetSearchResultsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/GetSearchResultsCommand.cs index 984d4933a5b9625a1cf2af5e9d619918a4a95c7c..38110c7ec1da073f5acd58f541c2c14eb83e0941 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetSearchResultsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/GetSearchResultsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.GetSearchResults)] [SupportedBy("Chrome")] - public class GetSearchResultsCommand + public class GetSearchResultsCommand: ICommand<GetSearchResultsCommandResponse> { /// <summary> /// Gets or sets Unique search session identifier. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs index 2fd36b5fbade0ad7b2fb965c2424194edbfc7f40..0e668d701d6c1cc62c05621a2d0e8588032b50a6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommand.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Hides DOM node highlight. + /// Hides any highlight. /// </summary> [Command(ProtocolName.DOM.HideHighlight)] [SupportedBy("Chrome")] - public class HideHighlightCommand + public class HideHighlightCommand: ICommand<HideHighlightCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs index df2135a8d94cf4fdf53d8140fcc361dcae0aaab3..2a74784966c427ade1af363804e2d2c23f979a99 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HideHighlightCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Hides DOM node highlight. + /// Hides any highlight. /// </summary> [CommandResponse(ProtocolName.DOM.HideHighlight)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs index 36955d19c94b370850a8783032c8599c87683cce..9c6087cdb783dd36850f476e2a4eb697bd5b087b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommand.cs @@ -5,30 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// Highlights DOM node. /// </summary> [Command(ProtocolName.DOM.HighlightNode)] [SupportedBy("Chrome")] - public class HighlightNodeCommand + public class HighlightNodeCommand: ICommand<HighlightNodeCommandResponse> { - /// <summary> - /// Gets or sets A descriptor for the highlight appearance. - /// </summary> - public HighlightConfig HighlightConfig { get; set; } - /// <summary> - /// Gets or sets Identifier of the node to highlight. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? NodeId { get; set; } - /// <summary> - /// Gets or sets Identifier of the backend node to highlight. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? BackendNodeId { get; set; } - /// <summary> - /// Gets or sets JavaScript object id of the node to be highlighted. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs index b136f0bc5c2b73d9d4b00f7196e66c6d33affcc5..88a1866c1fe89cfaf6f11a31ad3c9d12fde811bb 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightNodeCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// Highlights DOM node. /// </summary> [CommandResponse(ProtocolName.DOM.HighlightNode)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs index da0a0c0d8a781a775b163e6a8160de3557d41ce9..dfb034add8bcabb0a1df3e199417f93de883f9e6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommand.cs @@ -5,37 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// Highlights given rectangle. /// </summary> [Command(ProtocolName.DOM.HighlightRect)] [SupportedBy("Chrome")] - public class HighlightRectCommand + public class HighlightRectCommand: ICommand<HighlightRectCommandResponse> { - /// <summary> - /// Gets or sets X coordinate - /// </summary> - public long X { get; set; } - /// <summary> - /// Gets or sets Y coordinate - /// </summary> - public long Y { get; set; } - /// <summary> - /// Gets or sets Rectangle width - /// </summary> - public long Width { get; set; } - /// <summary> - /// Gets or sets Rectangle height - /// </summary> - public long Height { get; set; } - /// <summary> - /// Gets or sets The highlight fill color (default: transparent). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA Color { get; set; } - /// <summary> - /// Gets or sets The highlight outline color (default: transparent). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA OutlineColor { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs index b377ab80face3940e6c409436e72b3edc607a801..06a0d1bec6629056974b21231cdcd98929da8aaf 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightRectCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM { /// <summary> - /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// Highlights given rectangle. /// </summary> [CommandResponse(ProtocolName.DOM.HighlightRect)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/MarkUndoableStateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/MarkUndoableStateCommand.cs index 4516516d2e1cdb8bb5a944da276ddc117b0c09fc..88dc65c224d57f21585483468d02fa4be5301300 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/MarkUndoableStateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/MarkUndoableStateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.MarkUndoableState)] [SupportedBy("Chrome")] - public class MarkUndoableStateCommand + public class MarkUndoableStateCommand: ICommand<MarkUndoableStateCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/MoveToCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/MoveToCommand.cs index 4f30c3122e9d99701bc7daf4bc97ba28bf377613..ba0d5691537f62530081e408c90701d08adc1a63 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/MoveToCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/MoveToCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.MoveTo)] [SupportedBy("Chrome")] - public class MoveToCommand + public class MoveToCommand: ICommand<MoveToCommandResponse> { /// <summary> /// Gets or sets Id of the node to move. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/Node.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/Node.cs index 99bf6fb332a58b09fd96466b590cc59bd253f2e4..74fdff1a5256b5602083ca28bc7540648e2103cd 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/Node.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/Node.cs @@ -15,6 +15,15 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> public long NodeId { get; set; } /// <summary> + /// Gets or sets The id of the parent node if any. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ParentId { get; set; } + /// <summary> + /// Gets or sets The BackendNodeId for this node. + /// </summary> + public long BackendNodeId { get; set; } + /// <summary> /// Gets or sets <code>Node</code>'s nodeType. /// </summary> public long NodeType { get; set; } @@ -130,5 +139,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public BackendNode[] DistributedNodes { get; set; } + /// <summary> + /// Gets or sets Whether the node is SVG. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IsSVG { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/PerformSearchCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/PerformSearchCommand.cs index 8462063c2960ba968c5bb535828d556fa9ffc5c5..15de5f7dbf5b66831d41632bdef12646b37d668a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/PerformSearchCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/PerformSearchCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.PerformSearch)] [SupportedBy("Chrome")] - public class PerformSearchCommand + public class PerformSearchCommand: ICommand<PerformSearchCommandResponse> { /// <summary> /// Gets or sets Plain text or query selector or XPath search query. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodeByPathToFrontendCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodeByPathToFrontendCommand.cs index 4c18a672cefec61f86bed19d21ba99fa9320293d..83091b39953aaca2f2ee939846a6a59dc41016b2 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodeByPathToFrontendCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodeByPathToFrontendCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.PushNodeByPathToFrontend)] [SupportedBy("Chrome")] - public class PushNodeByPathToFrontendCommand + public class PushNodeByPathToFrontendCommand: ICommand<PushNodeByPathToFrontendCommandResponse> { /// <summary> /// Gets or sets Path to node in the proprietary format. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodesByBackendIdsToFrontendCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodesByBackendIdsToFrontendCommand.cs index 4fa0a09f20907229f6742270380e07691593d7b8..bc65bf57b29b1a65a57f168059d06ff7540c4562 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodesByBackendIdsToFrontendCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/PushNodesByBackendIdsToFrontendCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.PushNodesByBackendIdsToFrontend)] [SupportedBy("Chrome")] - public class PushNodesByBackendIdsToFrontendCommand + public class PushNodesByBackendIdsToFrontendCommand: ICommand<PushNodesByBackendIdsToFrontendCommandResponse> { /// <summary> /// Gets or sets The array of backend node ids. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorAllCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorAllCommand.cs index 3b4bb84bf8b6ca04be72f8429897d0a7e74cccd5..ae75d2c729272660fcc8bd556aea7533ebb9e2b5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorAllCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorAllCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.QuerySelectorAll)] [SupportedBy("Chrome")] - public class QuerySelectorAllCommand + public class QuerySelectorAllCommand: ICommand<QuerySelectorAllCommandResponse> { /// <summary> /// Gets or sets Id of the node to query upon. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorCommand.cs index 83d94423db0ca562d89029a703865ee8d42d1484..b98abf287e2d609d89cc9966fb838a759edf9b09 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/QuerySelectorCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.QuerySelector)] [SupportedBy("Chrome")] - public class QuerySelectorCommand + public class QuerySelectorCommand: ICommand<QuerySelectorCommandResponse> { /// <summary> /// Gets or sets Id of the node to query upon. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/RedoCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/RedoCommand.cs index f4633d134ea01df4910dea9e03e19fe61ab9b0d5..17ce3b36eca1ad874a34474abc4cb2f18b50e8a5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/RedoCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/RedoCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.Redo)] [SupportedBy("Chrome")] - public class RedoCommand + public class RedoCommand: ICommand<RedoCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveAttributeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveAttributeCommand.cs index e37d0f4453f5f695026127468f61c5fc8f101fd1..ddf2000958960fdeea0cfa91abd9eef88821fb3f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveAttributeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveAttributeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.RemoveAttribute)] [SupportedBy("Chrome")] - public class RemoveAttributeCommand + public class RemoveAttributeCommand: ICommand<RemoveAttributeCommandResponse> { /// <summary> /// Gets or sets Id of the element to remove attribute from. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveNodeCommand.cs index 1460cefbfda47e6be43f9fa7579b9a98bf4fae60..91cd80fffb4fb920ef32661fb852fcaee06bc60a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/RemoveNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.RemoveNode)] [SupportedBy("Chrome")] - public class RemoveNodeCommand + public class RemoveNodeCommand: ICommand<RemoveNodeCommandResponse> { /// <summary> /// Gets or sets Id of the node to remove. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/RequestChildNodesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/RequestChildNodesCommand.cs index 9d526fa4a45ecf0cddeb3dc20e8957d64ee8bd51..828e2b0f1c02d75d06eaab6c2a847fb81cd4fa45 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/RequestChildNodesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/RequestChildNodesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.RequestChildNodes)] [SupportedBy("Chrome")] - public class RequestChildNodesCommand + public class RequestChildNodesCommand: ICommand<RequestChildNodesCommandResponse> { /// <summary> /// Gets or sets Id of the node to get children for. @@ -20,5 +20,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? Depth { get; set; } + /// <summary> + /// Gets or sets Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Pierce { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/RequestNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/RequestNodeCommand.cs index ee26ae93a62185c3b4db0b32fa7dbebd1188918f..531cb66cad71db072f79e188efd4043e9b861a53 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/RequestNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/RequestNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.RequestNode)] [SupportedBy("Chrome")] - public class RequestNodeCommand + public class RequestNodeCommand: ICommand<RequestNodeCommandResponse> { /// <summary> /// Gets or sets JavaScript object id to convert into node. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/ResolveNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/ResolveNodeCommand.cs index 830c5a040ef9aa0b54118dc70fa89d8f478a11a3..4ef0a9d372ed9d741f72690502322f24ccb14f86 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/ResolveNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/ResolveNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.ResolveNode)] [SupportedBy("Chrome")] - public class ResolveNodeCommand + public class ResolveNodeCommand: ICommand<ResolveNodeCommandResponse> { /// <summary> /// Gets or sets Id of the node to resolve. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributeValueCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributeValueCommand.cs index 2366dbd414f817e196a99aa3d9cf988424de6ac7..f8e4b24ca082a2cc4bf99d3fcf1997385787ea09 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributeValueCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributeValueCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.SetAttributeValue)] [SupportedBy("Chrome")] - public class SetAttributeValueCommand + public class SetAttributeValueCommand: ICommand<SetAttributeValueCommandResponse> { /// <summary> /// Gets or sets Id of the element to set attribute for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributesAsTextCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributesAsTextCommand.cs index ab329a03f8a8931413fe27dc3b65f9eb179fefea..e172e4af378144c715b7c1c8d71f8345d121dd62 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributesAsTextCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/SetAttributesAsTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.SetAttributesAsText)] [SupportedBy("Chrome")] - public class SetAttributesAsTextCommand + public class SetAttributesAsTextCommand: ICommand<SetAttributesAsTextCommandResponse> { /// <summary> /// Gets or sets Id of the element to set attributes for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetFileInputFilesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/SetFileInputFilesCommand.cs index d5d7b769d335a969cb1f9da857ff46da6cae54e3..e704426cf7debec809db035cfd061444d0de10c7 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetFileInputFilesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/SetFileInputFilesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.SetFileInputFiles)] [SupportedBy("Chrome")] - public class SetFileInputFilesCommand + public class SetFileInputFilesCommand: ICommand<SetFileInputFilesCommandResponse> { /// <summary> /// Gets or sets Id of the file input node to set files for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectedNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectedNodeCommand.cs index 382b261ab672f6ad5b3d56d3d3b5bdfa84f24730..5a49586c717eb3d3cff88ab5b5828d3aacf349ae 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectedNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectedNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.SetInspectedNode)] [SupportedBy("Chrome")] - public class SetInspectedNodeCommand + public class SetInspectedNodeCommand: ICommand<SetInspectedNodeCommandResponse> { /// <summary> /// Gets or sets DOM node id to be accessible by means of $x command line API. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeNameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeNameCommand.cs index 71b11a4107891d160ce3fa7bd47801f3487ea557..3bd41828a23ce7b16f475e6b41d70d4cdc32c16a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeNameCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeNameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.SetNodeName)] [SupportedBy("Chrome")] - public class SetNodeNameCommand + public class SetNodeNameCommand: ICommand<SetNodeNameCommandResponse> { /// <summary> /// Gets or sets Id of the node to set name for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeValueCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeValueCommand.cs index f844056001a1ecd14fe23aa60960f9feecb82b69..5bda04dba05cba8c50f0c75ff3591b2a4f67d5a0 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeValueCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/SetNodeValueCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.SetNodeValue)] [SupportedBy("Chrome")] - public class SetNodeValueCommand + public class SetNodeValueCommand: ICommand<SetNodeValueCommandResponse> { /// <summary> /// Gets or sets Id of the node to set value for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetOuterHTMLCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/SetOuterHTMLCommand.cs index 1c1fd49b95f001515f33e08846291d03a42084df..4202760942672170e56b59fadd9db3288871c93e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetOuterHTMLCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/SetOuterHTMLCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.SetOuterHTML)] [SupportedBy("Chrome")] - public class SetOuterHTMLCommand + public class SetOuterHTMLCommand: ICommand<SetOuterHTMLCommandResponse> { /// <summary> /// Gets or sets Id of the node to set markup for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/ShadowRootType.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/ShadowRootType.cs index 3746acf25b4df7f9c601b0a7b13b7376afa15d20..87cc8819b1d730a84f6f9ed97c31bf510164fd9e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/ShadowRootType.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/ShadowRootType.cs @@ -13,6 +13,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM{ { [EnumMember(Value = "user-agent")] User_agent, - Author, + Open, + Closed, } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/UndoCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOM/UndoCommand.cs index 0694c1e78721b157a72f161385729da261fbd11c..e030e1aac501bb295070a0c782b2b233efb726f5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/UndoCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOM/UndoCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// </summary> [Command(ProtocolName.DOM.Undo)] [SupportedBy("Chrome")] - public class UndoCommand + public class UndoCommand: ICommand<UndoCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/EventListener.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/EventListener.cs new file mode 100644 index 0000000000000000000000000000000000000000..3070f1af40472340b5e98d32c7b09b286f217788 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/EventListener.cs @@ -0,0 +1,57 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger +{ + /// <summary> + /// Object event listener. + /// </summary> + [SupportedBy("Chrome")] + public class EventListener + { + /// <summary> + /// Gets or sets <code>EventListener</code>'s type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets <code>EventListener</code>'s useCapture. + /// </summary> + public bool UseCapture { get; set; } + /// <summary> + /// Gets or sets <code>EventListener</code>'s passive flag. + /// </summary> + public bool Passive { get; set; } + /// <summary> + /// Gets or sets <code>EventListener</code>'s once flag. + /// </summary> + public bool Once { get; set; } + /// <summary> + /// Gets or sets Script id of the handler code. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets Line number in the script (0-based). + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets Column number in the script (0-based). + /// </summary> + public long ColumnNumber { get; set; } + /// <summary> + /// Gets or sets Event handler function value. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.RemoteObject Handler { get; set; } + /// <summary> + /// Gets or sets Event original handler function value. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.RemoteObject OriginalHandler { get; set; } + /// <summary> + /// Gets or sets Node the listener is added to (if any). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? BackendNodeId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/GetEventListenersCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/GetEventListenersCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..bc1e9bb3be577787547bf38a40c9dfe804cb8992 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/GetEventListenersCommand.cs @@ -0,0 +1,29 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger +{ + /// <summary> + /// Returns event listeners of the given object. + /// </summary> + [Command(ProtocolName.DOMDebugger.GetEventListeners)] + [SupportedBy("Chrome")] + public class GetEventListenersCommand: ICommand<GetEventListenersCommandResponse> + { + /// <summary> + /// Gets or sets Identifier of the object to return listeners for. + /// </summary> + public string ObjectId { get; set; } + /// <summary> + /// Gets or sets The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Depth { get; set; } + /// <summary> + /// Gets or sets Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Pierce { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetEventListenersCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/GetEventListenersCommandResponse.cs similarity index 75% rename from source/ChromeDevTools/Protocol/Chrome/Runtime/GetEventListenersCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/DOMDebugger/GetEventListenersCommandResponse.cs index 05ef85dec6ff885e2a7c567de09a2c692ca2e40b..fb04af876c62b7dcb7c7b880996f1d2429d3f97f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetEventListenersCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/GetEventListenersCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger { /// <summary> /// Returns event listeners of the given object. /// </summary> - [CommandResponse(ProtocolName.Runtime.GetEventListeners)] + [CommandResponse(ProtocolName.DOMDebugger.GetEventListeners)] [SupportedBy("Chrome")] public class GetEventListenersCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveDOMBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveDOMBreakpointCommand.cs index 3e974126ec4ef22ffbc048fc9e5df167d2fd6af8..d9fb68cc457986193c8c965daace673e0a14730d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveDOMBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveDOMBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveDOMBreakpoint)] [SupportedBy("Chrome")] - public class RemoveDOMBreakpointCommand + public class RemoveDOMBreakpointCommand: ICommand<RemoveDOMBreakpointCommandResponse> { /// <summary> /// Gets or sets Identifier of the node to remove breakpoint from. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveEventListenerBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveEventListenerBreakpointCommand.cs index 9007ca533b2310ce7307e76743275ed6c5b44306..66569c1c488fb0622f44b398556e75dbf356f560 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveEventListenerBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveEventListenerBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveEventListenerBreakpoint)] [SupportedBy("Chrome")] - public class RemoveEventListenerBreakpointCommand + public class RemoveEventListenerBreakpointCommand: ICommand<RemoveEventListenerBreakpointCommandResponse> { /// <summary> /// Gets or sets Event name. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs index 170fab42b396adf8f4bae0a4074d667e9e1eff8f..0961571d5b2e0717504f000ee78675c835313a74 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveInstrumentationBreakpoint)] [SupportedBy("Chrome")] - public class RemoveInstrumentationBreakpointCommand + public class RemoveInstrumentationBreakpointCommand: ICommand<RemoveInstrumentationBreakpointCommandResponse> { /// <summary> /// Gets or sets Instrumentation name to stop on. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveXHRBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveXHRBreakpointCommand.cs index 6708f25c7919cfb03bd1f0287577ed5e64ad103a..c44d4c2b09a4bc1c50d88c12430bce6270de739c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveXHRBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/RemoveXHRBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveXHRBreakpoint)] [SupportedBy("Chrome")] - public class RemoveXHRBreakpointCommand + public class RemoveXHRBreakpointCommand: ICommand<RemoveXHRBreakpointCommandResponse> { /// <summary> /// Gets or sets Resource URL substring. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetDOMBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetDOMBreakpointCommand.cs index 7bc2ede3026301b31d353b93e0230e2e5613403e..96108d3d411cfe7354edee16f26e245fc465f529 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetDOMBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetDOMBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetDOMBreakpoint)] [SupportedBy("Chrome")] - public class SetDOMBreakpointCommand + public class SetDOMBreakpointCommand: ICommand<SetDOMBreakpointCommandResponse> { /// <summary> /// Gets or sets Identifier of the node to set breakpoint on. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetEventListenerBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetEventListenerBreakpointCommand.cs index 13e2f3869409999e7f6dc885de9cde3a9dff6068..8950005c400652d0e93acbcd5e385f6fce2010db 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetEventListenerBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetEventListenerBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetEventListenerBreakpoint)] [SupportedBy("Chrome")] - public class SetEventListenerBreakpointCommand + public class SetEventListenerBreakpointCommand: ICommand<SetEventListenerBreakpointCommandResponse> { /// <summary> /// Gets or sets DOM Event name to stop on (any DOM event will do). diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetInstrumentationBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetInstrumentationBreakpointCommand.cs index 985ca8d3cc82b24a62eb4776278ff8b337bbe301..f68cffb39f29f300f26690438bb4ec0f2cb84f5a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetInstrumentationBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetInstrumentationBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetInstrumentationBreakpoint)] [SupportedBy("Chrome")] - public class SetInstrumentationBreakpointCommand + public class SetInstrumentationBreakpointCommand: ICommand<SetInstrumentationBreakpointCommandResponse> { /// <summary> /// Gets or sets Instrumentation name to stop on. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetXHRBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetXHRBreakpointCommand.cs index f543fbd52028eed1f0f94dd499fb1116786f7382..aff208c8cc286e980e3201a03398518031c6ad1d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetXHRBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMDebugger/SetXHRBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetXHRBreakpoint)] [SupportedBy("Chrome")] - public class SetXHRBreakpointCommand + public class SetXHRBreakpointCommand: ICommand<SetXHRBreakpointCommandResponse> { /// <summary> /// Gets or sets Resource URL substring. All XHRs having this substring in the URL will get stopped upon. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/ClearCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/ClearCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b1b327c1a6adde5a4e938100e01fad57dabef56b --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/ClearCommand.cs @@ -0,0 +1,16 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMStorage +{ + [Command(ProtocolName.DOMStorage.Clear)] + [SupportedBy("Chrome")] + public class ClearCommand: ICommand<ClearCommandResponse> + { + /// <summary> + /// Gets or sets StorageId + /// </summary> + public StorageId StorageId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/ClearCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/ClearCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..50c70172d18fe4ba6426bd40012e82ba0913779a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/ClearCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMStorage +{ + [CommandResponse(ProtocolName.DOMStorage.Clear)] + [SupportedBy("Chrome")] + public class ClearCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/DisableCommand.cs index 9ba51da7ffb7b3d844347daeddfd0c7d1fcdf72c..1add3ce06e7927e99aa3104484f3f8e7b1408510 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMStorage /// </summary> [Command(ProtocolName.DOMStorage.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/EnableCommand.cs index 4a4a2c23937913f03eb313434e825c9c3a99a822..cf1732d240274f55948040954be6fd83ff878916 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMStorage /// </summary> [Command(ProtocolName.DOMStorage.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/GetDOMStorageItemsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/GetDOMStorageItemsCommand.cs index 15e302147872427c60662b8fe1cbc8ffa6d87a56..606e8217f28f77e41bbd526b9ee6d3e16e9162b2 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/GetDOMStorageItemsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/GetDOMStorageItemsCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMStorage { [Command(ProtocolName.DOMStorage.GetDOMStorageItems)] [SupportedBy("Chrome")] - public class GetDOMStorageItemsCommand + public class GetDOMStorageItemsCommand: ICommand<GetDOMStorageItemsCommandResponse> { /// <summary> /// Gets or sets StorageId diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/RemoveDOMStorageItemCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/RemoveDOMStorageItemCommand.cs index 21a1f4bebf884092ae598d1122b5f3cacfee1bac..a39bfd09eebed836eba7744746a88e33e0c9779b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/RemoveDOMStorageItemCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/RemoveDOMStorageItemCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMStorage { [Command(ProtocolName.DOMStorage.RemoveDOMStorageItem)] [SupportedBy("Chrome")] - public class RemoveDOMStorageItemCommand + public class RemoveDOMStorageItemCommand: ICommand<RemoveDOMStorageItemCommandResponse> { /// <summary> /// Gets or sets StorageId diff --git a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/SetDOMStorageItemCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/SetDOMStorageItemCommand.cs index 0ab1798194c6e343ed14a573d53ef27d74e703bd..ebdb11fa7a3efbeb5654aa1662705e23fc0cfe63 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOMStorage/SetDOMStorageItemCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DOMStorage/SetDOMStorageItemCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOMStorage { [Command(ProtocolName.DOMStorage.SetDOMStorageItem)] [SupportedBy("Chrome")] - public class SetDOMStorageItemCommand + public class SetDOMStorageItemCommand: ICommand<SetDOMStorageItemCommandResponse> { /// <summary> /// Gets or sets StorageId diff --git a/source/ChromeDevTools/Protocol/Chrome/Database/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Database/DisableCommand.cs index 8d1cea2e97e40c52c1a0bc851ee8a972614bbdff..e9cd9fbad88398931822536f8185a4ae329ab867 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Database/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Database/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Database /// </summary> [Command(ProtocolName.Database.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Database/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Database/EnableCommand.cs index 01c7d1bd308b82866d5e4116879958354e7c8142..5d3352ee53d7e3870c0a93f6d03ce952ff7ab809 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Database/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Database/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Database /// </summary> [Command(ProtocolName.Database.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Database/ExecuteSQLCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Database/ExecuteSQLCommand.cs index 327d6c4537c90a5aec91bf7ba2a225295747c0df..0350d8efcac36b2edd7961d9e1e65c5ce5c7c974 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Database/ExecuteSQLCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Database/ExecuteSQLCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Database { [Command(ProtocolName.Database.ExecuteSQL)] [SupportedBy("Chrome")] - public class ExecuteSQLCommand + public class ExecuteSQLCommand: ICommand<ExecuteSQLCommandResponse> { /// <summary> /// Gets or sets DatabaseId diff --git a/source/ChromeDevTools/Protocol/Chrome/Database/GetDatabaseTableNamesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Database/GetDatabaseTableNamesCommand.cs index 37c8bd7ee03916bdbce791e661aa40a103ec9d6a..f9049ee3dd177edb5353ac5206f26d0370ba16ea 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Database/GetDatabaseTableNamesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Database/GetDatabaseTableNamesCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Database { [Command(ProtocolName.Database.GetDatabaseTableNames)] [SupportedBy("Chrome")] - public class GetDatabaseTableNamesCommand + public class GetDatabaseTableNamesCommand: ICommand<GetDatabaseTableNamesCommandResponse> { /// <summary> /// Gets or sets DatabaseId diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperation.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperation.cs deleted file mode 100644 index 95db90de570955b2e560e1fa2a116d1cee206f8d..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperation.cs +++ /dev/null @@ -1,32 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Information about the async operation. - /// </summary> - [SupportedBy("Chrome")] - public class AsyncOperation - { - /// <summary> - /// Gets or sets Unique id of the async operation. - /// </summary> - public long Id { get; set; } - /// <summary> - /// Gets or sets String description of the async operation. - /// </summary> - public string Description { get; set; } - /// <summary> - /// Gets or sets Stack trace where async operation was scheduled. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.CallFrame[] StackTrace { get; set; } - /// <summary> - /// Gets or sets Asynchronous stack trace where async operation was scheduled, if available. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.AsyncStackTrace AsyncStackTrace { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperationCompletedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperationCompletedEvent.cs deleted file mode 100644 index 5c4c61d775e7d0897ddfeb0e5f009b0c6dffef21..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperationCompletedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Fired when an async operation is completed (while in a debugger stepping session). - /// </summary> - [Event(ProtocolName.Debugger.AsyncOperationCompleted)] - [SupportedBy("Chrome")] - public class AsyncOperationCompletedEvent - { - /// <summary> - /// Gets or sets ID of the async operation that was completed. - /// </summary> - public long Id { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperationStartedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperationStartedEvent.cs deleted file mode 100644 index d108ab4d294cf285c428e13f4532b66e2cfe6b7e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/AsyncOperationStartedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Fired when an async operation is scheduled (while in a debugger stepping session). - /// </summary> - [Event(ProtocolName.Debugger.AsyncOperationStarted)] - [SupportedBy("Chrome")] - public class AsyncOperationStartedEvent - { - /// <summary> - /// Gets or sets Information about the async operation. - /// </summary> - public AsyncOperation Operation { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/FunctionDetails.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/BreakLocation.cs similarity index 51% rename from source/ChromeDevTools/Protocol/Chrome/Debugger/FunctionDetails.cs rename to source/ChromeDevTools/Protocol/Chrome/Debugger/BreakLocation.cs index eb6b876ed60ea02716468d8d92f01efa07d80188..73f4131292c09e2826f164ebc3078232645724dc 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/FunctionDetails.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/BreakLocation.cs @@ -5,28 +5,28 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger { /// <summary> - /// Information about the function. + /// /// </summary> [SupportedBy("Chrome")] - public class FunctionDetails + public class BreakLocation { /// <summary> - /// Gets or sets Location of the function, none for native functions. + /// Gets or sets Script identifier as reported in the <code>Debugger.scriptParsed</code>. /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } + public string ScriptId { get; set; } /// <summary> - /// Gets or sets Name of the function. + /// Gets or sets Line number in the script (0-based). /// </summary> - public string FunctionName { get; set; } + public long LineNumber { get; set; } /// <summary> - /// Gets or sets Whether this is a generator function. + /// Gets or sets Column number in the script (0-based). /// </summary> - public bool IsGenerator { get; set; } + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ColumnNumber { get; set; } /// <summary> - /// Gets or sets Scope chain for this closure. + /// Gets or sets Type /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Scope[] ScopeChain { get; set; } + public string Type { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/CanSetScriptSourceCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/CanSetScriptSourceCommand.cs deleted file mode 100644 index 4def6f2d7f64191e730b6e8b0ee4c02635393012..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/CanSetScriptSourceCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Always returns true. - /// </summary> - [Command(ProtocolName.Debugger.CanSetScriptSource)] - [SupportedBy("Chrome")] - public class CanSetScriptSourceCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/CanSetScriptSourceCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/CanSetScriptSourceCommandResponse.cs deleted file mode 100644 index 2c273136cffd3c961db98a8f2cf2782405cc9a6f..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/CanSetScriptSourceCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Always returns true. - /// </summary> - [CommandResponse(ProtocolName.Debugger.CanSetScriptSource)] - [SupportedBy("Chrome")] - public class CanSetScriptSourceCommandResponse - { - /// <summary> - /// Gets or sets True if <code>setScriptSource</code> is supported. - /// </summary> - public bool Result { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/CollectionEntry.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/CollectionEntry.cs deleted file mode 100644 index 85975e32fab9bffbbc2872871abb03055c610f24..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/CollectionEntry.cs +++ /dev/null @@ -1,23 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Collection entry. - /// </summary> - [SupportedBy("Chrome")] - public class CollectionEntry - { - /// <summary> - /// Gets or sets Entry key of a map-like collection, otherwise not provided. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Runtime.RemoteObject Key { get; set; } - /// <summary> - /// Gets or sets Entry value. - /// </summary> - public Runtime.RemoteObject Value { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs index 642c31f4db64f88fc835783710f4e8ca776a7fc1..fd011ceae02acc4299d5157f77f46bd0618d7196 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ContinueToLocationCommand.cs @@ -9,16 +9,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.ContinueToLocation)] [SupportedBy("Chrome")] - public class ContinueToLocationCommand + public class ContinueToLocationCommand: ICommand<ContinueToLocationCommandResponse> { /// <summary> /// Gets or sets Location to continue to. /// </summary> public Location Location { get; set; } /// <summary> - /// Gets or sets Allows breakpoints at the intemediate positions inside statements. + /// Gets or sets TargetCallFrames /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? InterstatementLocation { get; set; } + public string TargetCallFrames { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/DisableCommand.cs index be4789a537372feb50c142de22e4e8ecd342447f..3c4f1daebb21b5ce1c1e688b2b8d1bef34b08f81 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/DisablePromiseTrackerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/DisablePromiseTrackerCommand.cs deleted file mode 100644 index 850f3812cb95e5e4745bcf27b45ffc2b6a4266b8..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/DisablePromiseTrackerCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Disables promise tracking. - /// </summary> - [Command(ProtocolName.Debugger.DisablePromiseTracker)] - [SupportedBy("Chrome")] - public class DisablePromiseTrackerCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/DisablePromiseTrackerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/DisablePromiseTrackerCommandResponse.cs deleted file mode 100644 index f3270b58e1dbd3e6f894a8ddead60c6f28e5828a..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/DisablePromiseTrackerCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Disables promise tracking. - /// </summary> - [CommandResponse(ProtocolName.Debugger.DisablePromiseTracker)] - [SupportedBy("Chrome")] - public class DisablePromiseTrackerCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/EnableCommand.cs index 7303c6d30efa5385e875cd261247dbabacd23dd2..dd7e1ece4f11b7fc61b3f2361a47dfb3b16a75fe 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/EnablePromiseTrackerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/EnablePromiseTrackerCommand.cs deleted file mode 100644 index 9fa809a838b9b6dc5b136cd0760982d167cdabad..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/EnablePromiseTrackerCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Enables promise tracking, information about <code>Promise</code>s created or updated will now be stored on the backend. - /// </summary> - [Command(ProtocolName.Debugger.EnablePromiseTracker)] - [SupportedBy("Chrome")] - public class EnablePromiseTrackerCommand - { - /// <summary> - /// Gets or sets Whether to capture stack traces for promise creation and settlement events (default: false). - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? CaptureStacks { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/EnablePromiseTrackerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/EnablePromiseTrackerCommandResponse.cs deleted file mode 100644 index efeece1e6419e045172798587196f2a2439906c0..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/EnablePromiseTrackerCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Enables promise tracking, information about <code>Promise</code>s created or updated will now be stored on the backend. - /// </summary> - [CommandResponse(ProtocolName.Debugger.EnablePromiseTracker)] - [SupportedBy("Chrome")] - public class EnablePromiseTrackerCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommand.cs index 4f23eb2818e8d4c7cd8e72f9d7aec6e654965932..620709e037a2346f7799cad05270962ee74d5ee4 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.EvaluateOnCallFrame)] [SupportedBy("Chrome")] - public class EvaluateOnCallFrameCommand + public class EvaluateOnCallFrameCommand: ICommand<EvaluateOnCallFrameCommandResponse> { /// <summary> /// Gets or sets Call frame identifier to evaluate on. @@ -30,10 +30,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? IncludeCommandLineAPI { get; set; } /// <summary> - /// Gets or sets Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state. + /// Gets or sets In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? DoNotPauseOnExceptionsAndMuteConsole { get; set; } + public bool? Silent { get; set; } /// <summary> /// Gets or sets Whether the result is expected to be a JSON object that should be sent by value. /// </summary> @@ -44,5 +44,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? GeneratePreview { get; set; } + /// <summary> + /// Gets or sets Whether to throw an exception if side effect cannot be ruled out during evaluation. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? ThrowOnSideEffect { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommandResponse.cs index 7f7f766774ec82ee28fdee33aab7ceefb709d4ac..018f9cea511202d7db181c6c089828ca7452cb59 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/EvaluateOnCallFrameCommandResponse.cs @@ -16,14 +16,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> public Runtime.RemoteObject Result { get; set; } /// <summary> - /// Gets or sets True if the result was thrown during the evaluation. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? WasThrown { get; set; } - /// <summary> /// Gets or sets Exception details. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public ExceptionDetails ExceptionDetails { get; set; } + public Runtime.ExceptionDetails ExceptionDetails { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ExceptionDetails.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ExceptionDetails.cs deleted file mode 100644 index b481d2aee8e7e8e5dda5a6ae3d63fad56ee90c22..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ExceptionDetails.cs +++ /dev/null @@ -1,43 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Detailed information on exception (or error) that was thrown during script compilation or execution. - /// </summary> - [SupportedBy("Chrome")] - public class ExceptionDetails - { - /// <summary> - /// Gets or sets Exception text. - /// </summary> - public string Text { get; set; } - /// <summary> - /// Gets or sets URL of the message origin. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Url { get; set; } - /// <summary> - /// Gets or sets Script ID of the message origin. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ScriptId { get; set; } - /// <summary> - /// Gets or sets Line number in the resource that generated this message. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? Line { get; set; } - /// <summary> - /// Gets or sets Column number in the resource that generated this message. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? Column { get; set; } - /// <summary> - /// Gets or sets JavaScript stack trace for assertions and error messages. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.CallFrame[] StackTrace { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/FlushAsyncOperationEventsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/FlushAsyncOperationEventsCommand.cs deleted file mode 100644 index d8436cd7bbe1219a3f635e05cbf66319933532b4..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/FlushAsyncOperationEventsCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Fires pending <code>asyncOperationStarted</code> events (if any), as if a debugger stepping session has just been started. - /// </summary> - [Command(ProtocolName.Debugger.FlushAsyncOperationEvents)] - [SupportedBy("Chrome")] - public class FlushAsyncOperationEventsCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/FlushAsyncOperationEventsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/FlushAsyncOperationEventsCommandResponse.cs deleted file mode 100644 index ba46bc74f66d582e588fb3c07e9bedf43fe7bcd7..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/FlushAsyncOperationEventsCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Fires pending <code>asyncOperationStarted</code> events (if any), as if a debugger stepping session has just been started. - /// </summary> - [CommandResponse(ProtocolName.Debugger.FlushAsyncOperationEvents)] - [SupportedBy("Chrome")] - public class FlushAsyncOperationEventsCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GeneratorObjectDetails.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GeneratorObjectDetails.cs deleted file mode 100644 index 7e7f00eb3ec061f7432a1ad48ff99ad3547b50a9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GeneratorObjectDetails.cs +++ /dev/null @@ -1,31 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Information about the generator object. - /// </summary> - [SupportedBy("Chrome")] - public class GeneratorObjectDetails - { - /// <summary> - /// Gets or sets Generator function. - /// </summary> - public Runtime.RemoteObject Function { get; set; } - /// <summary> - /// Gets or sets Name of the generator function. - /// </summary> - public string FunctionName { get; set; } - /// <summary> - /// Gets or sets Current generator object status. - /// </summary> - public string Status { get; set; } - /// <summary> - /// Gets or sets If suspended, location where generator function was suspended (e.g. location of the last 'yield'). Otherwise, location of the generator function. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetBacktraceCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetBacktraceCommand.cs deleted file mode 100644 index e55e6171288d62d68ffb1d7047318a1c14ddf07e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetBacktraceCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns call stack including variables changed since VM was paused. VM must be paused. - /// </summary> - [Command(ProtocolName.Debugger.GetBacktrace)] - [SupportedBy("Chrome")] - public class GetBacktraceCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetBacktraceCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetBacktraceCommandResponse.cs deleted file mode 100644 index 56d99cb9834c76794daba0f328014e5ca9faf2b5..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetBacktraceCommandResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns call stack including variables changed since VM was paused. VM must be paused. - /// </summary> - [CommandResponse(ProtocolName.Debugger.GetBacktrace)] - [SupportedBy("Chrome")] - public class GetBacktraceCommandResponse - { - /// <summary> - /// Gets or sets Call stack the virtual machine stopped on. - /// </summary> - public CallFrame[] CallFrames { get; set; } - /// <summary> - /// Gets or sets Async stack trace, if any. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public StackTrace AsyncStackTrace { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetCollectionEntriesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetCollectionEntriesCommandResponse.cs deleted file mode 100644 index 14251d294d0d3a9a6aed73ccdaf8d71550c393cc..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetCollectionEntriesCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns entries of given collection. - /// </summary> - [CommandResponse(ProtocolName.Debugger.GetCollectionEntries)] - [SupportedBy("Chrome")] - public class GetCollectionEntriesCommandResponse - { - /// <summary> - /// Gets or sets Array of collection entries. - /// </summary> - public CollectionEntry[] Entries { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetFunctionDetailsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetFunctionDetailsCommand.cs deleted file mode 100644 index af920c25f671d362de5f158137cd0a411f17407e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetFunctionDetailsCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns detailed information on given function. - /// </summary> - [Command(ProtocolName.Debugger.GetFunctionDetails)] - [SupportedBy("Chrome")] - public class GetFunctionDetailsCommand - { - /// <summary> - /// Gets or sets Id of the function to get details for. - /// </summary> - public string FunctionId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetFunctionDetailsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetFunctionDetailsCommandResponse.cs deleted file mode 100644 index 510c66c2b50c184ff54e2ecd17feca8770803092..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetFunctionDetailsCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns detailed information on given function. - /// </summary> - [CommandResponse(ProtocolName.Debugger.GetFunctionDetails)] - [SupportedBy("Chrome")] - public class GetFunctionDetailsCommandResponse - { - /// <summary> - /// Gets or sets Information about the function. - /// </summary> - public FunctionDetails Details { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetGeneratorObjectDetailsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetGeneratorObjectDetailsCommand.cs deleted file mode 100644 index ed06491da13bd20f6153de405d8da1be4e11c73a..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetGeneratorObjectDetailsCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns detailed information on given generator object. - /// </summary> - [Command(ProtocolName.Debugger.GetGeneratorObjectDetails)] - [SupportedBy("Chrome")] - public class GetGeneratorObjectDetailsCommand - { - /// <summary> - /// Gets or sets Id of the generator object to get details for. - /// </summary> - public string ObjectId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetGeneratorObjectDetailsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetGeneratorObjectDetailsCommandResponse.cs deleted file mode 100644 index 4a6c37ab54bbc06b26a28b769003d1da4c11505b..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetGeneratorObjectDetailsCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns detailed information on given generator object. - /// </summary> - [CommandResponse(ProtocolName.Debugger.GetGeneratorObjectDetails)] - [SupportedBy("Chrome")] - public class GetGeneratorObjectDetailsCommandResponse - { - /// <summary> - /// Gets or sets Information about the generator object. - /// </summary> - public GeneratorObjectDetails Details { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..75c124b212a62c2d798c7da048ff88476a86096d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommand.cs @@ -0,0 +1,29 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + /// </summary> + [Command(ProtocolName.Debugger.GetPossibleBreakpoints)] + [SupportedBy("Chrome")] + public class GetPossibleBreakpointsCommand: ICommand<GetPossibleBreakpointsCommandResponse> + { + /// <summary> + /// Gets or sets Start of range to search possible breakpoint locations in. + /// </summary> + public Location Start { get; set; } + /// <summary> + /// Gets or sets End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Location End { get; set; } + /// <summary> + /// Gets or sets Only consider locations which are in the same (non-nested) function as start. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? RestrictToFunction { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a638224d38b151b2a221828eab3f9c7a2bbf81a5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPossibleBreakpointsCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + /// </summary> + [CommandResponse(ProtocolName.Debugger.GetPossibleBreakpoints)] + [SupportedBy("Chrome")] + public class GetPossibleBreakpointsCommandResponse + { + /// <summary> + /// Gets or sets List of the possible breakpoint locations. + /// </summary> + public BreakLocation[] Locations { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromiseByIdCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromiseByIdCommand.cs deleted file mode 100644 index 06135f86e3e3e45cb5b9c809d2487fb7e0bc09e3..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromiseByIdCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns <code>Promise</code> with specified ID. - /// </summary> - [Command(ProtocolName.Debugger.GetPromiseById)] - [SupportedBy("Chrome")] - public class GetPromiseByIdCommand - { - /// <summary> - /// Gets or sets PromiseId - /// </summary> - public long PromiseId { get; set; } - /// <summary> - /// Gets or sets Symbolic group name that can be used to release multiple objects. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectGroup { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromiseByIdCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromiseByIdCommandResponse.cs deleted file mode 100644 index 61f84da425ec848f9f1fa4824a8f00b78a359efc..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromiseByIdCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns <code>Promise</code> with specified ID. - /// </summary> - [CommandResponse(ProtocolName.Debugger.GetPromiseById)] - [SupportedBy("Chrome")] - public class GetPromiseByIdCommandResponse - { - /// <summary> - /// Gets or sets Object wrapper for <code>Promise</code> with specified ID, if any. - /// </summary> - public Runtime.RemoteObject Promise { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromisesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromisesCommand.cs deleted file mode 100644 index 5804ca2d97144cb593a279a77f980c95dff83e87..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromisesCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns detailed information about all <code>Promise</code>s that were created or updated after the <code>enablePromiseTracker</code> command, and have not been garbage collected yet. - /// </summary> - [Command(ProtocolName.Debugger.GetPromises)] - [SupportedBy("Chrome")] - public class GetPromisesCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromisesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromisesCommandResponse.cs deleted file mode 100644 index 2ca56745da07dc499cc06aa716b695512a8943d1..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetPromisesCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Returns detailed information about all <code>Promise</code>s that were created or updated after the <code>enablePromiseTracker</code> command, and have not been garbage collected yet. - /// </summary> - [CommandResponse(ProtocolName.Debugger.GetPromises)] - [SupportedBy("Chrome")] - public class GetPromisesCommandResponse - { - /// <summary> - /// Gets or sets Information about stored promises. - /// </summary> - public PromiseDetails[] Promises { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetScriptSourceCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetScriptSourceCommand.cs index 5873ee4b5944b7a7753dcb25f42315f916b491f7..a031353ece4f3438109ba7852957ae23598e6bca 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetScriptSourceCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetScriptSourceCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.GetScriptSource)] [SupportedBy("Chrome")] - public class GetScriptSourceCommand + public class GetScriptSourceCommand: ICommand<GetScriptSourceCommandResponse> { /// <summary> /// Gets or sets Id of the script to get source for. diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetStepInPositionsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetStepInPositionsCommand.cs deleted file mode 100644 index 1d76aed45bc52583d5dd34613b0b49ffcfa1e897..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetStepInPositionsCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Lists all positions where step-in is possible for a current statement in a specified call frame - /// </summary> - [Command(ProtocolName.Debugger.GetStepInPositions)] - [SupportedBy("Chrome")] - public class GetStepInPositionsCommand - { - /// <summary> - /// Gets or sets Id of a call frame where the current statement should be analized - /// </summary> - public string CallFrameId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetStepInPositionsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GetStepInPositionsCommandResponse.cs deleted file mode 100644 index 80d671937f286c03f4959ad83636b8bff6aa4c9f..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetStepInPositionsCommandResponse.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Lists all positions where step-in is possible for a current statement in a specified call frame - /// </summary> - [CommandResponse(ProtocolName.Debugger.GetStepInPositions)] - [SupportedBy("Chrome")] - public class GetStepInPositionsCommandResponse - { - /// <summary> - /// Gets or sets experimental - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Location[] StepInPositions { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GlobalObjectClearedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/GlobalObjectClearedEvent.cs deleted file mode 100644 index 25a4e379f57508c8ec96daeeb38d9b3a7f5a5be2..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GlobalObjectClearedEvent.cs +++ /dev/null @@ -1,13 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload. - /// </summary> - [Event(ProtocolName.Debugger.GlobalObjectCleared)] - [SupportedBy("Chrome")] - public class GlobalObjectClearedEvent - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/PauseCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/PauseCommand.cs index 037029570f9809e444f745798fff31f480f4f61d..ecbab66a3a6f82da75a302dd482e45774fdd8583 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/PauseCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/PauseCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.Pause)] [SupportedBy("Chrome")] - public class PauseCommand + public class PauseCommand: ICommand<PauseCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/PausedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/PausedEvent.cs index 8f17fb56e284a0307fe0017e09614282564ca810..fc7d6cb9d46dd9c7760aae101c31397825301e63 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/PausedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/PausedEvent.cs @@ -31,6 +31,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// Gets or sets Async stack trace, if any. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public StackTrace AsyncStackTrace { get; set; } + public Runtime.StackTrace AsyncStackTrace { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/PromiseDetails.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/PromiseDetails.cs deleted file mode 100644 index 311ccf3accfbeb72722a2a31c1967862df13a14b..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/PromiseDetails.cs +++ /dev/null @@ -1,62 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Information about the promise. - /// </summary> - [SupportedBy("Chrome")] - public class PromiseDetails - { - /// <summary> - /// Gets or sets Unique id of the promise. - /// </summary> - public long Id { get; set; } - /// <summary> - /// Gets or sets Status of the promise. - /// </summary> - public string Status { get; set; } - /// <summary> - /// Gets or sets Id of the parent promise. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? ParentId { get; set; } - /// <summary> - /// Gets or sets Top call frame on promise creation. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.CallFrame CallFrame { get; set; } - /// <summary> - /// Gets or sets Creation time of the promise. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public double CreationTime { get; set; } - /// <summary> - /// Gets or sets Settlement time of the promise. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public double SettlementTime { get; set; } - /// <summary> - /// Gets or sets JavaScript stack trace on promise creation. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.CallFrame[] CreationStack { get; set; } - /// <summary> - /// Gets or sets JavaScript asynchronous stack trace on promise creation, if available. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.AsyncStackTrace AsyncCreationStack { get; set; } - /// <summary> - /// Gets or sets JavaScript stack trace on promise settlement. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.CallFrame[] SettlementStack { get; set; } - /// <summary> - /// Gets or sets JavaScript asynchronous stack trace on promise settlement, if available. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.AsyncStackTrace AsyncSettlementStack { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/PromiseUpdatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/PromiseUpdatedEvent.cs deleted file mode 100644 index 6bb1d8fd055a13b5bb5f243b666c145725b1a84e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/PromiseUpdatedEvent.cs +++ /dev/null @@ -1,21 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Fired when a <code>Promise</code> is created, updated or garbage collected. - /// </summary> - [Event(ProtocolName.Debugger.PromiseUpdated)] - [SupportedBy("Chrome")] - public class PromiseUpdatedEvent - { - /// <summary> - /// Gets or sets Type of the event. - /// </summary> - public string EventType { get; set; } - /// <summary> - /// Gets or sets Information about the updated <code>Promise</code>. - /// </summary> - public PromiseDetails Promise { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveAsyncOperationBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveAsyncOperationBreakpointCommand.cs deleted file mode 100644 index 1bd8d992709e8e4ff6307762e340efdaa64d07da..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveAsyncOperationBreakpointCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Removes AsyncOperation breakpoint. - /// </summary> - [Command(ProtocolName.Debugger.RemoveAsyncOperationBreakpoint)] - [SupportedBy("Chrome")] - public class RemoveAsyncOperationBreakpointCommand - { - /// <summary> - /// Gets or sets ID of the async operation to remove breakpoint for. - /// </summary> - public long OperationId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveAsyncOperationBreakpointCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveAsyncOperationBreakpointCommandResponse.cs deleted file mode 100644 index c4380d218b7bcacf06cb079db83618a75711645b..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveAsyncOperationBreakpointCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Removes AsyncOperation breakpoint. - /// </summary> - [CommandResponse(ProtocolName.Debugger.RemoveAsyncOperationBreakpoint)] - [SupportedBy("Chrome")] - public class RemoveAsyncOperationBreakpointCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveBreakpointCommand.cs index 99a401e2af56d196e6cef08ee636a6471b5b55b8..c841b84f9a573ca1e3d86fdc71a0c16ab0d23c73 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/RemoveBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.RemoveBreakpoint)] [SupportedBy("Chrome")] - public class RemoveBreakpointCommand + public class RemoveBreakpointCommand: ICommand<RemoveBreakpointCommandResponse> { /// <summary> /// Gets or sets BreakpointId diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommand.cs index bad86b731c81553d71fea43cb286b53de152444e..c11f5e8619413500e0acb54f7716159a843af4e6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.RestartFrame)] [SupportedBy("Chrome")] - public class RestartFrameCommand + public class RestartFrameCommand: ICommand<RestartFrameCommandResponse> { /// <summary> /// Gets or sets Call frame identifier to evaluate on. diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommandResponse.cs index 3df7b7b592459160cc033fb5b2c5754bad46bf15..8d621088936f4203a47bfaa2f8eef94e87813867 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/RestartFrameCommandResponse.cs @@ -16,13 +16,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> public CallFrame[] CallFrames { get; set; } /// <summary> - /// Gets or sets VM-specific description. - /// </summary> - public object Result { get; set; } - /// <summary> /// Gets or sets Async stack trace, if any. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public StackTrace AsyncStackTrace { get; set; } + public Runtime.StackTrace AsyncStackTrace { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ResumeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ResumeCommand.cs index e3a148384a893ed6974584a418d4ea55ae26a61d..7b4841117b71670a31d263b89857f3756db05052 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ResumeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ResumeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.Resume)] [SupportedBy("Chrome")] - public class ResumeCommand + public class ResumeCommand: ICommand<ResumeCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/RunScriptCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/RunScriptCommand.cs deleted file mode 100644 index 5c786b7e2057f887450767067c90820d808a7bbe..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/RunScriptCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Runs script with given id in a given context. - /// </summary> - [Command(ProtocolName.Debugger.RunScript)] - [SupportedBy("Chrome")] - public class RunScriptCommand - { - /// <summary> - /// Gets or sets Id of the script to run. - /// </summary> - public string ScriptId { get; set; } - /// <summary> - /// Gets or sets Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? ExecutionContextId { get; set; } - /// <summary> - /// Gets or sets Symbolic group name that can be used to release multiple objects. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectGroup { get; set; } - /// <summary> - /// Gets or sets Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? DoNotPauseOnExceptionsAndMuteConsole { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScheduleStepIntoAsyncCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScheduleStepIntoAsyncCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..240824485de2fa047860039869aba9026e37648f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScheduleStepIntoAsyncCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + /// </summary> + [Command(ProtocolName.Debugger.ScheduleStepIntoAsync)] + [SupportedBy("Chrome")] + public class ScheduleStepIntoAsyncCommand: ICommand<ScheduleStepIntoAsyncCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScheduleStepIntoAsyncCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScheduleStepIntoAsyncCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..e6e5967d9f3c3a7cae31dd72613adfa919dfa5f3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScheduleStepIntoAsyncCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + /// </summary> + [CommandResponse(ProtocolName.Debugger.ScheduleStepIntoAsync)] + [SupportedBy("Chrome")] + public class ScheduleStepIntoAsyncCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/Scope.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/Scope.cs index 58a0d7f27245c75b186deee1df65558b244f3272..45f6ebc2a8d27047e8132bf99495747f5486e43a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/Scope.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/Scope.cs @@ -18,5 +18,20 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// Gets or sets Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. /// </summary> public Runtime.RemoteObject Object { get; set; } + /// <summary> + /// Gets or sets Name + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + /// <summary> + /// Gets or sets Location in the source code where scope starts + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Location StartLocation { get; set; } + /// <summary> + /// Gets or sets Location in the source code where scope ends + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Location EndLocation { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs index e963b42bbc0560a1c7bfa6abdcc1bbf5ca6d15db..a776ff476df82ee4f69ccb78f9c7039f60a3e107 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptFailedToParseEvent.cs @@ -34,15 +34,18 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> public long EndColumn { get; set; } /// <summary> - /// Gets or sets Determines whether this script is a user extension script. + /// Gets or sets Specifies script creation context. /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsContentScript { get; set; } + public long ExecutionContextId { get; set; } + /// <summary> + /// Gets or sets Content hash of the script. + /// </summary> + public string Hash { get; set; } /// <summary> - /// Gets or sets Determines whether this script is an internal script. + /// Gets or sets Embedder-specific auxiliary data. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsInternalScript { get; set; } + public object ExecutionContextAuxData { get; set; } /// <summary> /// Gets or sets URL of source map associated with script (if any). /// </summary> @@ -53,5 +56,20 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? HasSourceURL { get; set; } + /// <summary> + /// Gets or sets True, if this script is ES6 module. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IsModule { get; set; } + /// <summary> + /// Gets or sets This script length. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Length { get; set; } + /// <summary> + /// Gets or sets JavaScript top stack frame of where the script parsed event was triggered if available. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.StackTrace StackTrace { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs index bb53716100c874373740b63c89b306b6100482ce..bf7dbea2410b715e97f2f6b34a0923b424dc8bb5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptParsedEvent.cs @@ -34,15 +34,23 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> public long EndColumn { get; set; } /// <summary> - /// Gets or sets Determines whether this script is a user extension script. + /// Gets or sets Specifies script creation context. + /// </summary> + public long ExecutionContextId { get; set; } + /// <summary> + /// Gets or sets Content hash of the script. + /// </summary> + public string Hash { get; set; } + /// <summary> + /// Gets or sets Embedder-specific auxiliary data. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsContentScript { get; set; } + public object ExecutionContextAuxData { get; set; } /// <summary> - /// Gets or sets Determines whether this script is an internal script. + /// Gets or sets True, if this script is generated as a result of the live edit operation. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsInternalScript { get; set; } + public bool? IsLiveEdit { get; set; } /// <summary> /// Gets or sets URL of source map associated with script (if any). /// </summary> @@ -53,5 +61,20 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? HasSourceURL { get; set; } + /// <summary> + /// Gets or sets True, if this script is ES6 module. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IsModule { get; set; } + /// <summary> + /// Gets or sets This script length. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Length { get; set; } + /// <summary> + /// Gets or sets JavaScript top stack frame of where the script parsed event was triggered if available. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.StackTrace StackTrace { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetCollectionEntriesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptPosition.cs similarity index 51% rename from source/ChromeDevTools/Protocol/Chrome/Debugger/GetCollectionEntriesCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptPosition.cs index b5c990f5cb9663e3b35976b05457b3006fdfce56..d80265c6614acc8adacb8792da50cd618fe661aa 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/GetCollectionEntriesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/ScriptPosition.cs @@ -5,15 +5,18 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger { /// <summary> - /// Returns entries of given collection. + /// Location in the source code. /// </summary> - [Command(ProtocolName.Debugger.GetCollectionEntries)] [SupportedBy("Chrome")] - public class GetCollectionEntriesCommand + public class ScriptPosition { /// <summary> - /// Gets or sets Id of the collection to get entries for. + /// Gets or sets LineNumber /// </summary> - public string ObjectId { get; set; } + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets ColumnNumber + /// </summary> + public long ColumnNumber { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SearchInContentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SearchInContentCommand.cs index f5d7e228aa1d31543468cefec803ea4b3b97f17f..8f1238981f9487ca4894d59086cb06728f326d65 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SearchInContentCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SearchInContentCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SearchInContent)] [SupportedBy("Chrome")] - public class SearchInContentCommand + public class SearchInContentCommand: ICommand<SearchInContentCommandResponse> { /// <summary> /// Gets or sets Id of the script to search in. diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncCallStackDepthCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncCallStackDepthCommand.cs index dcdb20df005563e3b4459971f96af7493e58edda..314240dbac5733482742d7c53de5d4fc3a3ea186 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncCallStackDepthCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncCallStackDepthCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SetAsyncCallStackDepth)] [SupportedBy("Chrome")] - public class SetAsyncCallStackDepthCommand + public class SetAsyncCallStackDepthCommand: ICommand<SetAsyncCallStackDepthCommandResponse> { /// <summary> /// Gets or sets Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default). diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncOperationBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncOperationBreakpointCommand.cs deleted file mode 100644 index 8767bec8367bc9236c5c58d046c52ea5ca22e457..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncOperationBreakpointCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Sets breakpoint on AsyncOperation callback handler. - /// </summary> - [Command(ProtocolName.Debugger.SetAsyncOperationBreakpoint)] - [SupportedBy("Chrome")] - public class SetAsyncOperationBreakpointCommand - { - /// <summary> - /// Gets or sets ID of the async operation to set breakpoint for. - /// </summary> - public long OperationId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncOperationBreakpointCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncOperationBreakpointCommandResponse.cs deleted file mode 100644 index 63c807b5a982b50bd4dfe9cdff42f1b109153a5a..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetAsyncOperationBreakpointCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Sets breakpoint on AsyncOperation callback handler. - /// </summary> - [CommandResponse(ProtocolName.Debugger.SetAsyncOperationBreakpoint)] - [SupportedBy("Chrome")] - public class SetAsyncOperationBreakpointCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxPatternsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxPatternsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..33de1549210e4b586674495fd69137d7b600184f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxPatternsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + /// </summary> + [Command(ProtocolName.Debugger.SetBlackboxPatterns)] + [SupportedBy("Chrome")] + public class SetBlackboxPatternsCommand: ICommand<SetBlackboxPatternsCommandResponse> + { + /// <summary> + /// Gets or sets Array of regexps that will be used to check script url for blackbox state. + /// </summary> + public string[] Patterns { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxPatternsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxPatternsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..845823e0a61f43c091bdf72d2e7d4cdd01d919d1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxPatternsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetBlackboxPatterns)] + [SupportedBy("Chrome")] + public class SetBlackboxPatternsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxedRangesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxedRangesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4a662caf286c8ba58c7ac31ed6e059e8a3573652 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxedRangesCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + /// </summary> + [Command(ProtocolName.Debugger.SetBlackboxedRanges)] + [SupportedBy("Chrome")] + public class SetBlackboxedRangesCommand: ICommand<SetBlackboxedRangesCommandResponse> + { + /// <summary> + /// Gets or sets Id of the script. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets Positions + /// </summary> + public ScriptPosition[] Positions { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxedRangesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxedRangesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5328b5631b6338dbc2eeaf100de519433f7b61ab --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBlackboxedRangesCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +{ + /// <summary> + /// Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + /// </summary> + [CommandResponse(ProtocolName.Debugger.SetBlackboxedRanges)] + [SupportedBy("Chrome")] + public class SetBlackboxedRangesCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointByUrlCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointByUrlCommand.cs index 5f0c8992e2233b28a3f42347400d0d27a38c6c85..da7207fcf3f3ce50b904809338b18f382a72ffed 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointByUrlCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointByUrlCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SetBreakpointByUrl)] [SupportedBy("Chrome")] - public class SetBreakpointByUrlCommand + public class SetBreakpointByUrlCommand: ICommand<SetBreakpointByUrlCommandResponse> { /// <summary> /// Gets or sets Line number to set breakpoint at. diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointCommand.cs index 5cafedd0a4f7114878d26300acd42346199eae78..09a2dcf3826063d3c233fd601802d4a6da96003f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SetBreakpoint)] [SupportedBy("Chrome")] - public class SetBreakpointCommand + public class SetBreakpointCommand: ICommand<SetBreakpointCommandResponse> { /// <summary> /// Gets or sets Location to set breakpoint in. diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointsActiveCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointsActiveCommand.cs index acdb2c851a5a90b8e8c0485aab65e961e94b8003..b93daf0f399df381c7c962e44a8e69511442e188 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointsActiveCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetBreakpointsActiveCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SetBreakpointsActive)] [SupportedBy("Chrome")] - public class SetBreakpointsActiveCommand + public class SetBreakpointsActiveCommand: ICommand<SetBreakpointsActiveCommandResponse> { /// <summary> /// Gets or sets New value for breakpoints active state. diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetPauseOnExceptionsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetPauseOnExceptionsCommand.cs index 480b053e8547afa19d59c574c7504102e5b3f352..815e85d47dded584232ed852dcf7de21af3dad6e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetPauseOnExceptionsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetPauseOnExceptionsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SetPauseOnExceptions)] [SupportedBy("Chrome")] - public class SetPauseOnExceptionsCommand + public class SetPauseOnExceptionsCommand: ICommand<SetPauseOnExceptionsCommandResponse> { /// <summary> /// Gets or sets Pause on exceptions mode. diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommand.cs index b1b9a3d430839711b6ed458ab8eb65368618cef1..8af5fae1a546f5f2b138c95a9a04e60148cf5217 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SetScriptSource)] [SupportedBy("Chrome")] - public class SetScriptSourceCommand + public class SetScriptSourceCommand: ICommand<SetScriptSourceCommandResponse> { /// <summary> /// Gets or sets Id of the script to edit. @@ -20,9 +20,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> public string ScriptSource { get; set; } /// <summary> - /// Gets or sets If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code. + /// Gets or sets If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? Preview { get; set; } + public bool? DryRun { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommandResponse.cs index 6fc0b8c9b4d9961c06fbd023401fa75847ea8f68..33a9acdd7b1aa669def5990212b969dfefaf520d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceCommandResponse.cs @@ -17,14 +17,19 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public CallFrame[] CallFrames { get; set; } /// <summary> - /// Gets or sets VM-specific description of the changes applied. + /// Gets or sets Whether current call stack was modified after applying the changes. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public object Result { get; set; } + public bool? StackChanged { get; set; } /// <summary> /// Gets or sets Async stack trace, if any. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public StackTrace AsyncStackTrace { get; set; } + public Runtime.StackTrace AsyncStackTrace { get; set; } + /// <summary> + /// Gets or sets Exception details if any. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.ExceptionDetails ExceptionDetails { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceError.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceError.cs deleted file mode 100644 index 1c14f6da19d57af148e7f741d00ce5902cecc6bd..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetScriptSourceError.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Error data for setScriptSource command. compileError is a case type for uncompilable script source error. - /// </summary> - [SupportedBy("Chrome")] - public class SetScriptSourceError - { - /// <summary> - /// Gets or sets CompileError - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public object CompileError { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetSkipAllPausesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetSkipAllPausesCommand.cs index 4bebcd75525f3e0c9ae285428d09f3cfff3b5fb7..f8a05b4768528ba7f143199b434b93bb96a863fa 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetSkipAllPausesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetSkipAllPausesCommand.cs @@ -9,11 +9,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.SetSkipAllPauses)] [SupportedBy("Chrome")] - public class SetSkipAllPausesCommand + public class SetSkipAllPausesCommand: ICommand<SetSkipAllPausesCommandResponse> { /// <summary> /// Gets or sets New value for skip pauses state. /// </summary> - public bool Skipped { get; set; } + public bool Skip { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommand.cs index d515cc4f091e9dc07a6b611019d8ba3b504a4b02..580406b751ea23cdece1aeda35f888ecea08c163 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommand.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger { /// <summary> - /// Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually. + /// Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. /// </summary> [Command(ProtocolName.Debugger.SetVariableValue)] [SupportedBy("Chrome")] - public class SetVariableValueCommand + public class SetVariableValueCommand: ICommand<SetVariableValueCommandResponse> { /// <summary> /// Gets or sets 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. @@ -26,12 +26,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// <summary> /// Gets or sets Id of callframe that holds variable. /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string CallFrameId { get; set; } - /// <summary> - /// Gets or sets Object id of closure (function) that holds variable. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string FunctionObjectId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommandResponse.cs index 01b6d161e7566779502307fe55f125a1e3ae284b..0d83753a05255dff705ed8f6b8bcce0a9d7f5d18 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/SetVariableValueCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger { /// <summary> - /// Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually. + /// Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. /// </summary> [CommandResponse(ProtocolName.Debugger.SetVariableValue)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SkipStackFramesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SkipStackFramesCommand.cs deleted file mode 100644 index 598829371daf350e731fa9cb447cdd482e71f494..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SkipStackFramesCommand.cs +++ /dev/null @@ -1,25 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - /// </summary> - [Command(ProtocolName.Debugger.SkipStackFrames)] - [SupportedBy("Chrome")] - public class SkipStackFramesCommand - { - /// <summary> - /// Gets or sets Regular expression defining the scripts to ignore while stepping. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Script { get; set; } - /// <summary> - /// Gets or sets True, if all content scripts should be ignored. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? SkipContentScripts { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/SkipStackFramesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/SkipStackFramesCommandResponse.cs deleted file mode 100644 index c9ea0d1eebede40d830b3f6d3c4b64b3474faff6..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/SkipStackFramesCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - /// </summary> - [CommandResponse(ProtocolName.Debugger.SkipStackFrames)] - [SupportedBy("Chrome")] - public class SkipStackFramesCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoAsyncCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoAsyncCommand.cs deleted file mode 100644 index 8eb8649e6ff5f565af3642d092fdd223d7554b93..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoAsyncCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Steps into the first async operation handler that was scheduled by or after the current statement. - /// </summary> - [Command(ProtocolName.Debugger.StepIntoAsync)] - [SupportedBy("Chrome")] - public class StepIntoAsyncCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoAsyncCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoAsyncCommandResponse.cs deleted file mode 100644 index f74ddff0d23a44a4deffd976a90af533d770b039..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoAsyncCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger -{ - /// <summary> - /// Steps into the first async operation handler that was scheduled by or after the current statement. - /// </summary> - [CommandResponse(ProtocolName.Debugger.StepIntoAsync)] - [SupportedBy("Chrome")] - public class StepIntoAsyncCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoCommand.cs index f7263b35eba807f9b5ee1b01e9d3942c8ba21c81..607694c5af2872c97fd60dd66e98e7b08a405f44 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepIntoCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.StepInto)] [SupportedBy("Chrome")] - public class StepIntoCommand + public class StepIntoCommand: ICommand<StepIntoCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOutCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOutCommand.cs index 5b65d4a0c95cb0bd11c0a35dc857e9390a74b093..3e49c2feca93a704c74705a9bd65b979dceb6b71 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOutCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOutCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.StepOut)] [SupportedBy("Chrome")] - public class StepOutCommand + public class StepOutCommand: ICommand<StepOutCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOverCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOverCommand.cs index 65daa3e2c6ebe8f0ea6efa197e75ee92739764d5..bfecf2e25f9c9be329b8f6744c5d63e136d23b80 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOverCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Debugger/StepOverCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> [Command(ProtocolName.Debugger.StepOver)] [SupportedBy("Chrome")] - public class StepOverCommand + public class StepOverCommand: ICommand<StepOverCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/ClearDeviceOrientationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/ClearDeviceOrientationOverrideCommand.cs index 62bf4f5a9e1e8049d4056a966020996317ee88f3..95bae6a1866cb59c33eefb5a2ae07304e16d1bae 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/ClearDeviceOrientationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/ClearDeviceOrientationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DeviceOrientation /// </summary> [Command(ProtocolName.DeviceOrientation.ClearDeviceOrientationOverride)] [SupportedBy("Chrome")] - public class ClearDeviceOrientationOverrideCommand + public class ClearDeviceOrientationOverrideCommand: ICommand<ClearDeviceOrientationOverrideCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/SetDeviceOrientationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/SetDeviceOrientationOverrideCommand.cs index 3af33ab02832d80277cb5419701477ad0baae11d..bb9b4c0478ca78de4449d4372cb86bf55370a703 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/SetDeviceOrientationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/DeviceOrientation/SetDeviceOrientationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DeviceOrientation /// </summary> [Command(ProtocolName.DeviceOrientation.SetDeviceOrientationOverride)] [SupportedBy("Chrome")] - public class SetDeviceOrientationOverrideCommand + public class SetDeviceOrientationOverrideCommand: ICommand<SetDeviceOrientationOverrideCommandResponse> { /// <summary> /// Gets or sets Mock alpha diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/CanEmulateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/CanEmulateCommand.cs index 139ccb7c89067d87a17a686a23c5568d244ec84f..498e7dddc27d540d5a22bc4d4aa891343c3406e1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/CanEmulateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/CanEmulateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.CanEmulate)] [SupportedBy("Chrome")] - public class CanEmulateCommand + public class CanEmulateCommand: ICommand<CanEmulateCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearDeviceMetricsOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearDeviceMetricsOverrideCommand.cs index 20e690f318d69f6920c390066605e57e2f7b1065..e77d07b539460442a209fc48803c2205b64fe19f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearDeviceMetricsOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearDeviceMetricsOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.ClearDeviceMetricsOverride)] [SupportedBy("Chrome")] - public class ClearDeviceMetricsOverrideCommand + public class ClearDeviceMetricsOverrideCommand: ICommand<ClearDeviceMetricsOverrideCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearGeolocationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearGeolocationOverrideCommand.cs index ce05f8313fb3a390dd1034c4088d118e9c62bfc2..459febd92d0b6486b8801ca200ef7ec047699c84 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearGeolocationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ClearGeolocationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.ClearGeolocationOverride)] [SupportedBy("Chrome")] - public class ClearGeolocationOverrideCommand + public class ClearGeolocationOverrideCommand: ICommand<ClearGeolocationOverrideCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ForceViewportCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ForceViewportCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f33be9cda661154dd8634053387bd253fef0468d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ForceViewportCommand.cs @@ -0,0 +1,27 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame. + /// </summary> + [Command(ProtocolName.Emulation.ForceViewport)] + [SupportedBy("Chrome")] + public class ForceViewportCommand: ICommand<ForceViewportCommandResponse> + { + /// <summary> + /// Gets or sets X coordinate of top-left corner of the area (CSS pixels). + /// </summary> + public double X { get; set; } + /// <summary> + /// Gets or sets Y coordinate of top-left corner of the area (CSS pixels). + /// </summary> + public double Y { get; set; } + /// <summary> + /// Gets or sets Scale to apply to the area (relative to a page scale of 1.0). + /// </summary> + public double Scale { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ForceViewportCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ForceViewportCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8e99770aae53a547e191d8de163c0231ef4b2189 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ForceViewportCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame. + /// </summary> + [CommandResponse(ProtocolName.Emulation.ForceViewport)] + [SupportedBy("Chrome")] + public class ForceViewportCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetScrollAndPageScaleFactorCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetPageScaleFactorCommand.cs similarity index 50% rename from source/ChromeDevTools/Protocol/Chrome/Emulation/ResetScrollAndPageScaleFactorCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Emulation/ResetPageScaleFactorCommand.cs index bf5c02fc71b874186333fa6d1073aa9559503cc8..a8658e8c4a683a3a66f492edfd7237d8c90dfa27 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetScrollAndPageScaleFactorCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetPageScaleFactorCommand.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation { /// <summary> - /// Requests that scroll offsets and page scale factor are reset to initial values. + /// Requests that page scale factor is reset to initial values. /// </summary> - [CommandResponse(ProtocolName.Emulation.ResetScrollAndPageScaleFactor)] + [Command(ProtocolName.Emulation.ResetPageScaleFactor)] [SupportedBy("Chrome")] - public class ResetScrollAndPageScaleFactorCommandResponse + public class ResetPageScaleFactorCommand: ICommand<ResetPageScaleFactorCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetScrollAndPageScaleFactorCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetPageScaleFactorCommandResponse.cs similarity index 52% rename from source/ChromeDevTools/Protocol/Chrome/Emulation/ResetScrollAndPageScaleFactorCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Emulation/ResetPageScaleFactorCommandResponse.cs index aad69b72192714ced50d9776b8356ede9482d69e..79efddea2d6d777dcf57abedec558eefbace9ce1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetScrollAndPageScaleFactorCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetPageScaleFactorCommandResponse.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation { /// <summary> - /// Requests that scroll offsets and page scale factor are reset to initial values. + /// Requests that page scale factor is reset to initial values. /// </summary> - [Command(ProtocolName.Emulation.ResetScrollAndPageScaleFactor)] + [CommandResponse(ProtocolName.Emulation.ResetPageScaleFactor)] [SupportedBy("Chrome")] - public class ResetScrollAndPageScaleFactorCommand + public class ResetPageScaleFactorCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetViewportCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetViewportCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..551178edcf918139855754ed32ee2da36e6ff869 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetViewportCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Resets the visible area of the page to the original viewport, undoing any effects of the <code>forceViewport</code> command. + /// </summary> + [Command(ProtocolName.Emulation.ResetViewport)] + [SupportedBy("Chrome")] + public class ResetViewportCommand: ICommand<ResetViewportCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetViewportCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetViewportCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a044f889888dbd539c9c0de74ff87e6230f9f5d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ResetViewportCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Resets the visible area of the page to the original viewport, undoing any effects of the <code>forceViewport</code> command. + /// </summary> + [CommandResponse(ProtocolName.Emulation.ResetViewport)] + [SupportedBy("Chrome")] + public class ResetViewportCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ScreenOrientation.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ScreenOrientation.cs new file mode 100644 index 0000000000000000000000000000000000000000..f32aa55356d52b8a6f9268b4cf581879275ebd28 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/ScreenOrientation.cs @@ -0,0 +1,22 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Screen orientation. + /// </summary> + [SupportedBy("Chrome")] + public class ScreenOrientation + { + /// <summary> + /// Gets or sets Orientation type. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Orientation angle. + /// </summary> + public long Angle { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetCPUThrottlingRateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetCPUThrottlingRateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4effc0b7f78c5684e3cfd3ed052e612b0eb6a763 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetCPUThrottlingRateCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Enables CPU throttling to emulate slow CPUs. + /// </summary> + [Command(ProtocolName.Emulation.SetCPUThrottlingRate)] + [SupportedBy("Chrome")] + public class SetCPUThrottlingRateCommand: ICommand<SetCPUThrottlingRateCommandResponse> + { + /// <summary> + /// Gets or sets Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). + /// </summary> + public double Rate { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetCPUThrottlingRateCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetCPUThrottlingRateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c003b34893571e243dbf55e81e775e5e27234cb2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetCPUThrottlingRateCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Enables CPU throttling to emulate slow CPUs. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetCPUThrottlingRate)] + [SupportedBy("Chrome")] + public class SetCPUThrottlingRateCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDefaultBackgroundColorOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDefaultBackgroundColorOverrideCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..75a4548e1ab1ed8383cb2efb4507b660cc86fcc6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDefaultBackgroundColorOverrideCommand.cs @@ -0,0 +1,20 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one. + /// </summary> + [Command(ProtocolName.Emulation.SetDefaultBackgroundColorOverride)] + [SupportedBy("Chrome")] + public class SetDefaultBackgroundColorOverrideCommand: ICommand<SetDefaultBackgroundColorOverrideCommandResponse> + { + /// <summary> + /// Gets or sets RGBA of the default background color. If not specified, any existing override will be cleared. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public DOM.RGBA Color { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDefaultBackgroundColorOverrideCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDefaultBackgroundColorOverrideCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b56cc2825ad128e9dc0ffc56088446ac4bcefc90 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDefaultBackgroundColorOverrideCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetDefaultBackgroundColorOverride)] + [SupportedBy("Chrome")] + public class SetDefaultBackgroundColorOverrideCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDeviceMetricsOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDeviceMetricsOverrideCommand.cs index f9f82e25f3ef861c1736bca1e9f7c2412b2cae02..22cc8ae3e662f56a3a308bb741b6928a555b9528 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDeviceMetricsOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetDeviceMetricsOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.SetDeviceMetricsOverride)] [SupportedBy("Chrome")] - public class SetDeviceMetricsOverrideCommand + public class SetDeviceMetricsOverrideCommand: ICommand<SetDeviceMetricsOverrideCommandResponse> { /// <summary> /// Gets or sets Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. @@ -37,14 +37,39 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public double Scale { get; set; } /// <summary> - /// Gets or sets X offset to shift resulting view image by. Ignored in |fitWindow| mode. + /// Gets or sets Not used. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public double OffsetX { get; set; } /// <summary> - /// Gets or sets Y offset to shift resulting view image by. Ignored in |fitWindow| mode. + /// Gets or sets Not used. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public double OffsetY { get; set; } + /// <summary> + /// Gets or sets Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ScreenWidth { get; set; } + /// <summary> + /// Gets or sets Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ScreenHeight { get; set; } + /// <summary> + /// Gets or sets Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? PositionX { get; set; } + /// <summary> + /// Gets or sets Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? PositionY { get; set; } + /// <summary> + /// Gets or sets Screen orientation override. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public ScreenOrientation ScreenOrientation { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetEmulatedMediaCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetEmulatedMediaCommand.cs index c59bf52e709c141ee9bbee0e4bfc47dd6a5323be..2b941b60d519bf52e890af9e4998e217210ba354 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetEmulatedMediaCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetEmulatedMediaCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.SetEmulatedMedia)] [SupportedBy("Chrome")] - public class SetEmulatedMediaCommand + public class SetEmulatedMediaCommand: ICommand<SetEmulatedMediaCommandResponse> { /// <summary> /// Gets or sets Media type to emulate. Empty string disables the override. diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetGeolocationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetGeolocationOverrideCommand.cs index d1ddbeb8f312cdd56d594bbed93a80e55de9c0e4..3ce412319992beb441f668214fc94fb4337bd09e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetGeolocationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetGeolocationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.SetGeolocationOverride)] [SupportedBy("Chrome")] - public class SetGeolocationOverrideCommand + public class SetGeolocationOverrideCommand: ICommand<SetGeolocationOverrideCommandResponse> { /// <summary> /// Gets or sets Mock latitude diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetPageScaleFactorCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetPageScaleFactorCommand.cs index bc0b883742e241c824b535d9841a12c9b6602068..f0e57f7bb80482383d4faa4bc01985ef9f22c959 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetPageScaleFactorCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetPageScaleFactorCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.SetPageScaleFactor)] [SupportedBy("Chrome")] - public class SetPageScaleFactorCommand + public class SetPageScaleFactorCommand: ICommand<SetPageScaleFactorCommandResponse> { /// <summary> /// Gets or sets Page scale factor. diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetScriptExecutionDisabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetScriptExecutionDisabledCommand.cs index 8c56471f5625342c302a2cb0da80bce714e4686b..bad31db4dcac2b23000edd4a218919a69f75a4c6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetScriptExecutionDisabledCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetScriptExecutionDisabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.SetScriptExecutionDisabled)] [SupportedBy("Chrome")] - public class SetScriptExecutionDisabledCommand + public class SetScriptExecutionDisabledCommand: ICommand<SetScriptExecutionDisabledCommandResponse> { /// <summary> /// Gets or sets Whether script execution should be disabled in the page. diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetTouchEmulationEnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetTouchEmulationEnabledCommand.cs index b050c23e2b3c782259f67258d0c997807952de56..cfa269b994aecd00d8f4a99bdae35472883eadd8 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetTouchEmulationEnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetTouchEmulationEnabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation /// </summary> [Command(ProtocolName.Emulation.SetTouchEmulationEnabled)] [SupportedBy("Chrome")] - public class SetTouchEmulationEnabledCommand + public class SetTouchEmulationEnabledCommand: ICommand<SetTouchEmulationEnabledCommandResponse> { /// <summary> /// Gets or sets Whether the touch event emulation should be enabled. diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVirtualTimePolicyCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVirtualTimePolicyCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5ee5996f371a739d87033e41a3555811648f56fc --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVirtualTimePolicyCommand.cs @@ -0,0 +1,24 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget. + /// </summary> + [Command(ProtocolName.Emulation.SetVirtualTimePolicy)] + [SupportedBy("Chrome")] + public class SetVirtualTimePolicyCommand: ICommand<SetVirtualTimePolicyCommandResponse> + { + /// <summary> + /// Gets or sets Policy + /// </summary> + public string Policy { get; set; } + /// <summary> + /// Gets or sets If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Budget { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVirtualTimePolicyCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVirtualTimePolicyCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..93e68a7509cfe3d8e07aabbf160ccce2adffd6c1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVirtualTimePolicyCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetVirtualTimePolicy)] + [SupportedBy("Chrome")] + public class SetVirtualTimePolicyCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVisibleSizeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVisibleSizeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..28efd57c70b410b5e4493a50faa1f89f44cca916 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVisibleSizeCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android. + /// </summary> + [Command(ProtocolName.Emulation.SetVisibleSize)] + [SupportedBy("Chrome")] + public class SetVisibleSizeCommand: ICommand<SetVisibleSizeCommandResponse> + { + /// <summary> + /// Gets or sets Frame width (DIP). + /// </summary> + public long Width { get; set; } + /// <summary> + /// Gets or sets Frame height (DIP). + /// </summary> + public long Height { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVisibleSizeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVisibleSizeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..034134d263b7754d070b71f5e4c6d0771e399fb6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/SetVisibleSizeCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android. + /// </summary> + [CommandResponse(ProtocolName.Emulation.SetVisibleSize)] + [SupportedBy("Chrome")] + public class SetVisibleSizeCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/Viewport.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/Viewport.cs deleted file mode 100644 index 9fce93b15a1e682906f096c56d0ae6cda1bc2181..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/Viewport.cs +++ /dev/null @@ -1,42 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation -{ - /// <summary> - /// Visible page viewport - /// </summary> - [SupportedBy("Chrome")] - public class Viewport - { - /// <summary> - /// Gets or sets X scroll offset in CSS pixels. - /// </summary> - public double ScrollX { get; set; } - /// <summary> - /// Gets or sets Y scroll offset in CSS pixels. - /// </summary> - public double ScrollY { get; set; } - /// <summary> - /// Gets or sets Contents width in CSS pixels. - /// </summary> - public double ContentsWidth { get; set; } - /// <summary> - /// Gets or sets Contents height in CSS pixels. - /// </summary> - public double ContentsHeight { get; set; } - /// <summary> - /// Gets or sets Page scale factor. - /// </summary> - public double PageScaleFactor { get; set; } - /// <summary> - /// Gets or sets Minimum page scale factor. - /// </summary> - public double MinimumPageScaleFactor { get; set; } - /// <summary> - /// Gets or sets Maximum page scale factor. - /// </summary> - public double MaximumPageScaleFactor { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/ViewportChangedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/ViewportChangedEvent.cs deleted file mode 100644 index 7c8758836dc5d72089d60356490f29c1163cec66..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Emulation/ViewportChangedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation -{ - /// <summary> - /// Fired when a visible page viewport has changed. Only fired when device metrics are overridden. - /// </summary> - [Event(ProtocolName.Emulation.ViewportChanged)] - [SupportedBy("Chrome")] - public class ViewportChangedEvent - { - /// <summary> - /// Gets or sets Viewport description. - /// </summary> - public Viewport Viewport { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/VirtualTimeBudgetExpiredEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/VirtualTimeBudgetExpiredEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..15d2a7c665d2e56a8c0200581165cbdbaa95132a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/VirtualTimeBudgetExpiredEvent.cs @@ -0,0 +1,13 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation +{ + /// <summary> + /// Notification sent after the virual time budget for the current VirtualTimePolicy has run out. + /// </summary> + [Event(ProtocolName.Emulation.VirtualTimeBudgetExpired)] + [SupportedBy("Chrome")] + public class VirtualTimeBudgetExpiredEvent + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Emulation/VirtualTimePolicy.cs b/source/ChromeDevTools/Protocol/Chrome/Emulation/VirtualTimePolicy.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f172946ad13d0f68bd31fb6dbbb8821df015a7a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Emulation/VirtualTimePolicy.cs @@ -0,0 +1,18 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation{ + /// <summary> + /// advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum VirtualTimePolicy + { + Advance, + Pause, + PauseIfNetworkFetchesPending, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DeleteEntryCommand.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/DeleteEntryCommand.cs deleted file mode 100644 index 7741ae92cf605ea6ff8846193409a208dd9b547e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DeleteEntryCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Deletes specified entry. If the entry is a directory, the agent deletes children recursively. - /// </summary> - [Command(ProtocolName.FileSystem.DeleteEntry)] - [SupportedBy("Chrome")] - public class DeleteEntryCommand - { - /// <summary> - /// Gets or sets URL of the entry to delete. - /// </summary> - public string Url { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DeleteEntryCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/DeleteEntryCommandResponse.cs deleted file mode 100644 index afb35070d24a6fe2d29d9c07eceb1d5f01cbf459..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DeleteEntryCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Deletes specified entry. If the entry is a directory, the agent deletes children recursively. - /// </summary> - [CommandResponse(ProtocolName.FileSystem.DeleteEntry)] - [SupportedBy("Chrome")] - public class DeleteEntryCommandResponse - { - /// <summary> - /// Gets or sets 0, if no error. Otherwise errorCode is set to FileError::ErrorCode value. - /// </summary> - public long ErrorCode { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/DisableCommand.cs deleted file mode 100644 index daf475d5c3d257cb8fe916a7fdf7559b43f53303..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DisableCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Disables events from backend. - /// </summary> - [Command(ProtocolName.FileSystem.Disable)] - [SupportedBy("Chrome")] - public class DisableCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/EnableCommand.cs deleted file mode 100644 index 2adf9a3ab171a9feb9b099afd5d13c9a91a181a5..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/EnableCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Enables events from backend. - /// </summary> - [Command(ProtocolName.FileSystem.Enable)] - [SupportedBy("Chrome")] - public class EnableCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/Entry.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/Entry.cs deleted file mode 100644 index 8988af25f9616c9d8e4dc2a4a44f2eaf0c0bf3b8..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/Entry.cs +++ /dev/null @@ -1,41 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Represents a browser side file or directory. - /// </summary> - [SupportedBy("Chrome")] - public class Entry - { - /// <summary> - /// Gets or sets filesystem: URL for the entry. - /// </summary> - public string Url { get; set; } - /// <summary> - /// Gets or sets The name of the file or directory. - /// </summary> - public string Name { get; set; } - /// <summary> - /// Gets or sets True if the entry is a directory. - /// </summary> - public bool IsDirectory { get; set; } - /// <summary> - /// Gets or sets MIME type of the entry, available for a file only. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string MimeType { get; set; } - /// <summary> - /// Gets or sets ResourceType of the entry, available for a file only. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Page.ResourceType ResourceType { get; set; } - /// <summary> - /// Gets or sets True if the entry is a text file. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsTextFile { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/Metadata.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/Metadata.cs deleted file mode 100644 index 909b1cc2cc9029f7da336afd06653743d794ef85..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/Metadata.cs +++ /dev/null @@ -1,22 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Represents metadata of a file or entry. - /// </summary> - [SupportedBy("Chrome")] - public class Metadata - { - /// <summary> - /// Gets or sets Modification time. - /// </summary> - public double ModificationTime { get; set; } - /// <summary> - /// Gets or sets File size. This field is always zero for directories. - /// </summary> - public double Size { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestDirectoryContentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestDirectoryContentCommand.cs deleted file mode 100644 index abc47564eeb21dd1ff3ce685e7112fab90f893fd..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestDirectoryContentCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns content of the directory. - /// </summary> - [Command(ProtocolName.FileSystem.RequestDirectoryContent)] - [SupportedBy("Chrome")] - public class RequestDirectoryContentCommand - { - /// <summary> - /// Gets or sets URL of the directory that the frontend is requesting to read from. - /// </summary> - public string Url { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestDirectoryContentCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestDirectoryContentCommandResponse.cs deleted file mode 100644 index 0e0424b8878b5c9aa0898fa73a8057c485bff515..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestDirectoryContentCommandResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns content of the directory. - /// </summary> - [CommandResponse(ProtocolName.FileSystem.RequestDirectoryContent)] - [SupportedBy("Chrome")] - public class RequestDirectoryContentCommandResponse - { - /// <summary> - /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. - /// </summary> - public long ErrorCode { get; set; } - /// <summary> - /// Gets or sets Contains all entries on directory if the command completed successfully. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Entry[] Entries { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileContentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileContentCommand.cs deleted file mode 100644 index 6cbbb2dcb5fdb1bd2de86359b063d279e71f4b1a..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileContentCommand.cs +++ /dev/null @@ -1,38 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns content of the file. Result should be sliced into [start, end). - /// </summary> - [Command(ProtocolName.FileSystem.RequestFileContent)] - [SupportedBy("Chrome")] - public class RequestFileContentCommand - { - /// <summary> - /// Gets or sets URL of the file that the frontend is requesting to read from. - /// </summary> - public string Url { get; set; } - /// <summary> - /// Gets or sets True if the content should be read as text, otherwise the result will be returned as base64 encoded text. - /// </summary> - public bool ReadAsText { get; set; } - /// <summary> - /// Gets or sets Specifies the start of range to read. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? Start { get; set; } - /// <summary> - /// Gets or sets Specifies the end of range to read exclusively. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? End { get; set; } - /// <summary> - /// Gets or sets Overrides charset of the content when content is served as text. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Charset { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileContentCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileContentCommandResponse.cs deleted file mode 100644 index 017689770722e50f0fa79d8734dcef307c3982e8..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileContentCommandResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns content of the file. Result should be sliced into [start, end). - /// </summary> - [CommandResponse(ProtocolName.FileSystem.RequestFileContent)] - [SupportedBy("Chrome")] - public class RequestFileContentCommandResponse - { - /// <summary> - /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. - /// </summary> - public long ErrorCode { get; set; } - /// <summary> - /// Gets or sets Content of the file. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Content { get; set; } - /// <summary> - /// Gets or sets Charset of the content if it is served as text. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Charset { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileSystemRootCommand.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileSystemRootCommand.cs deleted file mode 100644 index 787d301fc869a6ea5d5963725251ece927dadc0e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileSystemRootCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns root directory of the FileSystem, if exists. - /// </summary> - [Command(ProtocolName.FileSystem.RequestFileSystemRoot)] - [SupportedBy("Chrome")] - public class RequestFileSystemRootCommand - { - /// <summary> - /// Gets or sets Security origin of requesting FileSystem. One of frames in current page needs to have this security origin. - /// </summary> - public string Origin { get; set; } - /// <summary> - /// Gets or sets FileSystem type of requesting FileSystem. - /// </summary> - public string Type { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileSystemRootCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileSystemRootCommandResponse.cs deleted file mode 100644 index 9b97eb917619eca242c3ef1b79479068e40860cd..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestFileSystemRootCommandResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns root directory of the FileSystem, if exists. - /// </summary> - [CommandResponse(ProtocolName.FileSystem.RequestFileSystemRoot)] - [SupportedBy("Chrome")] - public class RequestFileSystemRootCommandResponse - { - /// <summary> - /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. - /// </summary> - public long ErrorCode { get; set; } - /// <summary> - /// Gets or sets Contains root of the requested FileSystem if the command completed successfully. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Entry Root { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestMetadataCommand.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestMetadataCommand.cs deleted file mode 100644 index b83385fae04a045170cf20a809689b0b4e8bce93..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestMetadataCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns metadata of the entry. - /// </summary> - [Command(ProtocolName.FileSystem.RequestMetadata)] - [SupportedBy("Chrome")] - public class RequestMetadataCommand - { - /// <summary> - /// Gets or sets URL of the entry that the frontend is requesting to get metadata from. - /// </summary> - public string Url { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestMetadataCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestMetadataCommandResponse.cs deleted file mode 100644 index 2e52e73f3fba295ffa01b15071edeb9ebd7870da..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/RequestMetadataCommandResponse.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem -{ - /// <summary> - /// Returns metadata of the entry. - /// </summary> - [CommandResponse(ProtocolName.FileSystem.RequestMetadata)] - [SupportedBy("Chrome")] - public class RequestMetadataCommandResponse - { - /// <summary> - /// Gets or sets 0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value. - /// </summary> - public long ErrorCode { get; set; } - /// <summary> - /// Gets or sets Contains metadata of the entry if the command completed successfully. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Metadata Metadata { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/AddInspectedHeapObjectCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/AddInspectedHeapObjectCommand.cs index 7c1cd1b966f1f1ebc4b6fc57be07c0291f52056b..61c6750327875e3002db1a7e294cf6aa3539e660 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/AddInspectedHeapObjectCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/AddInspectedHeapObjectCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler /// </summary> [Command(ProtocolName.HeapProfiler.AddInspectedHeapObject)] [SupportedBy("Chrome")] - public class AddInspectedHeapObjectCommand + public class AddInspectedHeapObjectCommand: ICommand<AddInspectedHeapObjectCommandResponse> { /// <summary> /// Gets or sets Heap snapshot object id to be accessible by means of $x command line API. diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/CollectGarbageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/CollectGarbageCommand.cs index 8709d0a00c46181f2023c90dbfe3f64a8f844245..cc559b1d94e8f019d5bd291c4ce396d30b657824 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/CollectGarbageCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/CollectGarbageCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.CollectGarbage)] [SupportedBy("Chrome")] - public class CollectGarbageCommand + public class CollectGarbageCommand: ICommand<CollectGarbageCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/DisableCommand.cs index 8607df5754af89cf0721376435a731688db48f4d..fdeb4c1d2331c90df8f3024e3cbf0bfa94bdd970 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/DisableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/EnableCommand.cs index a67d1fa865339350617172f03eca3bf8af6063ca..f8ab1559b99d1874c3b2cd442f9a86c7c6ea445e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/EnableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetHeapObjectIdCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetHeapObjectIdCommand.cs index 3a0549f309bb656a62e057a24dd11bd7082bbcde..b2d840ee011094a1d8e1a086923d38d20e421355 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetHeapObjectIdCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetHeapObjectIdCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.GetHeapObjectId)] [SupportedBy("Chrome")] - public class GetHeapObjectIdCommand + public class GetHeapObjectIdCommand: ICommand<GetHeapObjectIdCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to get heap object id for. diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetObjectByHeapObjectIdCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetObjectByHeapObjectIdCommand.cs index e94afc865dbb1683be910c06d20ac7683b986207..7b45fdf8046abc8b0f8a30eb9e7ea1493ba4e160 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetObjectByHeapObjectIdCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/GetObjectByHeapObjectIdCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.GetObjectByHeapObjectId)] [SupportedBy("Chrome")] - public class GetObjectByHeapObjectIdCommand + public class GetObjectByHeapObjectIdCommand: ICommand<GetObjectByHeapObjectIdCommandResponse> { /// <summary> /// Gets or sets ObjectId diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs index f0ac185b0782f42495e5c9127598af1aa92c00d4..95652d7f566c3e0ae7b608cc245cca82b1ee60a9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/LastSeenObjectIdEvent.cs @@ -3,7 +3,7 @@ using MasterDevs.ChromeDevTools;using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { /// <summary> - /// If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + /// If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. /// </summary> [Event(ProtocolName.HeapProfiler.LastSeenObjectId)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/SamplingHeapProfile.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/SamplingHeapProfile.cs new file mode 100644 index 0000000000000000000000000000000000000000..fdf3f7952cb8e5b2e7906f72a41c11d88a2769c7 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/SamplingHeapProfile.cs @@ -0,0 +1,18 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler +{ + /// <summary> + /// Profile. + /// </summary> + [SupportedBy("Chrome")] + public class SamplingHeapProfile + { + /// <summary> + /// Gets or sets Head + /// </summary> + public SamplingHeapProfileNode Head { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/SamplingHeapProfileNode.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/SamplingHeapProfileNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..18c2f8046777de3df7d1d95b4419cb38e8752c6f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/SamplingHeapProfileNode.cs @@ -0,0 +1,26 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler +{ + /// <summary> + /// Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + /// </summary> + [SupportedBy("Chrome")] + public class SamplingHeapProfileNode + { + /// <summary> + /// Gets or sets Function location. + /// </summary> + public Runtime.CallFrame CallFrame { get; set; } + /// <summary> + /// Gets or sets Allocations size in bytes for the node excluding children. + /// </summary> + public double SelfSize { get; set; } + /// <summary> + /// Gets or sets Child nodes. + /// </summary> + public SamplingHeapProfileNode[] Children { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartSamplingCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartSamplingCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0cb0c1d468d24064f8debc6a17aab104b03aed7f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartSamplingCommand.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.StartSampling)] + [SupportedBy("Chrome")] + public class StartSamplingCommand: ICommand<StartSamplingCommandResponse> + { + /// <summary> + /// Gets or sets Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double SamplingInterval { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartSamplingCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartSamplingCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..52b6e8aa9c1bcf24c99dc4d649f0f1a967e50094 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartSamplingCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.StartSampling)] + [SupportedBy("Chrome")] + public class StartSamplingCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartTrackingHeapObjectsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartTrackingHeapObjectsCommand.cs index c82d34f3e075fe7d5e87c201cd99b67ae61ff7c2..c502f7f2a97e771e02852cc992751a31823f0bf5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartTrackingHeapObjectsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StartTrackingHeapObjectsCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.StartTrackingHeapObjects)] [SupportedBy("Chrome")] - public class StartTrackingHeapObjectsCommand + public class StartTrackingHeapObjectsCommand: ICommand<StartTrackingHeapObjectsCommandResponse> { /// <summary> /// Gets or sets TrackAllocations diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopSamplingCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopSamplingCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8ea24dfcf2c8f3558ee4780f6996376372e02025 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopSamplingCommand.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler +{ + [Command(ProtocolName.HeapProfiler.StopSampling)] + [SupportedBy("Chrome")] + public class StopSamplingCommand: ICommand<StopSamplingCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopSamplingCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopSamplingCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f57538569512c348492b001a60abb4c7b571b909 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopSamplingCommandResponse.cs @@ -0,0 +1,16 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler +{ + [CommandResponse(ProtocolName.HeapProfiler.StopSampling)] + [SupportedBy("Chrome")] + public class StopSamplingCommandResponse + { + /// <summary> + /// Gets or sets Recorded sampling heap profile. + /// </summary> + public SamplingHeapProfile Profile { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopTrackingHeapObjectsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopTrackingHeapObjectsCommand.cs index a806cb90eec414c079d3df1f5f44b1274f6c1fed..a24b21599e3d0218f61137016cbccafcfefc1277 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopTrackingHeapObjectsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/StopTrackingHeapObjectsCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.StopTrackingHeapObjects)] [SupportedBy("Chrome")] - public class StopTrackingHeapObjectsCommand + public class StopTrackingHeapObjectsCommand: ICommand<StopTrackingHeapObjectsCommandResponse> { /// <summary> /// Gets or sets If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. diff --git a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/TakeHeapSnapshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/TakeHeapSnapshotCommand.cs index acfabeca83a2920e791ed5206d13ec4235f433ee..39df4cdd41d19109bbda91b5b32a7f2d7928e917 100644 --- a/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/TakeHeapSnapshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/HeapProfiler/TakeHeapSnapshotCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.HeapProfiler { [Command(ProtocolName.HeapProfiler.TakeHeapSnapshot)] [SupportedBy("Chrome")] - public class TakeHeapSnapshotCommand + public class TakeHeapSnapshotCommand: ICommand<TakeHeapSnapshotCommandResponse> { /// <summary> /// Gets or sets If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. diff --git a/source/ChromeDevTools/Protocol/Chrome/IO/CloseCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IO/CloseCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d913ada434cafb65a687951e03a8e0ba920a8a5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/IO/CloseCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IO +{ + /// <summary> + /// Close the stream, discard any temporary backing storage. + /// </summary> + [Command(ProtocolName.IO.Close)] + [SupportedBy("Chrome")] + public class CloseCommand: ICommand<CloseCommandResponse> + { + /// <summary> + /// Gets or sets Handle of the stream to close. + /// </summary> + public string Handle { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/IO/CloseCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/IO/CloseCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6bd9141b766a9ad93b5bf44d56ebb9b18dbaa564 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/IO/CloseCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IO +{ + /// <summary> + /// Close the stream, discard any temporary backing storage. + /// </summary> + [CommandResponse(ProtocolName.IO.Close)] + [SupportedBy("Chrome")] + public class CloseCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/IO/ReadCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IO/ReadCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..bc580ffc6da3447c20a5cec0cdd9b749e578de3c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/IO/ReadCommand.cs @@ -0,0 +1,29 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IO +{ + /// <summary> + /// Read a chunk of the stream + /// </summary> + [Command(ProtocolName.IO.Read)] + [SupportedBy("Chrome")] + public class ReadCommand: ICommand<ReadCommandResponse> + { + /// <summary> + /// Gets or sets Handle of the stream to read. + /// </summary> + public string Handle { get; set; } + /// <summary> + /// Gets or sets Seek to the specified offset before reading (if not specificed, proceed with offset following the last read). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Offset { get; set; } + /// <summary> + /// Gets or sets Maximum number of bytes to read (left upon the agent discretion if not specified). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Size { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/IO/ReadCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/IO/ReadCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..349dda7b6557f50e6ac7be0bd3e3a0c2f8873e6a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/IO/ReadCommandResponse.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IO +{ + /// <summary> + /// Read a chunk of the stream + /// </summary> + [CommandResponse(ProtocolName.IO.Read)] + [SupportedBy("Chrome")] + public class ReadCommandResponse + { + /// <summary> + /// Gets or sets Data that were read. + /// </summary> + public string Data { get; set; } + /// <summary> + /// Gets or sets Set if the end-of-file condition occured while reading. + /// </summary> + public bool Eof { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/ClearObjectStoreCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/ClearObjectStoreCommand.cs index 2284cdd956fdd21dc562a007c3b0023c3931374a..90ac71a68def9ddabbe7f1b57f18681f06b8aa76 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/ClearObjectStoreCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/ClearObjectStoreCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.ClearObjectStore)] [SupportedBy("Chrome")] - public class ClearObjectStoreCommand + public class ClearObjectStoreCommand: ICommand<ClearObjectStoreCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DataEntry.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DataEntry.cs index 6e7838111dd039bb9d021814cfd3eb39a6efc1d3..fd1cd0a0b173c25227ec873d9e904fabbfb1aeee 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DataEntry.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DataEntry.cs @@ -11,16 +11,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB public class DataEntry { /// <summary> - /// Gets or sets JSON-stringified key object. + /// Gets or sets Key object. /// </summary> - public string Key { get; set; } + public Runtime.RemoteObject Key { get; set; } /// <summary> - /// Gets or sets JSON-stringified primary key object. + /// Gets or sets Primary key object. /// </summary> - public string PrimaryKey { get; set; } + public Runtime.RemoteObject PrimaryKey { get; set; } /// <summary> - /// Gets or sets JSON-stringified value object. + /// Gets or sets Value object. /// </summary> - public string Value { get; set; } + public Runtime.RemoteObject Value { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DatabaseWithObjectStores.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DatabaseWithObjectStores.cs index 031ec16d79aef32800582a7a26a39ef8a2dcfa3b..6e960a20f34559fe91a5696eb46a9099f0a01278 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DatabaseWithObjectStores.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DatabaseWithObjectStores.cs @@ -15,13 +15,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB /// </summary> public string Name { get; set; } /// <summary> - /// Gets or sets Deprecated string database version. + /// Gets or sets Database version. /// </summary> - public string Version { get; set; } - /// <summary> - /// Gets or sets Integer database version. - /// </summary> - public long IntVersion { get; set; } + public long Version { get; set; } /// <summary> /// Gets or sets Object stores in this database. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DeleteDatabaseCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DeleteDatabaseCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c72b7c507fd19d6951f7d9588ebaa21f70901305 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DeleteDatabaseCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB +{ + /// <summary> + /// Deletes a database. + /// </summary> + [Command(ProtocolName.IndexedDB.DeleteDatabase)] + [SupportedBy("Chrome")] + public class DeleteDatabaseCommand: ICommand<DeleteDatabaseCommandResponse> + { + /// <summary> + /// Gets or sets Security origin. + /// </summary> + public string SecurityOrigin { get; set; } + /// <summary> + /// Gets or sets Database name. + /// </summary> + public string DatabaseName { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DeleteDatabaseCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DeleteDatabaseCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7d9cca3555eb582b7697e91c94fb25f874a6ca78 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DeleteDatabaseCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB +{ + /// <summary> + /// Deletes a database. + /// </summary> + [CommandResponse(ProtocolName.IndexedDB.DeleteDatabase)] + [SupportedBy("Chrome")] + public class DeleteDatabaseCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DisableCommand.cs index 91df3b876c17c4d8c095a225368e81666d2abe44..34ccea4bd36033c3391fc2e449fc84e3c836d65d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/EnableCommand.cs index a2f4656dd20254661a3497f95e086b6706d80e76..a799505e99fdbb8582513a895fdc098a62115b10 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDataCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDataCommand.cs index 95b5e5b715a72ce1babe7048e7335fbf8137452b..5cde7b3d47316e784df3accef997a15daaafa934 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDataCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDataCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.RequestData)] [SupportedBy("Chrome")] - public class RequestDataCommand + public class RequestDataCommand: ICommand<RequestDataCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseCommand.cs index b836cef0e0c97b19cf4af8aa97843ac905b6faea..816b801948481aa07fb88180e146443d26b97d43 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.RequestDatabase)] [SupportedBy("Chrome")] - public class RequestDatabaseCommand + public class RequestDatabaseCommand: ICommand<RequestDatabaseCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseNamesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseNamesCommand.cs index d0a1e5b6e4b4cac8fcc4ad3ea40160f47d7d6873..474631928f85104d609c2e969de57f6cf6bb6699 100644 --- a/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseNamesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/IndexedDB/RequestDatabaseNamesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.RequestDatabaseNames)] [SupportedBy("Chrome")] - public class RequestDatabaseNamesCommand + public class RequestDatabaseNamesCommand: ICommand<RequestDatabaseNamesCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/DispatchKeyEventCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/DispatchKeyEventCommand.cs index d9845a9ec562604709bcceb8e1b8516d120a867c..306544eb02e1ebbe006a942c7a4e51fcd8ebd69c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Input/DispatchKeyEventCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Input/DispatchKeyEventCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [Command(ProtocolName.Input.DispatchKeyEvent)] [SupportedBy("Chrome")] - public class DispatchKeyEventCommand + public class DispatchKeyEventCommand: ICommand<DispatchKeyEventCommandResponse> { /// <summary> /// Gets or sets Type of the key event. @@ -46,6 +46,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Code { get; set; } /// <summary> + /// Gets or sets Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + /// <summary> /// Gets or sets Windows virtual key code (default: 0). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/DispatchMouseEventCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/DispatchMouseEventCommand.cs index 79e6672f7a7575c1a3bd5310c16fccd920aad302..4d8b6ecfd77e3f596cccf64ccdb9810c5ff71371 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Input/DispatchMouseEventCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Input/DispatchMouseEventCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [Command(ProtocolName.Input.DispatchMouseEvent)] [SupportedBy("Chrome")] - public class DispatchMouseEventCommand + public class DispatchMouseEventCommand: ICommand<DispatchMouseEventCommandResponse> { /// <summary> /// Gets or sets Type of the mouse event. diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/DispatchTouchEventCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/DispatchTouchEventCommand.cs index 3e52eb5831377c19b682f969ddb9e0077cde6579..5eb1805d51f69715fb36d97aab08fbf6b6829ca4 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Input/DispatchTouchEventCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Input/DispatchTouchEventCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [Command(ProtocolName.Input.DispatchTouchEvent)] [SupportedBy("Chrome")] - public class DispatchTouchEventCommand + public class DispatchTouchEventCommand: ICommand<DispatchTouchEventCommandResponse> { /// <summary> /// Gets or sets Type of the touch event. diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/EmulateTouchFromMouseEventCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/EmulateTouchFromMouseEventCommand.cs index 76dd24910e19214cc2d54862d4841bfb4827a5f5..a97516267dd1c5f3751d1e1fbd1642f4d67362da 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Input/EmulateTouchFromMouseEventCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Input/EmulateTouchFromMouseEventCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [Command(ProtocolName.Input.EmulateTouchFromMouseEvent)] [SupportedBy("Chrome")] - public class EmulateTouchFromMouseEventCommand + public class EmulateTouchFromMouseEventCommand: ICommand<EmulateTouchFromMouseEventCommandResponse> { /// <summary> /// Gets or sets Type of the mouse event. diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2b965d405bac6e6a7f12c34c56bece334523f848 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input +{ + /// <summary> + /// Ignores input events (useful while auditing page). + /// </summary> + [Command(ProtocolName.Input.SetIgnoreInputEvents)] + [SupportedBy("Chrome")] + public class SetIgnoreInputEventsCommand: ICommand<SetIgnoreInputEventsCommandResponse> + { + /// <summary> + /// Gets or sets Ignores input events processing when set to true. + /// </summary> + public bool Ignore { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0e9dfcc78db8a405ab0fe4a73132e97b62e40668 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Input/SetIgnoreInputEventsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input +{ + /// <summary> + /// Ignores input events (useful while auditing page). + /// </summary> + [CommandResponse(ProtocolName.Input.SetIgnoreInputEvents)] + [SupportedBy("Chrome")] + public class SetIgnoreInputEventsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizePinchGestureCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizePinchGestureCommand.cs index 34cf27ed148aeba7df483293cd0601530faa1cff..29321fcb3275e5ff312a9c676c3a0a2d29ec48c9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizePinchGestureCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizePinchGestureCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [Command(ProtocolName.Input.SynthesizePinchGesture)] [SupportedBy("Chrome")] - public class SynthesizePinchGestureCommand + public class SynthesizePinchGestureCommand: ICommand<SynthesizePinchGestureCommandResponse> { /// <summary> /// Gets or sets X coordinate of the start of the gesture in CSS pixels. diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeScrollGestureCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeScrollGestureCommand.cs index cd96bc75960aa3a389a5dc835fcfc9dfb9183348..59adc18d5bba33702ac73e6a0b5630bb3403c258 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeScrollGestureCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeScrollGestureCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [Command(ProtocolName.Input.SynthesizeScrollGesture)] [SupportedBy("Chrome")] - public class SynthesizeScrollGestureCommand + public class SynthesizeScrollGestureCommand: ICommand<SynthesizeScrollGestureCommandResponse> { /// <summary> /// Gets or sets X coordinate of the start of the gesture in CSS pixels. @@ -54,5 +54,20 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string GestureSourceType { get; set; } + /// <summary> + /// Gets or sets The number of times to repeat the gesture (default: 0). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? RepeatCount { get; set; } + /// <summary> + /// Gets or sets The number of milliseconds delay between each repeat. (default: 250). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? RepeatDelayMs { get; set; } + /// <summary> + /// Gets or sets The name of the interaction markers to generate, if not empty (default: ""). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string InteractionMarkerName { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeTapGestureCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeTapGestureCommand.cs index 4cab53d8eb03ce1df143f105da93d61a3ce018ea..b3d12fd1a8cb3bb5903fb06259bce82f144cfed2 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeTapGestureCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Input/SynthesizeTapGestureCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Input /// </summary> [Command(ProtocolName.Input.SynthesizeTapGesture)] [SupportedBy("Chrome")] - public class SynthesizeTapGestureCommand + public class SynthesizeTapGestureCommand: ICommand<SynthesizeTapGestureCommandResponse> { /// <summary> /// Gets or sets X coordinate of the start of the gesture in CSS pixels. diff --git a/source/ChromeDevTools/Protocol/Chrome/Inspector/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Inspector/DisableCommand.cs index e7fdb957d830741703d8bc143fb9ef02e37f85dd..22110820a35d25c52cc83a11809c890cdaadc121 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Inspector/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Inspector/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Inspector /// </summary> [Command(ProtocolName.Inspector.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Inspector/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Inspector/EnableCommand.cs index 1f108e767b08f4575062756b0eed08fb2a37911e..c890fb9f7a9a46a634b6681f067fade88394510d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Inspector/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Inspector/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Inspector /// </summary> [Command(ProtocolName.Inspector.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Inspector/EvaluateForTestInFrontendEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Inspector/EvaluateForTestInFrontendEvent.cs deleted file mode 100644 index 6f3911671459dece24fa7cff3661510565937948..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Inspector/EvaluateForTestInFrontendEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Inspector -{ - [Event(ProtocolName.Inspector.EvaluateForTestInFrontend)] - [SupportedBy("Chrome")] - public class EvaluateForTestInFrontendEvent - { - /// <summary> - /// Gets or sets TestCallId - /// </summary> - public long TestCallId { get; set; } - /// <summary> - /// Gets or sets Script - /// </summary> - public string Script { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Inspector/InspectEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Inspector/InspectEvent.cs deleted file mode 100644 index 59f1a310c0ef746120f0db4f907515bdb38fdb17..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Inspector/InspectEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Inspector -{ - [Event(ProtocolName.Inspector.Inspect)] - [SupportedBy("Chrome")] - public class InspectEvent - { - /// <summary> - /// Gets or sets Object - /// </summary> - public Runtime.RemoteObject Object { get; set; } - /// <summary> - /// Gets or sets Hints - /// </summary> - public object Hints { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/CompositingReasonsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/CompositingReasonsCommand.cs index 4af8a36ddb16850af423639fae66efd42871be07..d47ce2b57244474e4377e5900ccb42669c0a6c15 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/CompositingReasonsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/CompositingReasonsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.CompositingReasons)] [SupportedBy("Chrome")] - public class CompositingReasonsCommand + public class CompositingReasonsCommand: ICommand<CompositingReasonsCommandResponse> { /// <summary> /// Gets or sets The id of the layer for which we want to get the reasons it was composited. diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/DisableCommand.cs index 0715a036bc1fcf120a14f7b5882f9cb6c0b9807d..d9ae03a2b2a3bd0b83a03c3ace6781ab178d8c8a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/EnableCommand.cs index b2f8123c32c4fa2b7c60bb668f6543a1f0fae05b..4c052c2fd173e3582e60c4d44439181c706e603c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/LoadSnapshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/LoadSnapshotCommand.cs index 28b10438f6a1ae660abd335b459e939fcfd92a79..0c456c3f0fd066cd421bb0c8eab27bfb558c8ce0 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/LoadSnapshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/LoadSnapshotCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.LoadSnapshot)] [SupportedBy("Chrome")] - public class LoadSnapshotCommand + public class LoadSnapshotCommand: ICommand<LoadSnapshotCommandResponse> { /// <summary> /// Gets or sets An array of tiles composing the snapshot. diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/MakeSnapshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/MakeSnapshotCommand.cs index 0fefe9a233081e07c27ecc96658a8a4fffc8c389..e847b34e6521c99b375c4e73b67cbfcc284af235 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/MakeSnapshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/MakeSnapshotCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.MakeSnapshot)] [SupportedBy("Chrome")] - public class MakeSnapshotCommand + public class MakeSnapshotCommand: ICommand<MakeSnapshotCommandResponse> { /// <summary> /// Gets or sets The id of the layer. diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/ProfileSnapshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/ProfileSnapshotCommand.cs index 771d3b247feb250e43f4eeb4300a2d40ef6446dd..7a862e74bc5f54c0d10fe6260f31b92610a40356 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/ProfileSnapshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/ProfileSnapshotCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree { [Command(ProtocolName.LayerTree.ProfileSnapshot)] [SupportedBy("Chrome")] - public class ProfileSnapshotCommand + public class ProfileSnapshotCommand: ICommand<ProfileSnapshotCommandResponse> { /// <summary> /// Gets or sets The id of the layer snapshot. diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReleaseSnapshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReleaseSnapshotCommand.cs index 69cdd024e2dd46f0afb691bc35a8174122b17368..b0e0cea0691350bd28eb987324200dcf4019bc6d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReleaseSnapshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReleaseSnapshotCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.ReleaseSnapshot)] [SupportedBy("Chrome")] - public class ReleaseSnapshotCommand + public class ReleaseSnapshotCommand: ICommand<ReleaseSnapshotCommandResponse> { /// <summary> /// Gets or sets The id of the layer snapshot. diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReplaySnapshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReplaySnapshotCommand.cs index 81f336fef7b99e3e2406cc69e37b35c21c1e494a..b8b493c192f502687fbffb0b5e1d2583dc8ff0f1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReplaySnapshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/ReplaySnapshotCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.ReplaySnapshot)] [SupportedBy("Chrome")] - public class ReplaySnapshotCommand + public class ReplaySnapshotCommand: ICommand<ReplaySnapshotCommandResponse> { /// <summary> /// Gets or sets The id of the layer snapshot. diff --git a/source/ChromeDevTools/Protocol/Chrome/LayerTree/SnapshotCommandLogCommand.cs b/source/ChromeDevTools/Protocol/Chrome/LayerTree/SnapshotCommandLogCommand.cs index 182206a3cd8845fa45e01cf2b8a817e2f8110586..64d40aa797e608368236e4c6d24157d0fb2b7ff9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/LayerTree/SnapshotCommandLogCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/LayerTree/SnapshotCommandLogCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.LayerTree /// </summary> [Command(ProtocolName.LayerTree.SnapshotCommandLog)] [SupportedBy("Chrome")] - public class SnapshotCommandLogCommand + public class SnapshotCommandLogCommand: ICommand<SnapshotCommandLogCommandResponse> { /// <summary> /// Gets or sets The id of the layer snapshot. diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/ClearCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Log/ClearCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..752bf5a06abb6b06d805102e403538658212efcf --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/ClearCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Clears the log. + /// </summary> + [Command(ProtocolName.Log.Clear)] + [SupportedBy("Chrome")] + public class ClearCommand: ICommand<ClearCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Log/ClearCommandResponse.cs similarity index 50% rename from source/ChromeDevTools/Protocol/Chrome/Timeline/DisableCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Log/ClearCommandResponse.cs index 29856f1e824a6589637b7fb13e5d59876e066150..1ca821b54f4472ad4575b7800f1a50d99f2e3bf6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Log/ClearCommandResponse.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log { /// <summary> - /// Deprecated. + /// Clears the log. /// </summary> - [Command(ProtocolName.Timeline.Disable)] + [CommandResponse(ProtocolName.Log.Clear)] [SupportedBy("Chrome")] - public class DisableCommand + public class ClearCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Log/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..efa3400e82134820995a76c027408fd878b5a9ae --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/DisableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Disables log domain, prevents further log entries from being reported to the client. + /// </summary> + [Command(ProtocolName.Log.Disable)] + [SupportedBy("Chrome")] + public class DisableCommand: ICommand<DisableCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/DisableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Log/DisableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8c6e346eb27d8c65e95d746dc53b592a1907e149 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/DisableCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Disables log domain, prevents further log entries from being reported to the client. + /// </summary> + [CommandResponse(ProtocolName.Log.Disable)] + [SupportedBy("Chrome")] + public class DisableCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Log/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..292da212fa7552103b81276c1b1c490a1d6626d3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/EnableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Enables log domain, sends the entries collected so far to the client by means of the <code>entryAdded</code> notification. + /// </summary> + [Command(ProtocolName.Log.Enable)] + [SupportedBy("Chrome")] + public class EnableCommand: ICommand<EnableCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/EnableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Log/EnableCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..76a55c620fdca5c55adfb204b9655896fbacc6cf --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/EnableCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Enables log domain, sends the entries collected so far to the client by means of the <code>entryAdded</code> notification. + /// </summary> + [CommandResponse(ProtocolName.Log.Enable)] + [SupportedBy("Chrome")] + public class EnableCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/EntryAddedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Log/EntryAddedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..28c26b565e765f3b581b0a336c4376f68ac59e43 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/EntryAddedEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Issued when new message was logged. + /// </summary> + [Event(ProtocolName.Log.EntryAdded)] + [SupportedBy("Chrome")] + public class EntryAddedEvent + { + /// <summary> + /// Gets or sets The entry. + /// </summary> + public LogEntry Entry { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/LogEntry.cs b/source/ChromeDevTools/Protocol/Chrome/Log/LogEntry.cs new file mode 100644 index 0000000000000000000000000000000000000000..909d7282d33412bb478ade11c9b4414d2bc89f6c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/LogEntry.cs @@ -0,0 +1,55 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Log entry. + /// </summary> + [SupportedBy("Chrome")] + public class LogEntry + { + /// <summary> + /// Gets or sets Log entry source. + /// </summary> + public string Source { get; set; } + /// <summary> + /// Gets or sets Log entry severity. + /// </summary> + public string Level { get; set; } + /// <summary> + /// Gets or sets Logged text. + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets Timestamp when this entry was added. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets URL of the resource if known. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Url { get; set; } + /// <summary> + /// Gets or sets Line number in the resource. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? LineNumber { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.StackTrace StackTrace { get; set; } + /// <summary> + /// Gets or sets Identifier of the network request associated with this entry. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string NetworkRequestId { get; set; } + /// <summary> + /// Gets or sets Identifier of the worker associated with this entry. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string WorkerId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/StartViolationsReportCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Log/StartViolationsReportCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..2d73f97b48497a326f8564c37ce4c7c98a3b7661 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/StartViolationsReportCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// start violation reporting. + /// </summary> + [Command(ProtocolName.Log.StartViolationsReport)] + [SupportedBy("Chrome")] + public class StartViolationsReportCommand: ICommand<StartViolationsReportCommandResponse> + { + /// <summary> + /// Gets or sets Configuration for violations. + /// </summary> + public ViolationSetting[] Config { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/StartViolationsReportCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Log/StartViolationsReportCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b17b79f923394098d0798402f40c73b9a0b21860 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/StartViolationsReportCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// start violation reporting. + /// </summary> + [CommandResponse(ProtocolName.Log.StartViolationsReport)] + [SupportedBy("Chrome")] + public class StartViolationsReportCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/StopViolationsReportCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Log/StopViolationsReportCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ad3e5dc4868c0b1f912ccc7cb79056cbfdfb0a51 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/StopViolationsReportCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Stop violation reporting. + /// </summary> + [Command(ProtocolName.Log.StopViolationsReport)] + [SupportedBy("Chrome")] + public class StopViolationsReportCommand: ICommand<StopViolationsReportCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/StopViolationsReportCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Log/StopViolationsReportCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f56bd736f798b2623d75493a5a41916d16b675c0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/StopViolationsReportCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Stop violation reporting. + /// </summary> + [CommandResponse(ProtocolName.Log.StopViolationsReport)] + [SupportedBy("Chrome")] + public class StopViolationsReportCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Log/ViolationSetting.cs b/source/ChromeDevTools/Protocol/Chrome/Log/ViolationSetting.cs new file mode 100644 index 0000000000000000000000000000000000000000..87adad1101eeca847676815cd4e5bd1c9446045b --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Log/ViolationSetting.cs @@ -0,0 +1,22 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Log +{ + /// <summary> + /// Violation configuration setting. + /// </summary> + [SupportedBy("Chrome")] + public class ViolationSetting + { + /// <summary> + /// Gets or sets Violation type. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Time threshold to trigger upon. + /// </summary> + public double Threshold { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Memory/GetDOMCountersCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Memory/GetDOMCountersCommand.cs index 359354a9cd54508db03a62a81a4613d5c59cdf4a..d385d1ef4df77668055a8ace84f7bfcfd5dc6a81 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Memory/GetDOMCountersCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Memory/GetDOMCountersCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Memory { [Command(ProtocolName.Memory.GetDOMCounters)] [SupportedBy("Chrome")] - public class GetDOMCountersCommand + public class GetDOMCountersCommand: ICommand<GetDOMCountersCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Memory/PressureLevel.cs b/source/ChromeDevTools/Protocol/Chrome/Memory/PressureLevel.cs new file mode 100644 index 0000000000000000000000000000000000000000..203fff3c6580b4587d5773723e4089454eabf482 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Memory/PressureLevel.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Memory{ + /// <summary> + /// Memory pressure level. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum PressureLevel + { + Moderate, + Critical, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Memory/SetPressureNotificationsSuppressedCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Memory/SetPressureNotificationsSuppressedCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7f8afe26b8eb541e8e197ff7502218e225652564 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Memory/SetPressureNotificationsSuppressedCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Memory +{ + /// <summary> + /// Enable/disable suppressing memory pressure notifications in all processes. + /// </summary> + [Command(ProtocolName.Memory.SetPressureNotificationsSuppressed)] + [SupportedBy("Chrome")] + public class SetPressureNotificationsSuppressedCommand: ICommand<SetPressureNotificationsSuppressedCommandResponse> + { + /// <summary> + /// Gets or sets If true, memory pressure notifications will be suppressed. + /// </summary> + public bool Suppressed { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Memory/SetPressureNotificationsSuppressedCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Memory/SetPressureNotificationsSuppressedCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2f7cb8ddf37f966ee193f8ff48fe8b21042de522 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Memory/SetPressureNotificationsSuppressedCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Memory +{ + /// <summary> + /// Enable/disable suppressing memory pressure notifications in all processes. + /// </summary> + [CommandResponse(ProtocolName.Memory.SetPressureNotificationsSuppressed)] + [SupportedBy("Chrome")] + public class SetPressureNotificationsSuppressedCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Memory/SimulatePressureNotificationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Memory/SimulatePressureNotificationCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..359ac31d5eabff42d89d4cec97b46fc914c860c6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Memory/SimulatePressureNotificationCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Memory +{ + /// <summary> + /// Simulate a memory pressure notification in all processes. + /// </summary> + [Command(ProtocolName.Memory.SimulatePressureNotification)] + [SupportedBy("Chrome")] + public class SimulatePressureNotificationCommand: ICommand<SimulatePressureNotificationCommandResponse> + { + /// <summary> + /// Gets or sets Memory pressure level of the notification. + /// </summary> + public string Level { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Memory/SimulatePressureNotificationCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Memory/SimulatePressureNotificationCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d689a52c25601814ea123f4671e18a426e305190 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Memory/SimulatePressureNotificationCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Memory +{ + /// <summary> + /// Simulate a memory pressure notification in all processes. + /// </summary> + [CommandResponse(ProtocolName.Memory.SimulatePressureNotification)] + [SupportedBy("Chrome")] + public class SimulatePressureNotificationCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/BlockedReason.cs b/source/ChromeDevTools/Protocol/Chrome/Network/BlockedReason.cs new file mode 100644 index 0000000000000000000000000000000000000000..66aa5a56226e17a9fdcb2f7f883bdb40739ac749 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/BlockedReason.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network{ + /// <summary> + /// The reason why request was blocked. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum BlockedReason + { + Csp, + [EnumMember(Value = "mixed-content")] + Mixed_content, + Origin, + Inspector, + [EnumMember(Value = "subresource-filter")] + Subresource_filter, + Other, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCacheCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCacheCommand.cs index 858e48d9d6e428708639063b76b7a2c5a771e2cb..6e18fa9b2c27bc23c8d6b08a0a57b321a0f855b0 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCacheCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCacheCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.CanClearBrowserCache)] [SupportedBy("Chrome")] - public class CanClearBrowserCacheCommand + public class CanClearBrowserCacheCommand: ICommand<CanClearBrowserCacheCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCookiesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCookiesCommand.cs index d36ee7869f17b450c64761b22ff456c599931edc..44d36887a97c8d9ca54b702687c092dfbf7c4fae 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCookiesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/CanClearBrowserCookiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.CanClearBrowserCookies)] [SupportedBy("Chrome")] - public class CanClearBrowserCookiesCommand + public class CanClearBrowserCookiesCommand: ICommand<CanClearBrowserCookiesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/CanEmulateNetworkConditionsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/CanEmulateNetworkConditionsCommand.cs index c0df3a28d303ec7f6f2b0848d1b83c3888af0d2a..608d0cb80f4e4123e598cd27778bc8ad1396642d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/CanEmulateNetworkConditionsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/CanEmulateNetworkConditionsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.CanEmulateNetworkConditions)] [SupportedBy("Chrome")] - public class CanEmulateNetworkConditionsCommand + public class CanEmulateNetworkConditionsCommand: ICommand<CanEmulateNetworkConditionsCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCacheCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCacheCommand.cs index dc704dcd75a1eeaef3af834384a842554228c200..f33db62764786a7579e0a8a189c631bad8593ff9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCacheCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCacheCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.ClearBrowserCache)] [SupportedBy("Chrome")] - public class ClearBrowserCacheCommand + public class ClearBrowserCacheCommand: ICommand<ClearBrowserCacheCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCookiesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCookiesCommand.cs index d66db9eb03d90219bae675e7fedfe2b199088a71..173b8bc1e62859f54fc6a5324b319ed612852b06 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCookiesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/ClearBrowserCookiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.ClearBrowserCookies)] [SupportedBy("Chrome")] - public class ClearBrowserCookiesCommand + public class ClearBrowserCookiesCommand: ICommand<ClearBrowserCookiesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/ConnectionType.cs b/source/ChromeDevTools/Protocol/Chrome/Network/ConnectionType.cs new file mode 100644 index 0000000000000000000000000000000000000000..2f01ef02e4f4424d95cd7313f1790c8504313b11 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/ConnectionType.cs @@ -0,0 +1,24 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network{ + /// <summary> + /// Loading priority of a resource request. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum ConnectionType + { + None, + Cellular2g, + Cellular3g, + Cellular4g, + Bluetooth, + Ethernet, + Wifi, + Wimax, + Other, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/Cookie.cs b/source/ChromeDevTools/Protocol/Chrome/Network/Cookie.cs index f88cc68992e8a36c747ee3a29c965b1c1959d2e6..53c934194af4017e872eeb0bbefd31bdb1e2c1db 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/Cookie.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/Cookie.cs @@ -27,7 +27,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> public string Path { get; set; } /// <summary> - /// Gets or sets Cookie expires. + /// Gets or sets Cookie expiration date as the number of seconds since the UNIX epoch. /// </summary> public double Expires { get; set; } /// <summary> @@ -46,5 +46,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// Gets or sets True in case of session cookie. /// </summary> public bool Session { get; set; } + /// <summary> + /// Gets or sets Cookie SameSite type. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public CookieSameSite SameSite { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/CookieSameSite.cs b/source/ChromeDevTools/Protocol/Chrome/Network/CookieSameSite.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed61694d3c5aca37cdeb855fcabdd518425afc35 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/CookieSameSite.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network{ + /// <summary> + /// Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum CookieSameSite + { + Strict, + Lax, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/DeleteCookieCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/DeleteCookieCommand.cs index eeba45f7fd5d9a6f642e881b866fa5513ce77839..3de4c3aa78080d691f8561291b8142a928422335 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/DeleteCookieCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/DeleteCookieCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.DeleteCookie)] [SupportedBy("Chrome")] - public class DeleteCookieCommand + public class DeleteCookieCommand: ICommand<DeleteCookieCommandResponse> { /// <summary> /// Gets or sets Name of the cookie to remove. diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/DisableCommand.cs index f524f7d143862102499cab88c6a2c8f7f4c9fec9..e09a09ee478347a5ea14157b4ccac97d886da2b6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/EmulateNetworkConditionsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/EmulateNetworkConditionsCommand.cs index d794fc502031bd54ae5e28537fdd4bd18980739e..f6b65e256f90b5374be6d792cc8640d40950f919 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/EmulateNetworkConditionsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/EmulateNetworkConditionsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.EmulateNetworkConditions)] [SupportedBy("Chrome")] - public class EmulateNetworkConditionsCommand + public class EmulateNetworkConditionsCommand: ICommand<EmulateNetworkConditionsCommandResponse> { /// <summary> /// Gets or sets True to emulate internet disconnection. @@ -27,5 +27,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// Gets or sets Maximal aggregated upload throughput. /// </summary> public double UploadThroughput { get; set; } + /// <summary> + /// Gets or sets Connection type if known. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string ConnectionType { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/EnableCommand.cs index b601cff7a7ec898db72664b5c822146135820fae..7e5b243dc3562f92b779ba6d8bb9e6d9380328ab 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/EnableCommand.cs @@ -9,7 +9,17 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { + /// <summary> + /// Gets or sets Buffer size in bytes to use when preserving network payloads (XHRs, etc). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? MaxTotalBufferSize { get; set; } + /// <summary> + /// Gets or sets Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? MaxResourceBufferSize { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/GetAllCookiesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/GetAllCookiesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b68bf19247e89cd34a122684eb5fa95198a8c896 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/GetAllCookiesCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// </summary> + [Command(ProtocolName.Network.GetAllCookies)] + [SupportedBy("Chrome")] + public class GetAllCookiesCommand: ICommand<GetAllCookiesCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/GetAllCookiesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/GetAllCookiesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..413c3cda82682715617f4b858f1203491d5a9772 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/GetAllCookiesCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// </summary> + [CommandResponse(ProtocolName.Network.GetAllCookies)] + [SupportedBy("Chrome")] + public class GetAllCookiesCommandResponse + { + /// <summary> + /// Gets or sets Array of cookie objects. + /// </summary> + public Cookie[] Cookies { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/GetCertificateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/GetCertificateCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b040472880acd80b31cf9e6b74f0c955eb0c356 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/GetCertificateCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Returns the DER-encoded certificate. + /// </summary> + [Command(ProtocolName.Network.GetCertificate)] + [SupportedBy("Chrome")] + public class GetCertificateCommand: ICommand<GetCertificateCommandResponse> + { + /// <summary> + /// Gets or sets Origin to get certificate for. + /// </summary> + public string Origin { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/GetCertificateCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/GetCertificateCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a56f15a1247a34d517e6ed23887ac5e45dedd80 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/GetCertificateCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Returns the DER-encoded certificate. + /// </summary> + [CommandResponse(ProtocolName.Network.GetCertificate)] + [SupportedBy("Chrome")] + public class GetCertificateCommandResponse + { + /// <summary> + /// Gets or sets TableNames + /// </summary> + public string[] TableNames { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommand.cs index 5a8a6613052a7774f59d9cc169b69bef235f1d72..e0fb0d6c98b7b1ccc7b612115f453237c54f2128 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommand.cs @@ -5,11 +5,16 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network { /// <summary> - /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. /// </summary> [Command(ProtocolName.Network.GetCookies)] [SupportedBy("Chrome")] - public class GetCookiesCommand + public class GetCookiesCommand: ICommand<GetCookiesCommandResponse> { + /// <summary> + /// Gets or sets The list of URLs for which applicable cookies will be fetched + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string[] Urls { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommandResponse.cs index 6722e7bf29bcbde38e0860d744631464178541ed..792722a7184924c7731fbcd40bbb1766b4ad23c0 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/GetCookiesCommandResponse.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network { /// <summary> - /// Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. + /// Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field. /// </summary> [CommandResponse(ProtocolName.Network.GetCookies)] [SupportedBy("Chrome")] diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/GetResponseBodyCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/GetResponseBodyCommand.cs index c997a27321510b92d06ef425ac501885fd79f576..c3d4fc863cd2c07d598ba15b46571fc47d1b4248 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/GetResponseBodyCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/GetResponseBodyCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.GetResponseBody)] [SupportedBy("Chrome")] - public class GetResponseBodyCommand + public class GetResponseBodyCommand: ICommand<GetResponseBodyCommandResponse> { /// <summary> /// Gets or sets Identifier of the network request to get content for. diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/Headers.cs similarity index 51% rename from source/ChromeDevTools/Protocol/Chrome/Timeline/EnableCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Network/Headers.cs index 2fa8ca4639d28bde7b482278bf6ec077b16b17dd..c4ae7fdfad901b9352a4c30b1c77e46274159994 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/Headers.cs @@ -2,14 +2,13 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network { /// <summary> - /// Deprecated. + /// Request / response headers as keys / values of JSON object. /// </summary> - [Command(ProtocolName.Timeline.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class Headers { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/Initiator.cs b/source/ChromeDevTools/Protocol/Chrome/Network/Initiator.cs index 65cd26e823d0cb29f0441b32c144eb24c791db93..d2212b8de921c8e39b6672fc57cebdd19883b9aa 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/Initiator.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/Initiator.cs @@ -18,21 +18,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// Gets or sets Initiator JavaScript stack trace, set for Script only. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.CallFrame[] StackTrace { get; set; } + public Runtime.StackTrace Stack { get; set; } /// <summary> /// Gets or sets Initiator URL, set for Parser type only. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Url { get; set; } /// <summary> - /// Gets or sets Initiator line number, set for Parser type only. + /// Gets or sets Initiator line number, set for Parser type only (0-based). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public double LineNumber { get; set; } - /// <summary> - /// Gets or sets Initiator asynchronous JavaScript stack trace, if available. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.AsyncStackTrace AsyncStackTrace { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/LoadingFailedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Network/LoadingFailedEvent.cs index ed295f30ed2ccf80968f2fd9fc1c62da02120d64..6e3df63e2d0f87a034a2347d19238ca214cad8ce 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/LoadingFailedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/LoadingFailedEvent.cs @@ -30,5 +30,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? Canceled { get; set; } + /// <summary> + /// Gets or sets The reason why loading was blocked, if any. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public BlockedReason BlockedReason { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/ReplayXHRCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/ReplayXHRCommand.cs index 290f2cbdecf45d82bb46b9537c0d9b3095c73d48..0ae6737b286ea509707b45224f23f1e0762be0b5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/ReplayXHRCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/ReplayXHRCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.ReplayXHR)] [SupportedBy("Chrome")] - public class ReplayXHRCommand + public class ReplayXHRCommand: ICommand<ReplayXHRCommandResponse> { /// <summary> /// Gets or sets Identifier of XHR to replay. diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs b/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs index a8909b678386bba15800e546a16411919bfa1217..7845175157bf578df47549c69de6fe66c6d33472 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/Request.cs @@ -27,5 +27,23 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string PostData { get; set; } + /// <summary> + /// Gets or sets The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/ + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string MixedContentType { get; set; } + /// <summary> + /// Gets or sets Priority of the resource request at the time request is sent. + /// </summary> + public ResourcePriority InitialPriority { get; set; } + /// <summary> + /// Gets or sets The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ + /// </summary> + public string ReferrerPolicy { get; set; } + /// <summary> + /// Gets or sets Whether is loaded via link preload. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IsLinkPreload { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/ResourceChangedPriorityEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Network/ResourceChangedPriorityEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..551ced60c1545a835d9bf8788481e9e6f503d28c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/ResourceChangedPriorityEvent.cs @@ -0,0 +1,25 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Fired when resource loading priority is changed + /// </summary> + [Event(ProtocolName.Network.ResourceChangedPriority)] + [SupportedBy("Chrome")] + public class ResourceChangedPriorityEvent + { + /// <summary> + /// Gets or sets Request identifier. + /// </summary> + public string RequestId { get; set; } + /// <summary> + /// Gets or sets New priority + /// </summary> + public ResourcePriority NewPriority { get; set; } + /// <summary> + /// Gets or sets Timestamp. + /// </summary> + public double Timestamp { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/ResourcePriority.cs b/source/ChromeDevTools/Protocol/Chrome/Network/ResourcePriority.cs new file mode 100644 index 0000000000000000000000000000000000000000..51fc358d32b37239c722c65cb1609fd42f2eed69 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/ResourcePriority.cs @@ -0,0 +1,20 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network{ + /// <summary> + /// Loading priority of a resource request. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum ResourcePriority + { + VeryLow, + Low, + Medium, + High, + VeryHigh, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/ResourceTiming.cs b/source/ChromeDevTools/Protocol/Chrome/Network/ResourceTiming.cs index 27636196110d5e9715227b7caddc139e72475bd8..757021df57d56ed4c815a3c34e824ee34c79c532 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/ResourceTiming.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/ResourceTiming.cs @@ -47,17 +47,13 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> public double SslEnd { get; set; } /// <summary> - /// Gets or sets Started fetching via ServiceWorker. + /// Gets or sets Started running ServiceWorker. /// </summary> - public double ServiceWorkerFetchStart { get; set; } + public double WorkerStart { get; set; } /// <summary> - /// Gets or sets Prepared a ServiceWorker. + /// Gets or sets Finished Starting ServiceWorker. /// </summary> - public double ServiceWorkerFetchReady { get; set; } - /// <summary> - /// Gets or sets Finished fetching via ServiceWorker. - /// </summary> - public double ServiceWorkerFetchEnd { get; set; } + public double WorkerReady { get; set; } /// <summary> /// Gets or sets Started sending request. /// </summary> @@ -67,6 +63,14 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> public double SendEnd { get; set; } /// <summary> + /// Gets or sets Time the server started pushing request. + /// </summary> + public double PushStart { get; set; } + /// <summary> + /// Gets or sets Time the server finished pushing request. + /// </summary> + public double PushEnd { get; set; } + /// <summary> /// Gets or sets Finished receiving response headers. /// </summary> public double ReceiveHeadersEnd { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/Response.cs b/source/ChromeDevTools/Protocol/Chrome/Network/Response.cs index 88f2e814b59b880fbd7b72be3883ee318aadf700..634d56b8ffe1912840631b771450200e3c277b10 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/Response.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/Response.cs @@ -83,9 +83,18 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public ResourceTiming Timing { get; set; } /// <summary> - /// Gets or sets Protocol used to fetch this resquest. + /// Gets or sets Protocol used to fetch this request. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Protocol { get; set; } + /// <summary> + /// Gets or sets Security state of the request resource. + /// </summary> + public Security.SecurityState SecurityState { get; set; } + /// <summary> + /// Gets or sets Security details for the request. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public SecurityDetails SecurityDetails { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SecurityDetails.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SecurityDetails.cs new file mode 100644 index 0000000000000000000000000000000000000000..e82b47087c79701699994d1ace737a31c4677de6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SecurityDetails.cs @@ -0,0 +1,64 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Security details about a request. + /// </summary> + [SupportedBy("Chrome")] + public class SecurityDetails + { + /// <summary> + /// Gets or sets Protocol name (e.g. "TLS 1.2" or "QUIC"). + /// </summary> + public string Protocol { get; set; } + /// <summary> + /// Gets or sets Key Exchange used by the connection, or the empty string if not applicable. + /// </summary> + public string KeyExchange { get; set; } + /// <summary> + /// Gets or sets (EC)DH group used by the connection, if applicable. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string KeyExchangeGroup { get; set; } + /// <summary> + /// Gets or sets Cipher name. + /// </summary> + public string Cipher { get; set; } + /// <summary> + /// Gets or sets TLS MAC. Note that AEAD ciphers do not have separate MACs. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Mac { get; set; } + /// <summary> + /// Gets or sets Certificate ID value. + /// </summary> + public long CertificateId { get; set; } + /// <summary> + /// Gets or sets Certificate subject name. + /// </summary> + public string SubjectName { get; set; } + /// <summary> + /// Gets or sets Subject Alternative Name (SAN) DNS names and IP addresses. + /// </summary> + public string[] SanList { get; set; } + /// <summary> + /// Gets or sets Name of the issuing CA. + /// </summary> + public string Issuer { get; set; } + /// <summary> + /// Gets or sets Certificate valid from date. + /// </summary> + public double ValidFrom { get; set; } + /// <summary> + /// Gets or sets Certificate valid to (expiration) date + /// </summary> + public double ValidTo { get; set; } + /// <summary> + /// Gets or sets List of signed certificate timestamps (SCTs). + /// </summary> + public SignedCertificateTimestamp[] SignedCertificateTimestampList { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..be4d14ff50fe23ea3daffc0372ed1d112078c172 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Blocks URLs from loading. + /// </summary> + [Command(ProtocolName.Network.SetBlockedURLs)] + [SupportedBy("Chrome")] + public class SetBlockedURLsCommand: ICommand<SetBlockedURLsCommandResponse> + { + /// <summary> + /// Gets or sets URL patterns to block. Wildcards ('*') are allowed. + /// </summary> + public string[] Urls { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2eb769cd06a95aed073450b151d7a153614f8128 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetBlockedURLsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Blocks URLs from loading. + /// </summary> + [CommandResponse(ProtocolName.Network.SetBlockedURLs)] + [SupportedBy("Chrome")] + public class SetBlockedURLsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetBypassServiceWorkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetBypassServiceWorkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d194081d2249251f808662258aebab8f25fa5687 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetBypassServiceWorkerCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Toggles ignoring of service worker for each request. + /// </summary> + [Command(ProtocolName.Network.SetBypassServiceWorker)] + [SupportedBy("Chrome")] + public class SetBypassServiceWorkerCommand: ICommand<SetBypassServiceWorkerCommandResponse> + { + /// <summary> + /// Gets or sets Bypass service worker and load from network. + /// </summary> + public bool Bypass { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetBypassServiceWorkerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetBypassServiceWorkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b7500b6c9ef2c21e879216da4c7e69bc45682478 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetBypassServiceWorkerCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Toggles ignoring of service worker for each request. + /// </summary> + [CommandResponse(ProtocolName.Network.SetBypassServiceWorker)] + [SupportedBy("Chrome")] + public class SetBypassServiceWorkerCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetCacheDisabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetCacheDisabledCommand.cs index 650df4dcff0cb99a978cdeb3a57696c61ca50778..cd34ac20158aa2ad597ee3d7a8a0f34472c87012 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetCacheDisabledCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetCacheDisabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.SetCacheDisabled)] [SupportedBy("Chrome")] - public class SetCacheDisabledCommand + public class SetCacheDisabledCommand: ICommand<SetCacheDisabledCommandResponse> { /// <summary> /// Gets or sets Cache disabled state. diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetCookieCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetCookieCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c06c2d034a14353fca093730829897f72dd69426 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetCookieCommand.cs @@ -0,0 +1,57 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. + /// </summary> + [Command(ProtocolName.Network.SetCookie)] + [SupportedBy("Chrome")] + public class SetCookieCommand: ICommand<SetCookieCommandResponse> + { + /// <summary> + /// Gets or sets The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets The name of the cookie. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets The value of the cookie. + /// </summary> + public string Value { get; set; } + /// <summary> + /// Gets or sets If omitted, the cookie becomes a host-only cookie. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Domain { get; set; } + /// <summary> + /// Gets or sets Defaults to the path portion of the url parameter. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Path { get; set; } + /// <summary> + /// Gets or sets Defaults ot false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Secure { get; set; } + /// <summary> + /// Gets or sets Defaults to false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? HttpOnly { get; set; } + /// <summary> + /// Gets or sets Defaults to browser default behavior. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string SameSite { get; set; } + /// <summary> + /// Gets or sets If omitted, the cookie becomes a session cookie. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double ExpirationDate { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetCookieCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetCookieCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..28ac8255155e7bda0efe887698dd035038e0f08d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetCookieCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. + /// </summary> + [CommandResponse(ProtocolName.Network.SetCookie)] + [SupportedBy("Chrome")] + public class SetCookieCommandResponse + { + /// <summary> + /// Gets or sets True if successfully set cookie. + /// </summary> + public bool Success { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetDataSizeLimitsForTestCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetDataSizeLimitsForTestCommand.cs index ea4d50718309d93eb21ba4bb663863c86b529d55..61c0d0aa4f3fadad5c19b0f58a7f85d8abe988bb 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetDataSizeLimitsForTestCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetDataSizeLimitsForTestCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.SetDataSizeLimitsForTest)] [SupportedBy("Chrome")] - public class SetDataSizeLimitsForTestCommand + public class SetDataSizeLimitsForTestCommand: ICommand<SetDataSizeLimitsForTestCommandResponse> { /// <summary> /// Gets or sets Maximum total buffer size. diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetExtraHTTPHeadersCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetExtraHTTPHeadersCommand.cs index d0a694699328b394ec6273f1e02864b53012be45..ff46e91faf504e90ddded855bd5cce4870a2d09a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetExtraHTTPHeadersCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetExtraHTTPHeadersCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.SetExtraHTTPHeaders)] [SupportedBy("Chrome")] - public class SetExtraHTTPHeadersCommand + public class SetExtraHTTPHeadersCommand: ICommand<SetExtraHTTPHeadersCommandResponse> { /// <summary> /// Gets or sets Map with extra HTTP headers. diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommand.cs deleted file mode 100644 index 5b4b2d0613c549476c7dc13d68cdf0b019dea08f..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network -{ - /// <summary> - /// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued. - /// </summary> - [Command(ProtocolName.Network.SetMonitoringXHREnabled)] - [SupportedBy("Chrome")] - public class SetMonitoringXHREnabledCommand - { - /// <summary> - /// Gets or sets Monitoring enabled state. - /// </summary> - public bool Enabled { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommandResponse.cs deleted file mode 100644 index 32747df88f57a442f525b052944c2c23f9a13f1c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetMonitoringXHREnabledCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network -{ - /// <summary> - /// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued. - /// </summary> - [CommandResponse(ProtocolName.Network.SetMonitoringXHREnabled)] - [SupportedBy("Chrome")] - public class SetMonitoringXHREnabledCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SetUserAgentOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SetUserAgentOverrideCommand.cs index 8defc6540ac77c25f4f1f09be2668ac146b0ffed..72621ec702342f703d6184127d216a81c04aa983 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/SetUserAgentOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SetUserAgentOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// </summary> [Command(ProtocolName.Network.SetUserAgentOverride)] [SupportedBy("Chrome")] - public class SetUserAgentOverrideCommand + public class SetUserAgentOverrideCommand: ICommand<SetUserAgentOverrideCommandResponse> { /// <summary> /// Gets or sets User agent to use. diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/SignedCertificateTimestamp.cs b/source/ChromeDevTools/Protocol/Chrome/Network/SignedCertificateTimestamp.cs new file mode 100644 index 0000000000000000000000000000000000000000..ec22689db3c52705bedddaf3a9c5b254fd78323c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Network/SignedCertificateTimestamp.cs @@ -0,0 +1,46 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network +{ + /// <summary> + /// Details of a signed certificate timestamp (SCT). + /// </summary> + [SupportedBy("Chrome")] + public class SignedCertificateTimestamp + { + /// <summary> + /// Gets or sets Validation status. + /// </summary> + public string Status { get; set; } + /// <summary> + /// Gets or sets Origin. + /// </summary> + public string Origin { get; set; } + /// <summary> + /// Gets or sets Log name / description. + /// </summary> + public string LogDescription { get; set; } + /// <summary> + /// Gets or sets Log ID. + /// </summary> + public string LogId { get; set; } + /// <summary> + /// Gets or sets Issuance date. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Hash algorithm. + /// </summary> + public string HashAlgorithm { get; set; } + /// <summary> + /// Gets or sets Signature algorithm. + /// </summary> + public string SignatureAlgorithm { get; set; } + /// <summary> + /// Gets or sets Signature data. + /// </summary> + public string SignatureData { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Network/WebSocketCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Network/WebSocketCreatedEvent.cs index 363dd1175bac76fa8bdba41cf8588919e1568613..be812cc616e57d20b7569efb9410f88497ad9747 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Network/WebSocketCreatedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Network/WebSocketCreatedEvent.cs @@ -17,5 +17,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network /// Gets or sets WebSocket request URL. /// </summary> public string Url { get; set; } + /// <summary> + /// Gets or sets Request initiator. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Initiator Initiator { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d00619de6cebf197eb62fafd02530680517f13f3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Disables domain notifications. + /// </summary> + [Command(ProtocolName.Overlay.Disable)] + [SupportedBy("Chrome")] + public class DisableCommand: ICommand<DisableCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/DisableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommandResponse.cs similarity index 57% rename from source/ChromeDevTools/Protocol/Chrome/Timeline/DisableCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommandResponse.cs index 1208671ae2c0273e7eab17051db5f9a6313b2bd1..d441c57f3fd8fbdbc10624905b511900f7967667 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/DisableCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/DisableCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> - /// Deprecated. + /// Disables domain notifications. /// </summary> - [CommandResponse(ProtocolName.Timeline.Disable)] + [CommandResponse(ProtocolName.Overlay.Disable)] [SupportedBy("Chrome")] public class DisableCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b1841c44b7159f845920ebe4133ecf14bb0a6cf6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Enables domain notifications. + /// </summary> + [Command(ProtocolName.Overlay.Enable)] + [SupportedBy("Chrome")] + public class EnableCommand: ICommand<EnableCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Canvas/EnableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommandResponse.cs similarity index 57% rename from source/ChromeDevTools/Protocol/Chrome/Canvas/EnableCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommandResponse.cs index f065a7c2495696bca844da26e469987c7f347e4e..2ace3bf8851e090052d456febedecf0754d15168 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Canvas/EnableCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/EnableCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Canvas +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> - /// Enables Canvas inspection. + /// Enables domain notifications. /// </summary> - [CommandResponse(ProtocolName.Canvas.Enable)] + [CommandResponse(ProtocolName.Overlay.Enable)] [SupportedBy("Chrome")] public class EnableCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommand.cs similarity index 58% rename from source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommand.cs index 42efbd571d7779e1895566b03311414b4f3552a4..c8ee0b048dbd03032891954f0cf8ab2cca96afa8 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// For testing. /// </summary> - [Command(ProtocolName.DOM.GetHighlightObjectForTest)] + [Command(ProtocolName.Overlay.GetHighlightObjectForTest)] [SupportedBy("Chrome")] - public class GetHighlightObjectForTestCommand + public class GetHighlightObjectForTestCommand: ICommand<GetHighlightObjectForTestCommandResponse> { /// <summary> /// Gets or sets Id of the node to get highlight object for. diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommandResponse.cs similarity index 73% rename from source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommandResponse.cs index 5e0c8fc098999396a553a9ccf34ab930dba2bed0..43eaeb523deb408d34d09236fa9c1b63544c7ac9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/GetHighlightObjectForTestCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/GetHighlightObjectForTestCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// For testing. /// </summary> - [CommandResponse(ProtocolName.DOM.GetHighlightObjectForTest)] + [CommandResponse(ProtocolName.Overlay.GetHighlightObjectForTest)] [SupportedBy("Chrome")] public class GetHighlightObjectForTestCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b71c3e3e403c72a30dd3622b7aec6cfd26549bb4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Hides any highlight. + /// </summary> + [Command(ProtocolName.Overlay.HideHighlight)] + [SupportedBy("Chrome")] + public class HideHighlightCommand: ICommand<HideHighlightCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5fa6d12c722a007b3a5f537a43e4e16e8b07e33d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HideHighlightCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Hides any highlight. + /// </summary> + [CommandResponse(ProtocolName.Overlay.HideHighlight)] + [SupportedBy("Chrome")] + public class HideHighlightCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightConfig.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightConfig.cs similarity index 73% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightConfig.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightConfig.cs index 3392e2a7285ce8a8896823d19ce51b0539366661..96a783aa74c4c7a0f47c3e60ec40af3176f51329 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightConfig.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightConfig.cs @@ -2,7 +2,7 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Configuration data for the highlighting of page elements. @@ -26,39 +26,49 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? ShowExtensionLines { get; set; } /// <summary> + /// Gets or sets DisplayAsMaterial + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? DisplayAsMaterial { get; set; } + /// <summary> /// Gets or sets The content box highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ContentColor { get; set; } + public DOM.RGBA ContentColor { get; set; } /// <summary> /// Gets or sets The padding highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA PaddingColor { get; set; } + public DOM.RGBA PaddingColor { get; set; } /// <summary> /// Gets or sets The border highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA BorderColor { get; set; } + public DOM.RGBA BorderColor { get; set; } /// <summary> /// Gets or sets The margin highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA MarginColor { get; set; } + public DOM.RGBA MarginColor { get; set; } /// <summary> /// Gets or sets The event target element highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA EventTargetColor { get; set; } + public DOM.RGBA EventTargetColor { get; set; } /// <summary> /// Gets or sets The shape outside fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ShapeColor { get; set; } + public DOM.RGBA ShapeColor { get; set; } /// <summary> /// Gets or sets The shape margin fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ShapeMarginColor { get; set; } + public DOM.RGBA ShapeMarginColor { get; set; } + /// <summary> + /// Gets or sets Selectors to highlight relevant nodes. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string SelectorList { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommand.cs similarity index 71% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommand.cs index 43a7129634069b6df22e2709e37c2d34a506eb45..a053ba279ce4d5d88582d6461ee76b6279afb55d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights owner element of the frame with given id. /// </summary> - [Command(ProtocolName.DOM.HighlightFrame)] + [Command(ProtocolName.Overlay.HighlightFrame)] [SupportedBy("Chrome")] - public class HighlightFrameCommand + public class HighlightFrameCommand: ICommand<HighlightFrameCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame to highlight. @@ -19,11 +19,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// Gets or sets The content box highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ContentColor { get; set; } + public DOM.RGBA ContentColor { get; set; } /// <summary> /// Gets or sets The content box highlight outline color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA ContentOutlineColor { get; set; } + public DOM.RGBA ContentOutlineColor { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommandResponse.cs similarity index 69% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommandResponse.cs index 47d55595c6f8a5feeca70381e53d57de3f7c8e07..ec37eb745b4c7dab1e90ea9738014d9d12c3ae06 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightFrameCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightFrameCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights owner element of the frame with given id. /// </summary> - [CommandResponse(ProtocolName.DOM.HighlightFrame)] + [CommandResponse(ProtocolName.Overlay.HighlightFrame)] [SupportedBy("Chrome")] public class HighlightFrameCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..629ab4d9c323f8f188a223b58cd3f67c1c4fd3f4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommand.cs @@ -0,0 +1,34 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// </summary> + [Command(ProtocolName.Overlay.HighlightNode)] + [SupportedBy("Chrome")] + public class HighlightNodeCommand: ICommand<HighlightNodeCommandResponse> + { + /// <summary> + /// Gets or sets A descriptor for the highlight appearance. + /// </summary> + public HighlightConfig HighlightConfig { get; set; } + /// <summary> + /// Gets or sets Identifier of the node to highlight. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? NodeId { get; set; } + /// <summary> + /// Gets or sets Identifier of the backend node to highlight. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? BackendNodeId { get; set; } + /// <summary> + /// Gets or sets JavaScript object id of the node to be highlighted. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string ObjectId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..6baa6bedd0a825e5be17a439c90d9110e7ef8643 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightNodeCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. + /// </summary> + [CommandResponse(ProtocolName.Overlay.HighlightNode)] + [SupportedBy("Chrome")] + public class HighlightNodeCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommand.cs similarity index 72% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommand.cs index 88252e62fa885bbbaa0aa1945720ba65231210c6..642736277a56c1a33659a04ebfd4eeaad67641d0 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights given quad. Coordinates are absolute with respect to the main frame viewport. /// </summary> - [Command(ProtocolName.DOM.HighlightQuad)] + [Command(ProtocolName.Overlay.HighlightQuad)] [SupportedBy("Chrome")] - public class HighlightQuadCommand + public class HighlightQuadCommand: ICommand<HighlightQuadCommandResponse> { /// <summary> /// Gets or sets Quad to highlight @@ -19,11 +19,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM /// Gets or sets The highlight fill color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA Color { get; set; } + public DOM.RGBA Color { get; set; } /// <summary> /// Gets or sets The highlight outline color (default: transparent). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public RGBA OutlineColor { get; set; } + public DOM.RGBA OutlineColor { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommandResponse.cs similarity index 71% rename from source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommandResponse.cs index f8c60082ab7216892aeb0b2a0cd43c9e33275ea6..655035ff76827807115f0a69abbce932aa088381 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/HighlightQuadCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightQuadCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Highlights given quad. Coordinates are absolute with respect to the main frame viewport. /// </summary> - [CommandResponse(ProtocolName.DOM.HighlightQuad)] + [CommandResponse(ProtocolName.Overlay.HighlightQuad)] [SupportedBy("Chrome")] public class HighlightQuadCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..59e83dad0d8a1091c7d94e2f0fe773882b9aabbe --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommand.cs @@ -0,0 +1,41 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [Command(ProtocolName.Overlay.HighlightRect)] + [SupportedBy("Chrome")] + public class HighlightRectCommand: ICommand<HighlightRectCommandResponse> + { + /// <summary> + /// Gets or sets X coordinate + /// </summary> + public long X { get; set; } + /// <summary> + /// Gets or sets Y coordinate + /// </summary> + public long Y { get; set; } + /// <summary> + /// Gets or sets Rectangle width + /// </summary> + public long Width { get; set; } + /// <summary> + /// Gets or sets Rectangle height + /// </summary> + public long Height { get; set; } + /// <summary> + /// Gets or sets The highlight fill color (default: transparent). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public DOM.RGBA Color { get; set; } + /// <summary> + /// Gets or sets The highlight outline color (default: transparent). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public DOM.RGBA OutlineColor { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c12b30b4331688a99699bc844a0c40bdfb75c8c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/HighlightRectCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + /// </summary> + [CommandResponse(ProtocolName.Overlay.HighlightRect)] + [SupportedBy("Chrome")] + public class HighlightRectCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectMode.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectMode.cs new file mode 100644 index 0000000000000000000000000000000000000000..a82ea1408fb3db08b20389fa24aba004a6dae919 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectMode.cs @@ -0,0 +1,18 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay{ + /// <summary> + /// + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum InspectMode + { + SearchForNode, + SearchForUAShadowDOM, + None, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/InspectNodeRequestedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectNodeRequestedEvent.cs similarity index 64% rename from source/ChromeDevTools/Protocol/Chrome/DOM/InspectNodeRequestedEvent.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/InspectNodeRequestedEvent.cs index 996544109d510cca5e115c66bf19c65b211ef32e..cdcf079ddda1e80ebe258211d6557fd05a8ce9b1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/InspectNodeRequestedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/InspectNodeRequestedEvent.cs @@ -1,11 +1,11 @@ using MasterDevs.ChromeDevTools;using Newtonsoft.Json; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> - /// Fired when the node should be inspected. This happens after call to <code>setInspectModeEnabled</code>. + /// Fired when the node should be inspected. This happens after call to <code>setInspectMode</code> or when user manually inspects an element. /// </summary> - [Event(ProtocolName.DOM.InspectNodeRequested)] + [Event(ProtocolName.Overlay.InspectNodeRequested)] [SupportedBy("Chrome")] public class InspectNodeRequestedEvent { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/NodeHighlightRequestedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/NodeHighlightRequestedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..4931677b43798defc95a62627584e418c5aac816 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/NodeHighlightRequestedEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Fired when the node should be highlighted. This happens after call to <code>setInspectMode</code>. + /// </summary> + [Event(ProtocolName.Overlay.NodeHighlightRequested)] + [SupportedBy("Chrome")] + public class NodeHighlightRequestedEvent + { + /// <summary> + /// Gets or sets NodeId + /// </summary> + public long NodeId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeEnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommand.cs similarity index 57% rename from source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeEnabledCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommand.cs index adeb99e9b1e3c3aceb49dd35d12bca30e753ede4..c4f9917635f323a9f34bbf5c1579c4b4cc412f5c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeEnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommand.cs @@ -2,24 +2,19 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection. /// </summary> - [Command(ProtocolName.DOM.SetInspectModeEnabled)] + [Command(ProtocolName.Overlay.SetInspectMode)] [SupportedBy("Chrome")] - public class SetInspectModeEnabledCommand + public class SetInspectModeCommand: ICommand<SetInspectModeCommandResponse> { /// <summary> - /// Gets or sets True to enable inspection mode, false to disable it. + /// Gets or sets Set an inspection mode. /// </summary> - public bool Enabled { get; set; } - /// <summary> - /// Gets or sets True to enable inspection mode for user agent shadow DOM. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? InspectUAShadowDOM { get; set; } + public string Mode { get; set; } /// <summary> /// Gets or sets A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeEnabledCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommandResponse.cs similarity index 66% rename from source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeEnabledCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommandResponse.cs index ca440529cd65f5872421f464a5663d1d2912b27d..d08f5bb590ee49a2c4fb35a6eb8d43616de8ec3f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/DOM/SetInspectModeEnabledCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetInspectModeCommandResponse.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.DOM +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection. /// </summary> - [CommandResponse(ProtocolName.DOM.SetInspectModeEnabled)] + [CommandResponse(ProtocolName.Overlay.SetInspectMode)] [SupportedBy("Chrome")] - public class SetInspectModeEnabledCommandResponse + public class SetInspectModeCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..33806cd09bea128b0697eb95cd1cb7828d7d7e79 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommand.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [Command(ProtocolName.Overlay.SetPausedInDebuggerMessage)] + [SupportedBy("Chrome")] + public class SetPausedInDebuggerMessageCommand: ICommand<SetPausedInDebuggerMessageCommandResponse> + { + /// <summary> + /// Gets or sets The message to display, also triggers resume and step over controls. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Message { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7e1efed32c4280eadb6361f742eb835c528a005 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetPausedInDebuggerMessageCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [CommandResponse(ProtocolName.Overlay.SetPausedInDebuggerMessage)] + [SupportedBy("Chrome")] + public class SetPausedInDebuggerMessageCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommand.cs similarity index 62% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommand.cs index cbb860cc57a8116bd2f45f37b5218888c45daefc..b8b0fd9ad85bda48b60292e109068b97f04d25d3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows debug borders on layers /// </summary> - [Command(ProtocolName.Rendering.SetShowDebugBorders)] + [Command(ProtocolName.Overlay.SetShowDebugBorders)] [SupportedBy("Chrome")] - public class SetShowDebugBordersCommand + public class SetShowDebugBordersCommand: ICommand<SetShowDebugBordersCommandResponse> { /// <summary> /// Gets or sets True for showing debug borders diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommandResponse.cs similarity index 67% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommandResponse.cs index 93d88e1f33c9283f8c13538c544788ac6337f36b..b7a86b6781da1dc73db55c1fddd16d3e357f8f32 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowDebugBordersCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowDebugBordersCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows debug borders on layers /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowDebugBorders)] + [CommandResponse(ProtocolName.Overlay.SetShowDebugBorders)] [SupportedBy("Chrome")] public class SetShowDebugBordersCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommand.cs similarity index 62% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommand.cs index ba4bdf25bfa0dfb901b527faa81da49dfb282cba..1cbef45a269dcebdac9e5bb2f64dd3598b68af69 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows the FPS counter /// </summary> - [Command(ProtocolName.Rendering.SetShowFPSCounter)] + [Command(ProtocolName.Overlay.SetShowFPSCounter)] [SupportedBy("Chrome")] - public class SetShowFPSCounterCommand + public class SetShowFPSCounterCommand: ICommand<SetShowFPSCounterCommandResponse> { /// <summary> /// Gets or sets True for showing the FPS counter diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommandResponse.cs similarity index 67% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommandResponse.cs index 987b752680921c5c740486fe3b1180bff505c809..361fcf7849734cf31687b7b9562a5f8bca656e41 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowFPSCounterCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowFPSCounterCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows the FPS counter /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowFPSCounter)] + [CommandResponse(ProtocolName.Overlay.SetShowFPSCounter)] [SupportedBy("Chrome")] public class SetShowFPSCounterCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommand.cs similarity index 62% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommand.cs index 46fa327af22de195d6d52beaa05b79b66d820ed2..0ef21627d238040523599956e9ac97a001c71c18 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows paint rectangles /// </summary> - [Command(ProtocolName.Rendering.SetShowPaintRects)] + [Command(ProtocolName.Overlay.SetShowPaintRects)] [SupportedBy("Chrome")] - public class SetShowPaintRectsCommand + public class SetShowPaintRectsCommand: ICommand<SetShowPaintRectsCommandResponse> { /// <summary> /// Gets or sets True for showing paint rectangles diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommandResponse.cs similarity index 67% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommandResponse.cs index 2b31d5f7bb2b2289ceec0ea04b4fe22c158c6551..cd69541a5390c8f56794f00f2390fcb79d55a25f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowPaintRectsCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowPaintRectsCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows paint rectangles /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowPaintRects)] + [CommandResponse(ProtocolName.Overlay.SetShowPaintRects)] [SupportedBy("Chrome")] public class SetShowPaintRectsCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommand.cs similarity index 59% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommand.cs index 462ebec49f8fad83f61c40fa2c7574f2e5c4a414..c02953bbe9f77a6adeb614b04a4fab5d0fe6e30b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows scroll bottleneck rects /// </summary> - [Command(ProtocolName.Rendering.SetShowScrollBottleneckRects)] + [Command(ProtocolName.Overlay.SetShowScrollBottleneckRects)] [SupportedBy("Chrome")] - public class SetShowScrollBottleneckRectsCommand + public class SetShowScrollBottleneckRectsCommand: ICommand<SetShowScrollBottleneckRectsCommandResponse> { /// <summary> /// Gets or sets True for showing scroll bottleneck rects diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommandResponse.cs similarity index 66% rename from source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommandResponse.cs index 89528ea74a8fe2b7b05d2541d36131e27a3f631d..1865574fc75789d300b4d9de43b74cebcc41a88f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetShowScrollBottleneckRectsCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowScrollBottleneckRectsCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Requests that backend shows scroll bottleneck rects /// </summary> - [CommandResponse(ProtocolName.Rendering.SetShowScrollBottleneckRects)] + [CommandResponse(ProtocolName.Overlay.SetShowScrollBottleneckRects)] [SupportedBy("Chrome")] public class SetShowScrollBottleneckRectsCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e1800a346c17bc82304107289fdb3fd31070df62 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + /// <summary> + /// Paints viewport size upon main frame resize. + /// </summary> + [Command(ProtocolName.Overlay.SetShowViewportSizeOnResize)] + [SupportedBy("Chrome")] + public class SetShowViewportSizeOnResizeCommand: ICommand<SetShowViewportSizeOnResizeCommandResponse> + { + /// <summary> + /// Gets or sets Whether to paint size or not. + /// </summary> + public bool Show { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetShowViewportSizeOnResizeCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommandResponse.cs similarity index 67% rename from source/ChromeDevTools/Protocol/Chrome/Page/SetShowViewportSizeOnResizeCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommandResponse.cs index 6dc06103926ff035fd41ceafcc84f7ddce30eeb2..fc697307d08f230673e09ddaea8b954cb96c163a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetShowViewportSizeOnResizeCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetShowViewportSizeOnResizeCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay { /// <summary> /// Paints viewport size upon main frame resize. /// </summary> - [CommandResponse(ProtocolName.Page.SetShowViewportSizeOnResize)] + [CommandResponse(ProtocolName.Overlay.SetShowViewportSizeOnResize)] [SupportedBy("Chrome")] public class SetShowViewportSizeOnResizeCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f6cee47908232c6e05bc0d6b2b7441b07127cf62 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommand.cs @@ -0,0 +1,16 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [Command(ProtocolName.Overlay.SetSuspended)] + [SupportedBy("Chrome")] + public class SetSuspendedCommand: ICommand<SetSuspendedCommandResponse> + { + /// <summary> + /// Gets or sets Whether overlay should be suspended and not consume any resources until resumed. + /// </summary> + public bool Suspended { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2f9d9cab9d654cb5291519c40678f9e6ca1179d4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Overlay/SetSuspendedCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay +{ + [CommandResponse(ProtocolName.Overlay.SetSuspended)] + [SupportedBy("Chrome")] + public class SetSuspendedCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/AddScriptToEvaluateOnLoadCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/AddScriptToEvaluateOnLoadCommand.cs index 4f5ef0b0b37f5e48206eb5042a521f9b2273e9a0..88d8d19c80e2f0cef99b1e7711513d0908d3ab8b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/AddScriptToEvaluateOnLoadCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/AddScriptToEvaluateOnLoadCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { [Command(ProtocolName.Page.AddScriptToEvaluateOnLoad)] [SupportedBy("Chrome")] - public class AddScriptToEvaluateOnLoadCommand + public class AddScriptToEvaluateOnLoadCommand: ICommand<AddScriptToEvaluateOnLoadCommandResponse> { /// <summary> /// Gets or sets ScriptSource diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/AppManifestError.cs b/source/ChromeDevTools/Protocol/Chrome/Page/AppManifestError.cs new file mode 100644 index 0000000000000000000000000000000000000000..c5ccf59f505449d5eb71d3748ddbc15708350235 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/AppManifestError.cs @@ -0,0 +1,30 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Error while paring app manifest. + /// </summary> + [SupportedBy("Chrome")] + public class AppManifestError + { + /// <summary> + /// Gets or sets Error message. + /// </summary> + public string Message { get; set; } + /// <summary> + /// Gets or sets If criticial, this is a non-recoverable parse error. + /// </summary> + public long Critical { get; set; } + /// <summary> + /// Gets or sets Error line. + /// </summary> + public long Line { get; set; } + /// <summary> + /// Gets or sets Error column. + /// </summary> + public long Column { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/CanScreencastCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CanScreencastCommandResponse.cs deleted file mode 100644 index 1244221b06547d975012f1f0853feab86ed49b40..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/CanScreencastCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Tells whether screencast is supported. - /// </summary> - [CommandResponse(ProtocolName.Page.CanScreencast)] - [SupportedBy("Chrome")] - public class CanScreencastCommandResponse - { - /// <summary> - /// Gets or sets True if screencast is supported. - /// </summary> - public bool Result { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs index 41a32c02b98332f94c9826045722afbfe27db532..361674c92b228b4dc6f6c6898df755c3734ed49c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommand.cs @@ -9,7 +9,22 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.CaptureScreenshot)] [SupportedBy("Chrome")] - public class CaptureScreenshotCommand + public class CaptureScreenshotCommand: ICommand<CaptureScreenshotCommandResponse> { + /// <summary> + /// Gets or sets Image compression format (defaults to png). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Format { get; set; } + /// <summary> + /// Gets or sets Compression quality from range [0..100] (jpeg only). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Quality { get; set; } + /// <summary> + /// Gets or sets Capture the screenshot from the surface, rather than the view. Defaults to true. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? FromSurface { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommandResponse.cs index 6a26e381a9179697bdb71515bf7aad1fd61137e4..393903f2fa3c4cf71d092be240feab340c441cb3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/CaptureScreenshotCommandResponse.cs @@ -12,7 +12,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page public class CaptureScreenshotCommandResponse { /// <summary> - /// Gets or sets Base64-encoded image data (PNG). + /// Gets or sets Base64-encoded image data. /// </summary> public string Data { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceMetricsOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceMetricsOverrideCommand.cs index 78cbc3a039c708b5d17ece1b3ebc23afbb2c9185..357a059ec1afb316cbe5631965487dfbf4d29a29 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceMetricsOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceMetricsOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.ClearDeviceMetricsOverride)] [SupportedBy("Chrome")] - public class ClearDeviceMetricsOverrideCommand + public class ClearDeviceMetricsOverrideCommand: ICommand<ClearDeviceMetricsOverrideCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceOrientationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceOrientationOverrideCommand.cs index d35ef69690911902e2e9ac0bd25f09aa12e33820..47215821e6426bdb29b19955b19de99860c65674 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceOrientationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ClearDeviceOrientationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.ClearDeviceOrientationOverride)] [SupportedBy("Chrome")] - public class ClearDeviceOrientationOverrideCommand + public class ClearDeviceOrientationOverrideCommand: ICommand<ClearDeviceOrientationOverrideCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ClearGeolocationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ClearGeolocationOverrideCommand.cs index c302f706f167e5c416231c6f552980331175ef5e..426cec69ca060dd2d4a677431a1f9239c7a9f099 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ClearGeolocationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ClearGeolocationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.ClearGeolocationOverride)] [SupportedBy("Chrome")] - public class ClearGeolocationOverrideCommand + public class ClearGeolocationOverrideCommand: ICommand<ClearGeolocationOverrideCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ColorPickedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ColorPickedEvent.cs deleted file mode 100644 index 45ec9c5d8bfa44ee9c00f80e52a0a7f763d66af4..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ColorPickedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Fired when a color has been picked. - /// </summary> - [Event(ProtocolName.Page.ColorPicked)] - [SupportedBy("Chrome")] - public class ColorPickedEvent - { - /// <summary> - /// Gets or sets RGBA of the picked color. - /// </summary> - public DOM.RGBA Color { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..98e87886632718196ffd27c159fe493417b79099 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommand.cs @@ -0,0 +1,29 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Creates an isolated world for the given frame. + /// </summary> + [Command(ProtocolName.Page.CreateIsolatedWorld)] + [SupportedBy("Chrome")] + public class CreateIsolatedWorldCommand: ICommand<CreateIsolatedWorldCommandResponse> + { + /// <summary> + /// Gets or sets Id of the frame in which the isolated world should be created. + /// </summary> + public string FrameId { get; set; } + /// <summary> + /// Gets or sets An optional name which is reported in the Execution Context. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string WorldName { get; set; } + /// <summary> + /// Gets or sets Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? GrantUniveralAccess { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/CanScreencastCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommandResponse.cs similarity index 57% rename from source/ChromeDevTools/Protocol/Chrome/Page/CanScreencastCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommandResponse.cs index abf55d26b90f0708b9a149dce35d03ed687c4fa5..4fe866121bc6104de85880203e78c0aeab425d52 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/CanScreencastCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/CreateIsolatedWorldCommandResponse.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Tells whether screencast is supported. + /// Creates an isolated world for the given frame. /// </summary> - [Command(ProtocolName.Page.CanScreencast)] + [CommandResponse(ProtocolName.Page.CreateIsolatedWorld)] [SupportedBy("Chrome")] - public class CanScreencastCommand + public class CreateIsolatedWorldCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/DeleteCookieCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/DeleteCookieCommand.cs index db8b70fc2b5f0004b3154bbee1018a7727b84ddc..4792d16f5a6ee295c99d5fae25816c32afbf80a4 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/DeleteCookieCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/DeleteCookieCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.DeleteCookie)] [SupportedBy("Chrome")] - public class DeleteCookieCommand + public class DeleteCookieCommand: ICommand<DeleteCookieCommandResponse> { /// <summary> /// Gets or sets Name of the cookie to remove. diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/DialogType.cs b/source/ChromeDevTools/Protocol/Chrome/Page/DialogType.cs new file mode 100644 index 0000000000000000000000000000000000000000..544fe52b64a380301be0dafa2f4746e904a75eea --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/DialogType.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page{ + /// <summary> + /// Javascript dialog type. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum DialogType + { + Alert, + Confirm, + Prompt, + Beforeunload, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/DisableCommand.cs index a9ab2015a5fdbd7b55c29d1cb75a75358b5cea6e..8f8c6126c6ed6588d9a198af40de0994d7569ece 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/EnableCommand.cs index 20d32ec53543bc43075bfc01ddf5f7c08648a04f..863f4f48e4038857ca0856d611db8cc03b3159b5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs index e426f3dc531e80ce1af74fde7060ef06ab1cc849..04b63e8da129facd6971047d115b2e7d64ffda77 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/FrameAttachedEvent.cs @@ -17,5 +17,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// Gets or sets Parent frame identifier. /// </summary> public string ParentFrameId { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace of when frame was attached, only set if frame initiated from script. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Runtime.StackTrace Stack { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/FrameResource.cs b/source/ChromeDevTools/Protocol/Chrome/Page/FrameResource.cs new file mode 100644 index 0000000000000000000000000000000000000000..b166f37c0ee0f95ca28389671426a78c4f438b8b --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/FrameResource.cs @@ -0,0 +1,46 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Information about the Resource on the page. + /// </summary> + [SupportedBy("Chrome")] + public class FrameResource + { + /// <summary> + /// Gets or sets Resource URL. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Type of this resource. + /// </summary> + public ResourceType Type { get; set; } + /// <summary> + /// Gets or sets Resource mimeType as determined by the browser. + /// </summary> + public string MimeType { get; set; } + /// <summary> + /// Gets or sets last-modified timestamp as reported by server. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double LastModified { get; set; } + /// <summary> + /// Gets or sets Resource content size. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double ContentSize { get; set; } + /// <summary> + /// Gets or sets True if the resource failed to load. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Failed { get; set; } + /// <summary> + /// Gets or sets True if the resource was canceled during loading. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Canceled { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/FrameResourceTree.cs b/source/ChromeDevTools/Protocol/Chrome/Page/FrameResourceTree.cs index 6cace98639670c37ec48132f99c9cc37554eb425..f58ae77c367f553fe9c5188985ae45a89fcd043f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/FrameResourceTree.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/FrameResourceTree.cs @@ -19,35 +19,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public FrameResourceTree[] ChildFrames { get; set; } - public class ResourcesArray - { - /// <summary> - /// Gets or sets Resource URL. - /// </summary> - public string Url { get; set; } - /// <summary> - /// Gets or sets Type of this resource. - /// </summary> - public ResourceType Type { get; set; } - /// <summary> - /// Gets or sets Resource mimeType as determined by the browser. - /// </summary> - public string MimeType { get; set; } - /// <summary> - /// Gets or sets True if the resource failed to load. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? Failed { get; set; } - /// <summary> - /// Gets or sets True if the resource was canceled during loading. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? Canceled { get; set; } - } - /// <summary> /// Gets or sets Information about frame resources. /// </summary> - public ResourcesArray[] Resources { get; set; } + public FrameResource[] Resources { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetAppManifestCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetAppManifestCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..fc6cb6f1b6e54e9217c00a4fe6be2094e48d5f7c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetAppManifestCommand.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + [Command(ProtocolName.Page.GetAppManifest)] + [SupportedBy("Chrome")] + public class GetAppManifestCommand: ICommand<GetAppManifestCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetAppManifestCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetAppManifestCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8371023f67ec8f958e6d722ff722d9dbeca515da --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetAppManifestCommandResponse.cs @@ -0,0 +1,25 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + [CommandResponse(ProtocolName.Page.GetAppManifest)] + [SupportedBy("Chrome")] + public class GetAppManifestCommandResponse + { + /// <summary> + /// Gets or sets Manifest location. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Errors + /// </summary> + public AppManifestError[] Errors { get; set; } + /// <summary> + /// Gets or sets Manifest content. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Data { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetCookiesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetCookiesCommand.cs index 70c0c84126b1f76e734f7ca2be511b827eb2e85d..9f245b35004e0da42af8dff1aeec20bf6bc23a89 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/GetCookiesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetCookiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.GetCookies)] [SupportedBy("Chrome")] - public class GetCookiesCommand + public class GetCookiesCommand: ICommand<GetCookiesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetLayoutMetricsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetLayoutMetricsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..76739a4f515ce9ef9665c5eaeb0f5c1d392878b9 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetLayoutMetricsCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Returns metrics relating to the layouting of the page, such as viewport bounds/scale. + /// </summary> + [Command(ProtocolName.Page.GetLayoutMetrics)] + [SupportedBy("Chrome")] + public class GetLayoutMetricsCommand: ICommand<GetLayoutMetricsCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetLayoutMetricsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetLayoutMetricsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3bb17cd5af6cab878b88b7b886768a3eac293943 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetLayoutMetricsCommandResponse.cs @@ -0,0 +1,27 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Returns metrics relating to the layouting of the page, such as viewport bounds/scale. + /// </summary> + [CommandResponse(ProtocolName.Page.GetLayoutMetrics)] + [SupportedBy("Chrome")] + public class GetLayoutMetricsCommandResponse + { + /// <summary> + /// Gets or sets Metrics relating to the layout viewport. + /// </summary> + public LayoutViewport LayoutViewport { get; set; } + /// <summary> + /// Gets or sets Metrics relating to the visual viewport. + /// </summary> + public VisualViewport VisualViewport { get; set; } + /// <summary> + /// Gets or sets Size of scrollable area. + /// </summary> + public DOM.Rect ContentSize { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetNavigationHistoryCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetNavigationHistoryCommand.cs index 36268967a051561e18e7c99681498ea75393f161..d2f006c64480d9d267093f5c600a4a618b520b0a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/GetNavigationHistoryCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetNavigationHistoryCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.GetNavigationHistory)] [SupportedBy("Chrome")] - public class GetNavigationHistoryCommand + public class GetNavigationHistoryCommand: ICommand<GetNavigationHistoryCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceContentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceContentCommand.cs index 26366277fc0a363bc3ee7a90592438487ca7bed3..2091b1d65ef6a28c5d53d81de15588e68b00ca2d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceContentCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceContentCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.GetResourceContent)] [SupportedBy("Chrome")] - public class GetResourceContentCommand + public class GetResourceContentCommand: ICommand<GetResourceContentCommandResponse> { /// <summary> /// Gets or sets Frame id to get resource for. diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceTreeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceTreeCommand.cs index 37faf821a5ea6cee4bb43acd7f66a81e4384b2a0..9e1c676662bac1f450bec14c20cd1bf57bf1168f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceTreeCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/GetResourceTreeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.GetResourceTree)] [SupportedBy("Chrome")] - public class GetResourceTreeCommand + public class GetResourceTreeCommand: ICommand<GetResourceTreeCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/HandleJavaScriptDialogCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/HandleJavaScriptDialogCommand.cs index 9619ddc4d3fd0e514bd71378c3cc79896fec7301..4f02169a4a1fc7825237816a3119a850c3ba2bb7 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/HandleJavaScriptDialogCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/HandleJavaScriptDialogCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.HandleJavaScriptDialog)] [SupportedBy("Chrome")] - public class HandleJavaScriptDialogCommand + public class HandleJavaScriptDialogCommand: ICommand<HandleJavaScriptDialogCommandResponse> { /// <summary> /// Gets or sets Whether to accept or dismiss the dialog. diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogClosedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogClosedEvent.cs index e4e2a4e3a24efedc849e93fb2237017eb4952112..bd0058421184b9f28d98fdf5b495db69be908a78 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogClosedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogClosedEvent.cs @@ -9,5 +9,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page [SupportedBy("Chrome")] public class JavascriptDialogClosedEvent { + /// <summary> + /// Gets or sets Whether dialog was confirmed. + /// </summary> + public bool Result { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogOpeningEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogOpeningEvent.cs index a531c3b87236140af3a4da07cf3072e45647fe55..c0781a5b6e7b980e56439f61f20d7ce8903bb784 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogOpeningEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/JavascriptDialogOpeningEvent.cs @@ -13,5 +13,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// Gets or sets Message that will be displayed by the dialog. /// </summary> public string Message { get; set; } + /// <summary> + /// Gets or sets Dialog type. + /// </summary> + public DialogType Type { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/LayoutViewport.cs b/source/ChromeDevTools/Protocol/Chrome/Page/LayoutViewport.cs new file mode 100644 index 0000000000000000000000000000000000000000..3f3b1fdc5d5817baad8433fb5919400d64f22bd2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/LayoutViewport.cs @@ -0,0 +1,30 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Layout viewport position and dimensions. + /// </summary> + [SupportedBy("Chrome")] + public class LayoutViewport + { + /// <summary> + /// Gets or sets Horizontal offset relative to the document (CSS pixels). + /// </summary> + public long PageX { get; set; } + /// <summary> + /// Gets or sets Vertical offset relative to the document (CSS pixels). + /// </summary> + public long PageY { get; set; } + /// <summary> + /// Gets or sets Width (CSS pixels), excludes scrollbar if present. + /// </summary> + public long ClientWidth { get; set; } + /// <summary> + /// Gets or sets Height (CSS pixels), excludes scrollbar if present. + /// </summary> + public long ClientHeight { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs index 9c8acf88ab4509c60249fcb44d9d671953ab88fe..549dbda230c22d57ec967bdb403316132d6d3f25 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/NavigateCommand.cs @@ -9,11 +9,21 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.Navigate)] [SupportedBy("Chrome")] - public class NavigateCommand + public class NavigateCommand: ICommand<NavigateCommandResponse> { /// <summary> /// Gets or sets URL to navigate the page to. /// </summary> public string Url { get; set; } + /// <summary> + /// Gets or sets Referrer URL. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Referrer { get; set; } + /// <summary> + /// Gets or sets Intended transition type. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string TransitionType { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/NavigateToHistoryEntryCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/NavigateToHistoryEntryCommand.cs index 28ff1567bd2feb564091a8b9ea20c8ae85c5b100..af9de23b90c780d17c950c7bb6eda5b5343271b2 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/NavigateToHistoryEntryCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/NavigateToHistoryEntryCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.NavigateToHistoryEntry)] [SupportedBy("Chrome")] - public class NavigateToHistoryEntryCommand + public class NavigateToHistoryEntryCommand: ICommand<NavigateToHistoryEntryCommandResponse> { /// <summary> /// Gets or sets Unique id of the entry to navigate to. diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs index 301e6a0befbcc3891dfbaf2eb3f24ed9351b6b60..48e74e963c61dd452338db14d7b7bb52595c8014 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationEntry.cs @@ -19,8 +19,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> public string Url { get; set; } /// <summary> + /// Gets or sets URL that the user typed in the url bar. + /// </summary> + public string UserTypedURL { get; set; } + /// <summary> /// Gets or sets Title of the navigation history entry. /// </summary> public string Title { get; set; } + /// <summary> + /// Gets or sets Transition type. + /// </summary> + public TransitionType TransitionType { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/NavigationRequestedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationRequestedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..177a223d0f8e3326dc0d0552b67dd519509e0e10 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationRequestedEvent.cs @@ -0,0 +1,29 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called. + /// </summary> + [Event(ProtocolName.Page.NavigationRequested)] + [SupportedBy("Chrome")] + public class NavigationRequestedEvent + { + /// <summary> + /// Gets or sets Whether the navigation is taking place in the main frame or in a subframe. + /// </summary> + public bool IsInMainFrame { get; set; } + /// <summary> + /// Gets or sets Whether the navigation has encountered a server redirect or not. + /// </summary> + public bool IsRedirect { get; set; } + /// <summary> + /// Gets or sets NavigationId + /// </summary> + public long NavigationId { get; set; } + /// <summary> + /// Gets or sets URL of requested navigation. + /// </summary> + public string Url { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/NavigationResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..024dcc1777dfb1a5dc6c1126fdd4c88a2c3ea83f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/NavigationResponse.cs @@ -0,0 +1,18 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page{ + /// <summary> + /// Proceed: allow the navigation; Cancel: cancel the navigation; CancelAndIgnore: cancels the navigation and makes the requester of the navigation acts like the request was never made. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum NavigationResponse + { + Proceed, + Cancel, + CancelAndIgnore, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d77153fbef81d88c834c2aad521a9c3f2fa452e --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommand.cs @@ -0,0 +1,70 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Print page as PDF. + /// </summary> + [Command(ProtocolName.Page.PrintToPDF)] + [SupportedBy("Chrome")] + public class PrintToPDFCommand: ICommand<PrintToPDFCommandResponse> + { + /// <summary> + /// Gets or sets Paper orientation. Defaults to false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Landscape { get; set; } + /// <summary> + /// Gets or sets Display header and footer. Defaults to false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? DisplayHeaderFooter { get; set; } + /// <summary> + /// Gets or sets Print background graphics. Defaults to false. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? PrintBackground { get; set; } + /// <summary> + /// Gets or sets Scale of the webpage rendering. Defaults to 1. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double Scale { get; set; } + /// <summary> + /// Gets or sets Paper width in inches. Defaults to 8.5 inches. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double PaperWidth { get; set; } + /// <summary> + /// Gets or sets Paper height in inches. Defaults to 11 inches. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double PaperHeight { get; set; } + /// <summary> + /// Gets or sets Top margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginTop { get; set; } + /// <summary> + /// Gets or sets Bottom margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginBottom { get; set; } + /// <summary> + /// Gets or sets Left margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginLeft { get; set; } + /// <summary> + /// Gets or sets Right margin in inches. Defaults to 1cm (~0.4 inches). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public double MarginRight { get; set; } + /// <summary> + /// Gets or sets Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string PageRanges { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommandResponse.cs similarity index 54% rename from source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommandResponse.cs index a84b0f0ff4a1d03f9b83caff92a31898f69f2f48..a503ff575aa271d7aabefab5d7309d852227ecc4 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/PrintToPDFCommandResponse.cs @@ -5,15 +5,15 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Shows / hides color picker + /// Print page as PDF. /// </summary> - [Command(ProtocolName.Page.SetColorPickerEnabled)] + [CommandResponse(ProtocolName.Page.PrintToPDF)] [SupportedBy("Chrome")] - public class SetColorPickerEnabledCommand + public class PrintToPDFCommandResponse { /// <summary> - /// Gets or sets Shows / hides color picker + /// Gets or sets Base64-encoded pdf data. /// </summary> - public bool Enabled { get; set; } + public string Data { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ProcessNavigationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ProcessNavigationCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6fff07f4e6f9668b262214878273b4838374bd76 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ProcessNavigationCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation. + /// </summary> + [Command(ProtocolName.Page.ProcessNavigation)] + [SupportedBy("Chrome")] + public class ProcessNavigationCommand: ICommand<ProcessNavigationCommandResponse> + { + /// <summary> + /// Gets or sets Response + /// </summary> + public string Response { get; set; } + /// <summary> + /// Gets or sets NavigationId + /// </summary> + public long NavigationId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ProcessNavigationCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ProcessNavigationCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..39e1374a9c04e6e8b38a97b8a203b0a909500104 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ProcessNavigationCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation. + /// </summary> + [CommandResponse(ProtocolName.Page.ProcessNavigation)] + [SupportedBy("Chrome")] + public class ProcessNavigationCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ReloadCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ReloadCommand.cs index 3e98e2bbcf7a0b918ac6615fb4b63bed20d603dc..207ccb8883da9cefb073987d0dae13a8f878ce2b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ReloadCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ReloadCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.Reload)] [SupportedBy("Chrome")] - public class ReloadCommand + public class ReloadCommand: ICommand<ReloadCommandResponse> { /// <summary> /// Gets or sets If true, browser cache is ignored (as if the user pressed Shift+refresh). diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/RemoveScriptToEvaluateOnLoadCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/RemoveScriptToEvaluateOnLoadCommand.cs index 11ba706b2d66260437f2fe30ce1d3a2d46912358..45320f8803f9fb72c23b1f12eb1c885007e444c6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/RemoveScriptToEvaluateOnLoadCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/RemoveScriptToEvaluateOnLoadCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { [Command(ProtocolName.Page.RemoveScriptToEvaluateOnLoad)] [SupportedBy("Chrome")] - public class RemoveScriptToEvaluateOnLoadCommand + public class RemoveScriptToEvaluateOnLoadCommand: ICommand<RemoveScriptToEvaluateOnLoadCommandResponse> { /// <summary> /// Gets or sets Identifier diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/RequestAppBannerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/RequestAppBannerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5fa5a2b36718914be584caffbc2789bc9a8357f2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/RequestAppBannerCommand.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + [Command(ProtocolName.Page.RequestAppBanner)] + [SupportedBy("Chrome")] + public class RequestAppBannerCommand: ICommand<RequestAppBannerCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/RequestAppBannerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/RequestAppBannerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..05ebf1a65993cd4e21380bedae429e9474301a69 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/RequestAppBannerCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + [CommandResponse(ProtocolName.Page.RequestAppBanner)] + [SupportedBy("Chrome")] + public class RequestAppBannerCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ResourceType.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ResourceType.cs index 54560f57b9328f1b81769d38953347d9679989e5..676f889bae61420855b1faa53c19a206bec2024b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ResourceType.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ResourceType.cs @@ -19,7 +19,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page{ Script, TextTrack, XHR, + Fetch, + EventSource, WebSocket, + Manifest, Other, } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameAckCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameAckCommand.cs index 6088b5c5cf63774b0e527d332130c9c6da8a1b64..db0ab49f8774860332570d4050dcfc184e48f851 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameAckCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameAckCommand.cs @@ -9,11 +9,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.ScreencastFrameAck)] [SupportedBy("Chrome")] - public class ScreencastFrameAckCommand + public class ScreencastFrameAckCommand: ICommand<ScreencastFrameAckCommandResponse> { /// <summary> /// Gets or sets Frame number. /// </summary> - public long FrameNumber { get; set; } + public long SessionId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameEvent.cs index a9dfb3c3039e26322e93a11a7feb4c206562019e..c8f2bffb58351406655362d1dae5dc50ec4bfd3a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameEvent.cs @@ -20,7 +20,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// <summary> /// Gets or sets Frame number. /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? FrameNumber { get; set; } + public long SessionId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameMetadata.cs b/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameMetadata.cs index 6182f814865a0d647794acb09efc085759d987f8..82881283c4f8c3fa1002dfa211e8314687c402bb 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameMetadata.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/ScreencastFrameMetadata.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Screencast frame metadata + /// Screencast frame metadata. /// </summary> [SupportedBy("Chrome")] public class ScreencastFrameMetadata diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SearchInResourceCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SearchInResourceCommand.cs index 154e7ecb766aff45faeee0412f4bc14119b44263..c0cba1eb050b8d8cfe89197a6a7245f5f29f8623 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SearchInResourceCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SearchInResourceCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.SearchInResource)] [SupportedBy("Chrome")] - public class SearchInResourceCommand + public class SearchInResourceCommand: ICommand<SearchInResourceCommandResponse> { /// <summary> /// Gets or sets Frame id for resource to search in. diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetAutoAttachToCreatedPagesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetAutoAttachToCreatedPagesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..f5ea83ad10d0341872cd54ebc96e1490e50658ae --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetAutoAttachToCreatedPagesCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Controls whether browser will open a new inspector window for connected pages. + /// </summary> + [Command(ProtocolName.Page.SetAutoAttachToCreatedPages)] + [SupportedBy("Chrome")] + public class SetAutoAttachToCreatedPagesCommand: ICommand<SetAutoAttachToCreatedPagesCommandResponse> + { + /// <summary> + /// Gets or sets If true, browser will open a new inspector window for every page created from this one. + /// </summary> + public bool AutoAttach { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetAutoAttachToCreatedPagesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetAutoAttachToCreatedPagesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..09c0c11113053e8eea3e43f7832832f6c5b34e38 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetAutoAttachToCreatedPagesCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Controls whether browser will open a new inspector window for connected pages. + /// </summary> + [CommandResponse(ProtocolName.Page.SetAutoAttachToCreatedPages)] + [SupportedBy("Chrome")] + public class SetAutoAttachToCreatedPagesCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetControlNavigationsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetControlNavigationsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4746e4030f963e830f66e032436b5cddb14724c1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetControlNavigationsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Toggles navigation throttling which allows programatic control over navigation and redirect response. + /// </summary> + [Command(ProtocolName.Page.SetControlNavigations)] + [SupportedBy("Chrome")] + public class SetControlNavigationsCommand: ICommand<SetControlNavigationsCommandResponse> + { + /// <summary> + /// Gets or sets Enabled + /// </summary> + public bool Enabled { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetControlNavigationsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetControlNavigationsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..02ab74339c87da0ddc0bd922b5ed2c1a07bf6e74 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetControlNavigationsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Toggles navigation throttling which allows programatic control over navigation and redirect response. + /// </summary> + [CommandResponse(ProtocolName.Page.SetControlNavigations)] + [SupportedBy("Chrome")] + public class SetControlNavigationsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceMetricsOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceMetricsOverrideCommand.cs index 74b1f9be2839ab503e709ed954d99db93ae5a947..0efb3ab93ac46a9d019ff0e594e6888770a0bb63 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceMetricsOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceMetricsOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.SetDeviceMetricsOverride)] [SupportedBy("Chrome")] - public class SetDeviceMetricsOverrideCommand + public class SetDeviceMetricsOverrideCommand: ICommand<SetDeviceMetricsOverrideCommandResponse> { /// <summary> /// Gets or sets Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. @@ -46,5 +46,30 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public double OffsetY { get; set; } + /// <summary> + /// Gets or sets Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ScreenWidth { get; set; } + /// <summary> + /// Gets or sets Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ScreenHeight { get; set; } + /// <summary> + /// Gets or sets Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? PositionX { get; set; } + /// <summary> + /// Gets or sets Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? PositionY { get; set; } + /// <summary> + /// Gets or sets Screen orientation override. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public Emulation.ScreenOrientation ScreenOrientation { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceOrientationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceOrientationOverrideCommand.cs index 0648db91c6d634883e38265fed93c58be19a753c..52eea9ea87bcfe44217bb97fd3eec5ead6cbd2ae 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceOrientationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetDeviceOrientationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.SetDeviceOrientationOverride)] [SupportedBy("Chrome")] - public class SetDeviceOrientationOverrideCommand + public class SetDeviceOrientationOverrideCommand: ICommand<SetDeviceOrientationOverrideCommandResponse> { /// <summary> /// Gets or sets Mock alpha diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetDocumentContentCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetDocumentContentCommand.cs index ce0c9a9bfc98531e6ab97594812f7bb76be81332..6586a83c322946b8298828415ba25954a68ac0ea 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetDocumentContentCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetDocumentContentCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.SetDocumentContent)] [SupportedBy("Chrome")] - public class SetDocumentContentCommand + public class SetDocumentContentCommand: ICommand<SetDocumentContentCommandResponse> { /// <summary> /// Gets or sets Frame id to set HTML for. diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetGeolocationOverrideCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetGeolocationOverrideCommand.cs index fb29096d0dcc5fca427ff4c33b0405bf8ce8291f..ccae53f92bfa7acad31980e7d6edd321435cb852 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetGeolocationOverrideCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetGeolocationOverrideCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.SetGeolocationOverride)] [SupportedBy("Chrome")] - public class SetGeolocationOverrideCommand + public class SetGeolocationOverrideCommand: ICommand<SetGeolocationOverrideCommandResponse> { /// <summary> /// Gets or sets Mock latitude diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetOverlayMessageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetOverlayMessageCommand.cs deleted file mode 100644 index b9aebc8acf90e3e0d3ca0a1b84105e90960bc69e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetOverlayMessageCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Sets overlay message. - /// </summary> - [Command(ProtocolName.Page.SetOverlayMessage)] - [SupportedBy("Chrome")] - public class SetOverlayMessageCommand - { - /// <summary> - /// Gets or sets Overlay message to display when paused in debugger. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetShowViewportSizeOnResizeCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetShowViewportSizeOnResizeCommand.cs deleted file mode 100644 index e3a869ed814475468cc02c2ff61bba3b068e2db3..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetShowViewportSizeOnResizeCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page -{ - /// <summary> - /// Paints viewport size upon main frame resize. - /// </summary> - [Command(ProtocolName.Page.SetShowViewportSizeOnResize)] - [SupportedBy("Chrome")] - public class SetShowViewportSizeOnResizeCommand - { - /// <summary> - /// Gets or sets Whether to paint size or not. - /// </summary> - public bool Show { get; set; } - /// <summary> - /// Gets or sets Whether to paint grid as well. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? ShowGrid { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetTouchEmulationEnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/SetTouchEmulationEnabledCommand.cs index 3c2df786ebe9641ae9fdbce90b74898f6ee55e62..921e2f5d5e5e5457f075fdbcf3d3ac655f65e52a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetTouchEmulationEnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/SetTouchEmulationEnabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.SetTouchEmulationEnabled)] [SupportedBy("Chrome")] - public class SetTouchEmulationEnabledCommand + public class SetTouchEmulationEnabledCommand: ICommand<SetTouchEmulationEnabledCommandResponse> { /// <summary> /// Gets or sets Whether the touch event emulation should be enabled. diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/StartScreencastCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/StartScreencastCommand.cs index 1a3e61725d880b7fa5ae388dc0e2b2615c7c3b3c..15ccdde4b466f3b563755d0e405ed4c0e74033d7 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/StartScreencastCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/StartScreencastCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.StartScreencast)] [SupportedBy("Chrome")] - public class StartScreencastCommand + public class StartScreencastCommand: ICommand<StartScreencastCommandResponse> { /// <summary> /// Gets or sets Image compression format. @@ -31,5 +31,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? MaxHeight { get; set; } + /// <summary> + /// Gets or sets Send every n-th frame. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? EveryNthFrame { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/StopLoadingCommand.cs similarity index 53% rename from source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Page/StopLoadingCommand.cs index 28a7f2d406495ae4d30b1bce20c5498319dfb3d7..bcba50a0d2d465eb145ceaea5bd21c11f9dc848d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetColorPickerEnabledCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/StopLoadingCommand.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Shows / hides color picker + /// Force the page stop all navigations and pending resource fetches. /// </summary> - [CommandResponse(ProtocolName.Page.SetColorPickerEnabled)] + [Command(ProtocolName.Page.StopLoading)] [SupportedBy("Chrome")] - public class SetColorPickerEnabledCommandResponse + public class StopLoadingCommand: ICommand<StopLoadingCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/SetOverlayMessageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Page/StopLoadingCommandResponse.cs similarity index 56% rename from source/ChromeDevTools/Protocol/Chrome/Page/SetOverlayMessageCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Page/StopLoadingCommandResponse.cs index bf704b822449b65e239653d2ef7b9a5521f49a20..9b41fa8fc7ce749d59109785c368b59035d680d3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/SetOverlayMessageCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/StopLoadingCommandResponse.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page { /// <summary> - /// Sets overlay message. + /// Force the page stop all navigations and pending resource fetches. /// </summary> - [CommandResponse(ProtocolName.Page.SetOverlayMessage)] + [CommandResponse(ProtocolName.Page.StopLoading)] [SupportedBy("Chrome")] - public class SetOverlayMessageCommandResponse + public class StopLoadingCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/StopScreencastCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Page/StopScreencastCommand.cs index 5ad794da4af981849ccafa7f2c1dc8cd623042a7..23c4a2c182473f113d5e64bead478f77a039ad4f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Page/StopScreencastCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Page/StopScreencastCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page /// </summary> [Command(ProtocolName.Page.StopScreencast)] [SupportedBy("Chrome")] - public class StopScreencastCommand + public class StopScreencastCommand: ICommand<StopScreencastCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/TransitionType.cs b/source/ChromeDevTools/Protocol/Chrome/Page/TransitionType.cs new file mode 100644 index 0000000000000000000000000000000000000000..490ec56cb5b3cc362e2946630b8b3372ed253dc0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/TransitionType.cs @@ -0,0 +1,27 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page{ + /// <summary> + /// Transition type. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum TransitionType + { + Link, + Typed, + Auto_bookmark, + Auto_subframe, + Manual_subframe, + Generated, + Auto_toplevel, + Form_submit, + Reload, + Keyword, + Keyword_generated, + Other, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Page/VisualViewport.cs b/source/ChromeDevTools/Protocol/Chrome/Page/VisualViewport.cs new file mode 100644 index 0000000000000000000000000000000000000000..ab31b52402b2300c10b7e8c598addc4682639465 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Page/VisualViewport.cs @@ -0,0 +1,42 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page +{ + /// <summary> + /// Visual viewport position, dimensions, and scale. + /// </summary> + [SupportedBy("Chrome")] + public class VisualViewport + { + /// <summary> + /// Gets or sets Horizontal offset relative to the layout viewport (CSS pixels). + /// </summary> + public double OffsetX { get; set; } + /// <summary> + /// Gets or sets Vertical offset relative to the layout viewport (CSS pixels). + /// </summary> + public double OffsetY { get; set; } + /// <summary> + /// Gets or sets Horizontal offset relative to the document (CSS pixels). + /// </summary> + public double PageX { get; set; } + /// <summary> + /// Gets or sets Vertical offset relative to the document (CSS pixels). + /// </summary> + public double PageY { get; set; } + /// <summary> + /// Gets or sets Width (CSS pixels), excludes scrollbar if present. + /// </summary> + public double ClientWidth { get; set; } + /// <summary> + /// Gets or sets Height (CSS pixels), excludes scrollbar if present. + /// </summary> + public double ClientHeight { get; set; } + /// <summary> + /// Gets or sets Scale relative to the ideal viewport (size at width=device-width). + /// </summary> + public double Scale { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/CanProfilePowerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Power/CanProfilePowerCommand.cs deleted file mode 100644 index f11e39b83babf7432d6b7448cfe1bb4012169d66..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/CanProfilePowerCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Tells whether power profiling is supported. - /// </summary> - [Command(ProtocolName.Power.CanProfilePower)] - [SupportedBy("Chrome")] - public class CanProfilePowerCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/CanProfilePowerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Power/CanProfilePowerCommandResponse.cs deleted file mode 100644 index 4b445334ce5b7802c27eb1537c871d3f7b66ee64..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/CanProfilePowerCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Tells whether power profiling is supported. - /// </summary> - [CommandResponse(ProtocolName.Power.CanProfilePower)] - [SupportedBy("Chrome")] - public class CanProfilePowerCommandResponse - { - /// <summary> - /// Gets or sets True if power profiling is supported. - /// </summary> - public bool Result { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/DataAvailableEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Power/DataAvailableEvent.cs deleted file mode 100644 index 37fe165b60f602e5d8ca8c6510e654d66a730c52..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/DataAvailableEvent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - [Event(ProtocolName.Power.DataAvailable)] - [SupportedBy("Chrome")] - public class DataAvailableEvent - { - /// <summary> - /// Gets or sets List of power events. - /// </summary> - public PowerEvent[] Value { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/EndCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Power/EndCommand.cs deleted file mode 100644 index 977f1e59a47b1b34e33f3b7f912ad692b6c8baf9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/EndCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Stop power events collection. - /// </summary> - [Command(ProtocolName.Power.End)] - [SupportedBy("Chrome")] - public class EndCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/EndCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Power/EndCommandResponse.cs deleted file mode 100644 index 05d358ef97c2a0038dc0624517eb9bb646cc6320..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/EndCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Stop power events collection. - /// </summary> - [CommandResponse(ProtocolName.Power.End)] - [SupportedBy("Chrome")] - public class EndCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/GetAccuracyLevelCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Power/GetAccuracyLevelCommand.cs deleted file mode 100644 index 2e26ac9579ae1bea1fb1261d3aa4c1ef28e0debb..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/GetAccuracyLevelCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Describes the accuracy level of the data provider. - /// </summary> - [Command(ProtocolName.Power.GetAccuracyLevel)] - [SupportedBy("Chrome")] - public class GetAccuracyLevelCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/GetAccuracyLevelCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Power/GetAccuracyLevelCommandResponse.cs deleted file mode 100644 index 1ba284dc79732e1590aecfec57d0b4eeea95ec41..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/GetAccuracyLevelCommandResponse.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Describes the accuracy level of the data provider. - /// </summary> - [CommandResponse(ProtocolName.Power.GetAccuracyLevel)] - [SupportedBy("Chrome")] - public class GetAccuracyLevelCommandResponse - { - /// <summary> - /// Gets or sets Result - /// </summary> - public string Result { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/PowerEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Power/PowerEvent.cs deleted file mode 100644 index bdf0d3c0f906227a117cd6516294fe39a2193f60..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/PowerEvent.cs +++ /dev/null @@ -1,26 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// PowerEvent item - /// </summary> - [SupportedBy("Chrome")] - public class PowerEvent - { - /// <summary> - /// Gets or sets Power Event Type. - /// </summary> - public string Type { get; set; } - /// <summary> - /// Gets or sets Power Event Time, in milliseconds. - /// </summary> - public double Timestamp { get; set; } - /// <summary> - /// Gets or sets Power Event Value. - /// </summary> - public double Value { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/StartCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Power/StartCommand.cs deleted file mode 100644 index 1e073277ec5aed71a8b667147c52c3240a90a5a6..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/StartCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Start power events collection. - /// </summary> - [Command(ProtocolName.Power.Start)] - [SupportedBy("Chrome")] - public class StartCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Power/StartCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Power/StartCommandResponse.cs deleted file mode 100644 index f6e5217c35c580100fcbd48446c29b10e27134f9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Power/StartCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Power -{ - /// <summary> - /// Start power events collection. - /// </summary> - [CommandResponse(ProtocolName.Power.Start)] - [SupportedBy("Chrome")] - public class StartCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/CPUProfileNode.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/CPUProfileNode.cs deleted file mode 100644 index 81f516b618d6c6edcfb6edbc833c4535d053e6e9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/CPUProfileNode.cs +++ /dev/null @@ -1,58 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler -{ - /// <summary> - /// CPU Profile node. Holds callsite information, execution statistics and child nodes. - /// </summary> - [SupportedBy("Chrome")] - public class CPUProfileNode - { - /// <summary> - /// Gets or sets Function name. - /// </summary> - public string FunctionName { get; set; } - /// <summary> - /// Gets or sets Script identifier. - /// </summary> - public string ScriptId { get; set; } - /// <summary> - /// Gets or sets URL. - /// </summary> - public string Url { get; set; } - /// <summary> - /// Gets or sets 1-based line number of the function start position. - /// </summary> - public long LineNumber { get; set; } - /// <summary> - /// Gets or sets 1-based column number of the function start position. - /// </summary> - public long ColumnNumber { get; set; } - /// <summary> - /// Gets or sets Number of samples where this node was on top of the call stack. - /// </summary> - public long HitCount { get; set; } - /// <summary> - /// Gets or sets Call UID. - /// </summary> - public double CallUID { get; set; } - /// <summary> - /// Gets or sets Child nodes. - /// </summary> - public CPUProfileNode[] Children { get; set; } - /// <summary> - /// Gets or sets The reason of being not optimized. The function may be deoptimized or marked as don't optimize. - /// </summary> - public string DeoptReason { get; set; } - /// <summary> - /// Gets or sets Unique id of the node. - /// </summary> - public long Id { get; set; } - /// <summary> - /// Gets or sets An array of source position ticks. - /// </summary> - public PositionTickInfo[] PositionTicks { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileFinishedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileFinishedEvent.cs index 2d4f498b1f09d448f71a3fb67bfd3b3931303f46..2c15f1357c2bd6eb5b8acc5ae6898a23153a5bfe 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileFinishedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileFinishedEvent.cs @@ -17,9 +17,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler /// <summary> /// Gets or sets Profile /// </summary> - public CPUProfile Profile { get; set; } + public Profile Profile { get; set; } /// <summary> - /// Gets or sets Profile title passed as argunet to console.profile(). + /// Gets or sets Profile title passed as an argument to console.profile(). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Title { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs index 3641d14399157cd4469ae97ac33655ead099d134..aa4da37795d21661dd5f55aeed5193c108f2d8cc 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/ConsoleProfileStartedEvent.cs @@ -3,7 +3,7 @@ using MasterDevs.ChromeDevTools;using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler { /// <summary> - /// Sent when new profile recodring is started using console.profile() call. + /// Sent when new profile recording is started using console.profile() call. /// </summary> [Event(ProtocolName.Profiler.ConsoleProfileStarted)] [SupportedBy("Chrome")] @@ -18,7 +18,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler /// </summary> public Debugger.Location Location { get; set; } /// <summary> - /// Gets or sets Profile title passed as argument to console.profile(). + /// Gets or sets Profile title passed as an argument to console.profile(). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Title { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/CoverageRange.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/CoverageRange.cs new file mode 100644 index 0000000000000000000000000000000000000000..68437f21865acdfc7caccc619f81aa5461bb6ec2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/CoverageRange.cs @@ -0,0 +1,26 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Coverage data for a source range. + /// </summary> + [SupportedBy("Chrome")] + public class CoverageRange + { + /// <summary> + /// Gets or sets JavaScript script source offset for the range start. + /// </summary> + public long StartOffset { get; set; } + /// <summary> + /// Gets or sets JavaScript script source offset for the range end. + /// </summary> + public long EndOffset { get; set; } + /// <summary> + /// Gets or sets Collected execution count of the source range. + /// </summary> + public long Count { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/DisableCommand.cs index c30db8abd7db98432b5f4352887653095553a8e4..aaa28a6290867210546a41c67f8d445abe7b55b5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/DisableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler { [Command(ProtocolName.Profiler.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/EnableCommand.cs index a6acb9326387236e6707e1b9fb492f5bb2e3687e..16eae40c7417f8d3f65d1ad522d309ebb6a1f5a3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/EnableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler { [Command(ProtocolName.Profiler.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/FunctionCoverage.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/FunctionCoverage.cs new file mode 100644 index 0000000000000000000000000000000000000000..dfeba528f8c3d35668ab9e304ab15ea7c4546829 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/FunctionCoverage.cs @@ -0,0 +1,22 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Coverage data for a JavaScript function. + /// </summary> + [SupportedBy("Chrome")] + public class FunctionCoverage + { + /// <summary> + /// Gets or sets JavaScript function name. + /// </summary> + public string FunctionName { get; set; } + /// <summary> + /// Gets or sets Source ranges inside the function with coverage data. + /// </summary> + public CoverageRange[] Ranges { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/GetBestEffortCoverageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/GetBestEffortCoverageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..35af34fce45928ad5a11d242c04cdecba9f69a21 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/GetBestEffortCoverageCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + /// </summary> + [Command(ProtocolName.Profiler.GetBestEffortCoverage)] + [SupportedBy("Chrome")] + public class GetBestEffortCoverageCommand: ICommand<GetBestEffortCoverageCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/GetBestEffortCoverageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/GetBestEffortCoverageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..b042b70bb6df89efe005cbbbf4e647ed3b383422 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/GetBestEffortCoverageCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + /// </summary> + [CommandResponse(ProtocolName.Profiler.GetBestEffortCoverage)] + [SupportedBy("Chrome")] + public class GetBestEffortCoverageCommandResponse + { + /// <summary> + /// Gets or sets Coverage data for the current isolate. + /// </summary> + public ScriptCoverage[] Result { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/CPUProfile.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/Profile.cs similarity index 61% rename from source/ChromeDevTools/Protocol/Chrome/Profiler/CPUProfile.cs rename to source/ChromeDevTools/Protocol/Chrome/Profiler/Profile.cs index b44657ded7734cd3df86222874e19401a7000ad3..76a480f16c62aec852594d4d31cf6d4c538220a6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/CPUProfile.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/Profile.cs @@ -8,18 +8,18 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler /// Profile. /// </summary> [SupportedBy("Chrome")] - public class CPUProfile + public class Profile { /// <summary> - /// Gets or sets Head + /// Gets or sets The list of profile nodes. First item is the root node. /// </summary> - public CPUProfileNode Head { get; set; } + public ProfileNode[] Nodes { get; set; } /// <summary> - /// Gets or sets Profiling start time in seconds. + /// Gets or sets Profiling start timestamp in microseconds. /// </summary> public double StartTime { get; set; } /// <summary> - /// Gets or sets Profiling end time in seconds. + /// Gets or sets Profiling end timestamp in microseconds. /// </summary> public double EndTime { get; set; } /// <summary> @@ -28,9 +28,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long[] Samples { get; set; } /// <summary> - /// Gets or sets Timestamps of the samples in microseconds. + /// Gets or sets Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public double[] Timestamps { get; set; } + public long[] TimeDeltas { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/ProfileNode.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/ProfileNode.cs new file mode 100644 index 0000000000000000000000000000000000000000..d85fa4115a6e86a007ecf50e6e1550471557f4f5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/ProfileNode.cs @@ -0,0 +1,42 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Profile node. Holds callsite information, execution statistics and child nodes. + /// </summary> + [SupportedBy("Chrome")] + public class ProfileNode + { + /// <summary> + /// Gets or sets Unique id of the node. + /// </summary> + public long Id { get; set; } + /// <summary> + /// Gets or sets Function location. + /// </summary> + public Runtime.CallFrame CallFrame { get; set; } + /// <summary> + /// Gets or sets Number of samples where this node was on top of the call stack. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? HitCount { get; set; } + /// <summary> + /// Gets or sets Child node ids. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long[] Children { get; set; } + /// <summary> + /// Gets or sets The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string DeoptReason { get; set; } + /// <summary> + /// Gets or sets An array of source position ticks. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public PositionTickInfo[] PositionTicks { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/ScriptCoverage.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/ScriptCoverage.cs new file mode 100644 index 0000000000000000000000000000000000000000..258408807b0265ace7d5c3760f2825e93a794b24 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/ScriptCoverage.cs @@ -0,0 +1,26 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Coverage data for a JavaScript script. + /// </summary> + [SupportedBy("Chrome")] + public class ScriptCoverage + { + /// <summary> + /// Gets or sets JavaScript script id. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets JavaScript script name or url. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Functions contained in the script that has coverage data. + /// </summary> + public FunctionCoverage[] Functions { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/SetSamplingIntervalCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/SetSamplingIntervalCommand.cs index 9710ee9ffa79e3d9d46318cac3b298ccb2070513..2b8c688c1fc97c10c9305b013c8ff628b3b8eeac 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/SetSamplingIntervalCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/SetSamplingIntervalCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler /// </summary> [Command(ProtocolName.Profiler.SetSamplingInterval)] [SupportedBy("Chrome")] - public class SetSamplingIntervalCommand + public class SetSamplingIntervalCommand: ICommand<SetSamplingIntervalCommandResponse> { /// <summary> /// Gets or sets New sampling interval in microseconds. diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StartCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartCommand.cs index 9cf4ada2569e17954ab873da4785f243928e7e30..1e103ab774b59d58f7dd292d51072418c19ba13e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/StartCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler { [Command(ProtocolName.Profiler.Start)] [SupportedBy("Chrome")] - public class StartCommand + public class StartCommand: ICommand<StartCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6e9153a9b6e6bfb4a70871bc641548e551f825f7 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommand.cs @@ -0,0 +1,20 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + /// </summary> + [Command(ProtocolName.Profiler.StartPreciseCoverage)] + [SupportedBy("Chrome")] + public class StartPreciseCoverageCommand: ICommand<StartPreciseCoverageCommandResponse> + { + /// <summary> + /// Gets or sets Collect accurate call counts beyond simple 'covered' or 'not covered'. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? CallCount { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a60aae6df225fd45a31a314e39ca48827691175a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StartPreciseCoverageCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + /// </summary> + [CommandResponse(ProtocolName.Profiler.StartPreciseCoverage)] + [SupportedBy("Chrome")] + public class StartPreciseCoverageCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommand.cs index 1ba1acad9a232a39936a8161cd2a483fa0e1002d..b5fd0c5229f6214b93e10190b5ccdd6cf10b1e35 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler { [Command(ProtocolName.Profiler.Stop)] [SupportedBy("Chrome")] - public class StopCommand + public class StopCommand: ICommand<StopCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommandResponse.cs index 04e188506a75345ca26dde7eb8cdafa6260c3e90..822efe75a586de041f91e7e94a3abd7f32a856e8 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopCommandResponse.cs @@ -11,6 +11,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler /// <summary> /// Gets or sets Recorded profile. /// </summary> - public CPUProfile Profile { get; set; } + public Profile Profile { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StopPreciseCoverageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopPreciseCoverageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..7072cee70092b10fe14201c3c03ef7930eab22dd --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopPreciseCoverageCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + /// </summary> + [Command(ProtocolName.Profiler.StopPreciseCoverage)] + [SupportedBy("Chrome")] + public class StopPreciseCoverageCommand: ICommand<StopPreciseCoverageCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/StopPreciseCoverageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopPreciseCoverageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a99cc061e67922850d1f3cc0dca05661bfdc466 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/StopPreciseCoverageCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + /// </summary> + [CommandResponse(ProtocolName.Profiler.StopPreciseCoverage)] + [SupportedBy("Chrome")] + public class StopPreciseCoverageCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/TakePreciseCoverageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/TakePreciseCoverageCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..e2270dbd1c8ce1a44026436197860d5861c7ea7d --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/TakePreciseCoverageCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + /// </summary> + [Command(ProtocolName.Profiler.TakePreciseCoverage)] + [SupportedBy("Chrome")] + public class TakePreciseCoverageCommand: ICommand<TakePreciseCoverageCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Profiler/TakePreciseCoverageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Profiler/TakePreciseCoverageCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..549fd3d2745f32a82748df2ee836395b04f2213b --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Profiler/TakePreciseCoverageCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Profiler +{ + /// <summary> + /// Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + /// </summary> + [CommandResponse(ProtocolName.Profiler.TakePreciseCoverage)] + [SupportedBy("Chrome")] + public class TakePreciseCoverageCommandResponse + { + /// <summary> + /// Gets or sets Coverage data for the current isolate. + /// </summary> + public ScriptCoverage[] Result { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs b/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs index 867d4a74ff7e311685a9d72b0d3f77984be3c505..b51f897294204ece2317da1c746db21d96925eda 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ProtocolName.cs @@ -4,12 +4,116 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome { public static class ProtocolName { + public static class Schema + { + public const string GetDomains = "Schema.getDomains"; + } + + public static class Runtime + { + public const string Evaluate = "Runtime.evaluate"; + public const string AwaitPromise = "Runtime.awaitPromise"; + public const string CallFunctionOn = "Runtime.callFunctionOn"; + public const string GetProperties = "Runtime.getProperties"; + public const string ReleaseObject = "Runtime.releaseObject"; + public const string ReleaseObjectGroup = "Runtime.releaseObjectGroup"; + public const string RunIfWaitingForDebugger = "Runtime.runIfWaitingForDebugger"; + public const string Enable = "Runtime.enable"; + public const string Disable = "Runtime.disable"; + public const string DiscardConsoleEntries = "Runtime.discardConsoleEntries"; + public const string SetCustomObjectFormatterEnabled = "Runtime.setCustomObjectFormatterEnabled"; + public const string CompileScript = "Runtime.compileScript"; + public const string RunScript = "Runtime.runScript"; + public const string ExecutionContextCreated = "Runtime.executionContextCreated"; + public const string ExecutionContextDestroyed = "Runtime.executionContextDestroyed"; + public const string ExecutionContextsCleared = "Runtime.executionContextsCleared"; + public const string ExceptionThrown = "Runtime.exceptionThrown"; + public const string ExceptionRevoked = "Runtime.exceptionRevoked"; + public const string ConsoleAPICalled = "Runtime.consoleAPICalled"; + public const string InspectRequested = "Runtime.inspectRequested"; + } + + public static class Debugger + { + public const string Enable = "Debugger.enable"; + public const string Disable = "Debugger.disable"; + public const string SetBreakpointsActive = "Debugger.setBreakpointsActive"; + public const string SetSkipAllPauses = "Debugger.setSkipAllPauses"; + public const string SetBreakpointByUrl = "Debugger.setBreakpointByUrl"; + public const string SetBreakpoint = "Debugger.setBreakpoint"; + public const string RemoveBreakpoint = "Debugger.removeBreakpoint"; + public const string GetPossibleBreakpoints = "Debugger.getPossibleBreakpoints"; + public const string ContinueToLocation = "Debugger.continueToLocation"; + public const string StepOver = "Debugger.stepOver"; + public const string StepInto = "Debugger.stepInto"; + public const string StepOut = "Debugger.stepOut"; + public const string Pause = "Debugger.pause"; + public const string ScheduleStepIntoAsync = "Debugger.scheduleStepIntoAsync"; + public const string Resume = "Debugger.resume"; + public const string SearchInContent = "Debugger.searchInContent"; + public const string SetScriptSource = "Debugger.setScriptSource"; + public const string RestartFrame = "Debugger.restartFrame"; + public const string GetScriptSource = "Debugger.getScriptSource"; + public const string SetPauseOnExceptions = "Debugger.setPauseOnExceptions"; + public const string EvaluateOnCallFrame = "Debugger.evaluateOnCallFrame"; + public const string SetVariableValue = "Debugger.setVariableValue"; + public const string SetAsyncCallStackDepth = "Debugger.setAsyncCallStackDepth"; + public const string SetBlackboxPatterns = "Debugger.setBlackboxPatterns"; + public const string SetBlackboxedRanges = "Debugger.setBlackboxedRanges"; + public const string ScriptParsed = "Debugger.scriptParsed"; + public const string ScriptFailedToParse = "Debugger.scriptFailedToParse"; + public const string BreakpointResolved = "Debugger.breakpointResolved"; + public const string Paused = "Debugger.paused"; + public const string Resumed = "Debugger.resumed"; + } + + public static class Console + { + public const string Enable = "Console.enable"; + public const string Disable = "Console.disable"; + public const string ClearMessages = "Console.clearMessages"; + public const string MessageAdded = "Console.messageAdded"; + } + + public static class Profiler + { + public const string Enable = "Profiler.enable"; + public const string Disable = "Profiler.disable"; + public const string SetSamplingInterval = "Profiler.setSamplingInterval"; + public const string Start = "Profiler.start"; + public const string Stop = "Profiler.stop"; + public const string StartPreciseCoverage = "Profiler.startPreciseCoverage"; + public const string StopPreciseCoverage = "Profiler.stopPreciseCoverage"; + public const string TakePreciseCoverage = "Profiler.takePreciseCoverage"; + public const string GetBestEffortCoverage = "Profiler.getBestEffortCoverage"; + public const string ConsoleProfileStarted = "Profiler.consoleProfileStarted"; + public const string ConsoleProfileFinished = "Profiler.consoleProfileFinished"; + } + + public static class HeapProfiler + { + public const string Enable = "HeapProfiler.enable"; + public const string Disable = "HeapProfiler.disable"; + public const string StartTrackingHeapObjects = "HeapProfiler.startTrackingHeapObjects"; + public const string StopTrackingHeapObjects = "HeapProfiler.stopTrackingHeapObjects"; + public const string TakeHeapSnapshot = "HeapProfiler.takeHeapSnapshot"; + public const string CollectGarbage = "HeapProfiler.collectGarbage"; + public const string GetObjectByHeapObjectId = "HeapProfiler.getObjectByHeapObjectId"; + public const string AddInspectedHeapObject = "HeapProfiler.addInspectedHeapObject"; + public const string GetHeapObjectId = "HeapProfiler.getHeapObjectId"; + public const string StartSampling = "HeapProfiler.startSampling"; + public const string StopSampling = "HeapProfiler.stopSampling"; + public const string AddHeapSnapshotChunk = "HeapProfiler.addHeapSnapshotChunk"; + public const string ResetProfiles = "HeapProfiler.resetProfiles"; + public const string ReportHeapSnapshotProgress = "HeapProfiler.reportHeapSnapshotProgress"; + public const string LastSeenObjectId = "HeapProfiler.lastSeenObjectId"; + public const string HeapStatsUpdate = "HeapProfiler.heapStatsUpdate"; + } + public static class Inspector { public const string Enable = "Inspector.enable"; public const string Disable = "Inspector.disable"; - public const string EvaluateForTestInFrontend = "Inspector.evaluateForTestInFrontend"; - public const string Inspect = "Inspector.inspect"; public const string Detached = "Inspector.detached"; public const string TargetCrashed = "Inspector.targetCrashed"; } @@ -17,6 +121,8 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public static class Memory { public const string GetDOMCounters = "Memory.getDOMCounters"; + public const string SetPressureNotificationsSuppressed = "Memory.setPressureNotificationsSuppressed"; + public const string SimulatePressureNotification = "Memory.simulatePressureNotification"; } public static class Page @@ -25,8 +131,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string Disable = "Page.disable"; public const string AddScriptToEvaluateOnLoad = "Page.addScriptToEvaluateOnLoad"; public const string RemoveScriptToEvaluateOnLoad = "Page.removeScriptToEvaluateOnLoad"; + public const string SetAutoAttachToCreatedPages = "Page.setAutoAttachToCreatedPages"; public const string Reload = "Page.reload"; public const string Navigate = "Page.navigate"; + public const string StopLoading = "Page.stopLoading"; public const string GetNavigationHistory = "Page.getNavigationHistory"; public const string NavigateToHistoryEntry = "Page.navigateToHistoryEntry"; public const string GetCookies = "Page.getCookies"; @@ -43,14 +151,17 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string ClearDeviceOrientationOverride = "Page.clearDeviceOrientationOverride"; public const string SetTouchEmulationEnabled = "Page.setTouchEmulationEnabled"; public const string CaptureScreenshot = "Page.captureScreenshot"; - public const string CanScreencast = "Page.canScreencast"; + public const string PrintToPDF = "Page.printToPDF"; public const string StartScreencast = "Page.startScreencast"; public const string StopScreencast = "Page.stopScreencast"; public const string ScreencastFrameAck = "Page.screencastFrameAck"; public const string HandleJavaScriptDialog = "Page.handleJavaScriptDialog"; - public const string SetShowViewportSizeOnResize = "Page.setShowViewportSizeOnResize"; - public const string SetColorPickerEnabled = "Page.setColorPickerEnabled"; - public const string SetOverlayMessage = "Page.setOverlayMessage"; + public const string GetAppManifest = "Page.getAppManifest"; + public const string RequestAppBanner = "Page.requestAppBanner"; + public const string SetControlNavigations = "Page.setControlNavigations"; + public const string ProcessNavigation = "Page.processNavigation"; + public const string GetLayoutMetrics = "Page.getLayoutMetrics"; + public const string CreateIsolatedWorld = "Page.createIsolatedWorld"; public const string DomContentEventFired = "Page.domContentEventFired"; public const string LoadEventFired = "Page.loadEventFired"; public const string FrameAttached = "Page.frameAttached"; @@ -65,61 +176,63 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string JavascriptDialogClosed = "Page.javascriptDialogClosed"; public const string ScreencastFrame = "Page.screencastFrame"; public const string ScreencastVisibilityChanged = "Page.screencastVisibilityChanged"; - public const string ColorPicked = "Page.colorPicked"; public const string InterstitialShown = "Page.interstitialShown"; public const string InterstitialHidden = "Page.interstitialHidden"; + public const string NavigationRequested = "Page.navigationRequested"; } - public static class Rendering + public static class Overlay { - public const string SetShowPaintRects = "Rendering.setShowPaintRects"; - public const string SetShowDebugBorders = "Rendering.setShowDebugBorders"; - public const string SetShowFPSCounter = "Rendering.setShowFPSCounter"; - public const string SetContinuousPaintingEnabled = "Rendering.setContinuousPaintingEnabled"; - public const string SetShowScrollBottleneckRects = "Rendering.setShowScrollBottleneckRects"; + public const string Enable = "Overlay.enable"; + public const string Disable = "Overlay.disable"; + public const string SetShowPaintRects = "Overlay.setShowPaintRects"; + public const string SetShowDebugBorders = "Overlay.setShowDebugBorders"; + public const string SetShowFPSCounter = "Overlay.setShowFPSCounter"; + public const string SetShowScrollBottleneckRects = "Overlay.setShowScrollBottleneckRects"; + public const string SetShowViewportSizeOnResize = "Overlay.setShowViewportSizeOnResize"; + public const string SetPausedInDebuggerMessage = "Overlay.setPausedInDebuggerMessage"; + public const string SetSuspended = "Overlay.setSuspended"; + public const string SetInspectMode = "Overlay.setInspectMode"; + public const string HighlightRect = "Overlay.highlightRect"; + public const string HighlightQuad = "Overlay.highlightQuad"; + public const string HighlightNode = "Overlay.highlightNode"; + public const string HighlightFrame = "Overlay.highlightFrame"; + public const string HideHighlight = "Overlay.hideHighlight"; + public const string GetHighlightObjectForTest = "Overlay.getHighlightObjectForTest"; + public const string NodeHighlightRequested = "Overlay.nodeHighlightRequested"; + public const string InspectNodeRequested = "Overlay.inspectNodeRequested"; } public static class Emulation { public const string SetDeviceMetricsOverride = "Emulation.setDeviceMetricsOverride"; public const string ClearDeviceMetricsOverride = "Emulation.clearDeviceMetricsOverride"; - public const string ResetScrollAndPageScaleFactor = "Emulation.resetScrollAndPageScaleFactor"; + public const string ForceViewport = "Emulation.forceViewport"; + public const string ResetViewport = "Emulation.resetViewport"; + public const string ResetPageScaleFactor = "Emulation.resetPageScaleFactor"; public const string SetPageScaleFactor = "Emulation.setPageScaleFactor"; + public const string SetVisibleSize = "Emulation.setVisibleSize"; public const string SetScriptExecutionDisabled = "Emulation.setScriptExecutionDisabled"; public const string SetGeolocationOverride = "Emulation.setGeolocationOverride"; public const string ClearGeolocationOverride = "Emulation.clearGeolocationOverride"; public const string SetTouchEmulationEnabled = "Emulation.setTouchEmulationEnabled"; public const string SetEmulatedMedia = "Emulation.setEmulatedMedia"; + public const string SetCPUThrottlingRate = "Emulation.setCPUThrottlingRate"; public const string CanEmulate = "Emulation.canEmulate"; - public const string ViewportChanged = "Emulation.viewportChanged"; - } - - public static class Runtime - { - public const string Evaluate = "Runtime.evaluate"; - public const string CallFunctionOn = "Runtime.callFunctionOn"; - public const string GetProperties = "Runtime.getProperties"; - public const string GetEventListeners = "Runtime.getEventListeners"; - public const string ReleaseObject = "Runtime.releaseObject"; - public const string ReleaseObjectGroup = "Runtime.releaseObjectGroup"; - public const string Run = "Runtime.run"; - public const string Enable = "Runtime.enable"; - public const string Disable = "Runtime.disable"; - public const string IsRunRequired = "Runtime.isRunRequired"; - public const string SetCustomObjectFormatterEnabled = "Runtime.setCustomObjectFormatterEnabled"; - public const string ExecutionContextCreated = "Runtime.executionContextCreated"; - public const string ExecutionContextDestroyed = "Runtime.executionContextDestroyed"; - public const string ExecutionContextsCleared = "Runtime.executionContextsCleared"; + public const string SetVirtualTimePolicy = "Emulation.setVirtualTimePolicy"; + public const string SetDefaultBackgroundColorOverride = "Emulation.setDefaultBackgroundColorOverride"; + public const string VirtualTimeBudgetExpired = "Emulation.virtualTimeBudgetExpired"; } - public static class Console + public static class Security { - public const string Enable = "Console.enable"; - public const string Disable = "Console.disable"; - public const string ClearMessages = "Console.clearMessages"; - public const string MessageAdded = "Console.messageAdded"; - public const string MessageRepeatCountUpdated = "Console.messageRepeatCountUpdated"; - public const string MessagesCleared = "Console.messagesCleared"; + public const string Enable = "Security.enable"; + public const string Disable = "Security.disable"; + public const string ShowCertificateViewer = "Security.showCertificateViewer"; + public const string HandleCertificateError = "Security.handleCertificateError"; + public const string SetOverrideCertificateErrors = "Security.setOverrideCertificateErrors"; + public const string SecurityStateChanged = "Security.securityStateChanged"; + public const string CertificateError = "Security.certificateError"; } public static class Network @@ -129,18 +242,23 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string SetUserAgentOverride = "Network.setUserAgentOverride"; public const string SetExtraHTTPHeaders = "Network.setExtraHTTPHeaders"; public const string GetResponseBody = "Network.getResponseBody"; + public const string SetBlockedURLs = "Network.setBlockedURLs"; public const string ReplayXHR = "Network.replayXHR"; - public const string SetMonitoringXHREnabled = "Network.setMonitoringXHREnabled"; public const string CanClearBrowserCache = "Network.canClearBrowserCache"; public const string ClearBrowserCache = "Network.clearBrowserCache"; public const string CanClearBrowserCookies = "Network.canClearBrowserCookies"; public const string ClearBrowserCookies = "Network.clearBrowserCookies"; public const string GetCookies = "Network.getCookies"; + public const string GetAllCookies = "Network.getAllCookies"; public const string DeleteCookie = "Network.deleteCookie"; + public const string SetCookie = "Network.setCookie"; public const string CanEmulateNetworkConditions = "Network.canEmulateNetworkConditions"; public const string EmulateNetworkConditions = "Network.emulateNetworkConditions"; public const string SetCacheDisabled = "Network.setCacheDisabled"; + public const string SetBypassServiceWorker = "Network.setBypassServiceWorker"; public const string SetDataSizeLimitsForTest = "Network.setDataSizeLimitsForTest"; + public const string GetCertificate = "Network.getCertificate"; + public const string ResourceChangedPriority = "Network.resourceChangedPriority"; public const string RequestWillBeSent = "Network.requestWillBeSent"; public const string RequestServedFromCache = "Network.requestServedFromCache"; public const string ResponseReceived = "Network.responseReceived"; @@ -174,6 +292,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string RequestDatabase = "IndexedDB.requestDatabase"; public const string RequestData = "IndexedDB.requestData"; public const string ClearObjectStore = "IndexedDB.clearObjectStore"; + public const string DeleteDatabase = "IndexedDB.deleteDatabase"; } public static class CacheStorage @@ -181,12 +300,14 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string RequestCacheNames = "CacheStorage.requestCacheNames"; public const string RequestEntries = "CacheStorage.requestEntries"; public const string DeleteCache = "CacheStorage.deleteCache"; + public const string DeleteEntry = "CacheStorage.deleteEntry"; } public static class DOMStorage { public const string Enable = "DOMStorage.enable"; public const string Disable = "DOMStorage.disable"; + public const string Clear = "DOMStorage.clear"; public const string GetDOMStorageItems = "DOMStorage.getDOMStorageItems"; public const string SetDOMStorageItem = "DOMStorage.setDOMStorageItem"; public const string RemoveDOMStorageItem = "DOMStorage.removeDOMStorageItem"; @@ -206,22 +327,13 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string NetworkStateUpdated = "ApplicationCache.networkStateUpdated"; } - public static class FileSystem - { - public const string Enable = "FileSystem.enable"; - public const string Disable = "FileSystem.disable"; - public const string RequestFileSystemRoot = "FileSystem.requestFileSystemRoot"; - public const string RequestDirectoryContent = "FileSystem.requestDirectoryContent"; - public const string RequestMetadata = "FileSystem.requestMetadata"; - public const string RequestFileContent = "FileSystem.requestFileContent"; - public const string DeleteEntry = "FileSystem.deleteEntry"; - } - public static class DOM { public const string Enable = "DOM.enable"; public const string Disable = "DOM.disable"; public const string GetDocument = "DOM.getDocument"; + public const string GetFlattenedDocument = "DOM.getFlattenedDocument"; + public const string CollectClassNamesFromSubtree = "DOM.collectClassNamesFromSubtree"; public const string RequestChildNodes = "DOM.requestChildNodes"; public const string QuerySelector = "DOM.querySelector"; public const string QuerySelectorAll = "DOM.querySelectorAll"; @@ -231,19 +343,15 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string SetAttributeValue = "DOM.setAttributeValue"; public const string SetAttributesAsText = "DOM.setAttributesAsText"; public const string RemoveAttribute = "DOM.removeAttribute"; - public const string GetEventListenersForNode = "DOM.getEventListenersForNode"; public const string GetOuterHTML = "DOM.getOuterHTML"; public const string SetOuterHTML = "DOM.setOuterHTML"; public const string PerformSearch = "DOM.performSearch"; public const string GetSearchResults = "DOM.getSearchResults"; public const string DiscardSearchResults = "DOM.discardSearchResults"; public const string RequestNode = "DOM.requestNode"; - public const string SetInspectModeEnabled = "DOM.setInspectModeEnabled"; public const string HighlightRect = "DOM.highlightRect"; - public const string HighlightQuad = "DOM.highlightQuad"; public const string HighlightNode = "DOM.highlightNode"; public const string HideHighlight = "DOM.hideHighlight"; - public const string HighlightFrame = "DOM.highlightFrame"; public const string PushNodeByPathToFrontend = "DOM.pushNodeByPathToFrontend"; public const string PushNodesByBackendIdsToFrontend = "DOM.pushNodesByBackendIdsToFrontend"; public const string SetInspectedNode = "DOM.setInspectedNode"; @@ -259,9 +367,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string GetBoxModel = "DOM.getBoxModel"; public const string GetNodeForLocation = "DOM.getNodeForLocation"; public const string GetRelayoutBoundary = "DOM.getRelayoutBoundary"; - public const string GetHighlightObjectForTest = "DOM.getHighlightObjectForTest"; public const string DocumentUpdated = "DOM.documentUpdated"; - public const string InspectNodeRequested = "DOM.inspectNodeRequested"; public const string SetChildNodes = "DOM.setChildNodes"; public const string AttributeModified = "DOM.attributeModified"; public const string AttributeRemoved = "DOM.attributeRemoved"; @@ -286,78 +392,33 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string GetComputedStyleForNode = "CSS.getComputedStyleForNode"; public const string GetPlatformFontsForNode = "CSS.getPlatformFontsForNode"; public const string GetStyleSheetText = "CSS.getStyleSheetText"; + public const string CollectClassNames = "CSS.collectClassNames"; public const string SetStyleSheetText = "CSS.setStyleSheetText"; - public const string SetPropertyText = "CSS.setPropertyText"; public const string SetRuleSelector = "CSS.setRuleSelector"; + public const string SetKeyframeKey = "CSS.setKeyframeKey"; + public const string SetStyleTexts = "CSS.setStyleTexts"; public const string SetMediaText = "CSS.setMediaText"; public const string CreateStyleSheet = "CSS.createStyleSheet"; public const string AddRule = "CSS.addRule"; public const string ForcePseudoState = "CSS.forcePseudoState"; public const string GetMediaQueries = "CSS.getMediaQueries"; + public const string SetEffectivePropertyValueForNode = "CSS.setEffectivePropertyValueForNode"; + public const string GetBackgroundColors = "CSS.getBackgroundColors"; + public const string GetLayoutTreeAndStyles = "CSS.getLayoutTreeAndStyles"; + public const string StartRuleUsageTracking = "CSS.startRuleUsageTracking"; + public const string TakeCoverageDelta = "CSS.takeCoverageDelta"; + public const string StopRuleUsageTracking = "CSS.stopRuleUsageTracking"; public const string MediaQueryResultChanged = "CSS.mediaQueryResultChanged"; + public const string FontsUpdated = "CSS.fontsUpdated"; public const string StyleSheetChanged = "CSS.styleSheetChanged"; public const string StyleSheetAdded = "CSS.styleSheetAdded"; public const string StyleSheetRemoved = "CSS.styleSheetRemoved"; } - public static class Timeline + public static class IO { - public const string Enable = "Timeline.enable"; - public const string Disable = "Timeline.disable"; - public const string Start = "Timeline.start"; - public const string Stop = "Timeline.stop"; - public const string EventRecorded = "Timeline.eventRecorded"; - } - - public static class Debugger - { - public const string Enable = "Debugger.enable"; - public const string Disable = "Debugger.disable"; - public const string SetBreakpointsActive = "Debugger.setBreakpointsActive"; - public const string SetSkipAllPauses = "Debugger.setSkipAllPauses"; - public const string SetBreakpointByUrl = "Debugger.setBreakpointByUrl"; - public const string SetBreakpoint = "Debugger.setBreakpoint"; - public const string RemoveBreakpoint = "Debugger.removeBreakpoint"; - public const string ContinueToLocation = "Debugger.continueToLocation"; - public const string StepOver = "Debugger.stepOver"; - public const string StepInto = "Debugger.stepInto"; - public const string StepOut = "Debugger.stepOut"; - public const string Pause = "Debugger.pause"; - public const string Resume = "Debugger.resume"; - public const string StepIntoAsync = "Debugger.stepIntoAsync"; - public const string SearchInContent = "Debugger.searchInContent"; - public const string CanSetScriptSource = "Debugger.canSetScriptSource"; - public const string SetScriptSource = "Debugger.setScriptSource"; - public const string RestartFrame = "Debugger.restartFrame"; - public const string GetScriptSource = "Debugger.getScriptSource"; - public const string GetFunctionDetails = "Debugger.getFunctionDetails"; - public const string GetGeneratorObjectDetails = "Debugger.getGeneratorObjectDetails"; - public const string GetCollectionEntries = "Debugger.getCollectionEntries"; - public const string SetPauseOnExceptions = "Debugger.setPauseOnExceptions"; - public const string EvaluateOnCallFrame = "Debugger.evaluateOnCallFrame"; - public const string CompileScript = "Debugger.compileScript"; - public const string RunScript = "Debugger.runScript"; - public const string SetVariableValue = "Debugger.setVariableValue"; - public const string GetStepInPositions = "Debugger.getStepInPositions"; - public const string GetBacktrace = "Debugger.getBacktrace"; - public const string SkipStackFrames = "Debugger.skipStackFrames"; - public const string SetAsyncCallStackDepth = "Debugger.setAsyncCallStackDepth"; - public const string EnablePromiseTracker = "Debugger.enablePromiseTracker"; - public const string DisablePromiseTracker = "Debugger.disablePromiseTracker"; - public const string GetPromises = "Debugger.getPromises"; - public const string GetPromiseById = "Debugger.getPromiseById"; - public const string FlushAsyncOperationEvents = "Debugger.flushAsyncOperationEvents"; - public const string SetAsyncOperationBreakpoint = "Debugger.setAsyncOperationBreakpoint"; - public const string RemoveAsyncOperationBreakpoint = "Debugger.removeAsyncOperationBreakpoint"; - public const string GlobalObjectCleared = "Debugger.globalObjectCleared"; - public const string ScriptParsed = "Debugger.scriptParsed"; - public const string ScriptFailedToParse = "Debugger.scriptFailedToParse"; - public const string BreakpointResolved = "Debugger.breakpointResolved"; - public const string Paused = "Debugger.paused"; - public const string Resumed = "Debugger.resumed"; - public const string PromiseUpdated = "Debugger.promiseUpdated"; - public const string AsyncOperationStarted = "Debugger.asyncOperationStarted"; - public const string AsyncOperationCompleted = "Debugger.asyncOperationCompleted"; + public const string Read = "IO.read"; + public const string Close = "IO.close"; } public static class DOMDebugger @@ -370,91 +431,53 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string RemoveInstrumentationBreakpoint = "DOMDebugger.removeInstrumentationBreakpoint"; public const string SetXHRBreakpoint = "DOMDebugger.setXHRBreakpoint"; public const string RemoveXHRBreakpoint = "DOMDebugger.removeXHRBreakpoint"; + public const string GetEventListeners = "DOMDebugger.getEventListeners"; } - public static class Profiler - { - public const string Enable = "Profiler.enable"; - public const string Disable = "Profiler.disable"; - public const string SetSamplingInterval = "Profiler.setSamplingInterval"; - public const string Start = "Profiler.start"; - public const string Stop = "Profiler.stop"; - public const string ConsoleProfileStarted = "Profiler.consoleProfileStarted"; - public const string ConsoleProfileFinished = "Profiler.consoleProfileFinished"; - } - - public static class HeapProfiler + public static class Target { - public const string Enable = "HeapProfiler.enable"; - public const string Disable = "HeapProfiler.disable"; - public const string StartTrackingHeapObjects = "HeapProfiler.startTrackingHeapObjects"; - public const string StopTrackingHeapObjects = "HeapProfiler.stopTrackingHeapObjects"; - public const string TakeHeapSnapshot = "HeapProfiler.takeHeapSnapshot"; - public const string CollectGarbage = "HeapProfiler.collectGarbage"; - public const string GetObjectByHeapObjectId = "HeapProfiler.getObjectByHeapObjectId"; - public const string AddInspectedHeapObject = "HeapProfiler.addInspectedHeapObject"; - public const string GetHeapObjectId = "HeapProfiler.getHeapObjectId"; - public const string AddHeapSnapshotChunk = "HeapProfiler.addHeapSnapshotChunk"; - public const string ResetProfiles = "HeapProfiler.resetProfiles"; - public const string ReportHeapSnapshotProgress = "HeapProfiler.reportHeapSnapshotProgress"; - public const string LastSeenObjectId = "HeapProfiler.lastSeenObjectId"; - public const string HeapStatsUpdate = "HeapProfiler.heapStatsUpdate"; - } - - public static class Worker - { - public const string Enable = "Worker.enable"; - public const string Disable = "Worker.disable"; - public const string SendMessageToWorker = "Worker.sendMessageToWorker"; - public const string ConnectToWorker = "Worker.connectToWorker"; - public const string DisconnectFromWorker = "Worker.disconnectFromWorker"; - public const string SetAutoconnectToWorkers = "Worker.setAutoconnectToWorkers"; - public const string WorkerCreated = "Worker.workerCreated"; - public const string WorkerTerminated = "Worker.workerTerminated"; - public const string DispatchMessageFromWorker = "Worker.dispatchMessageFromWorker"; + public const string SetDiscoverTargets = "Target.setDiscoverTargets"; + public const string SetAutoAttach = "Target.setAutoAttach"; + public const string SetAttachToFrames = "Target.setAttachToFrames"; + public const string SetRemoteLocations = "Target.setRemoteLocations"; + public const string SendMessageToTarget = "Target.sendMessageToTarget"; + public const string GetTargetInfo = "Target.getTargetInfo"; + public const string ActivateTarget = "Target.activateTarget"; + public const string CloseTarget = "Target.closeTarget"; + public const string AttachToTarget = "Target.attachToTarget"; + public const string DetachFromTarget = "Target.detachFromTarget"; + public const string CreateBrowserContext = "Target.createBrowserContext"; + public const string DisposeBrowserContext = "Target.disposeBrowserContext"; + public const string CreateTarget = "Target.createTarget"; + public const string GetTargets = "Target.getTargets"; + public const string TargetCreated = "Target.targetCreated"; + public const string TargetDestroyed = "Target.targetDestroyed"; + public const string AttachedToTarget = "Target.attachedToTarget"; + public const string DetachedFromTarget = "Target.detachedFromTarget"; + public const string ReceivedMessageFromTarget = "Target.receivedMessageFromTarget"; } public static class ServiceWorker { public const string Enable = "ServiceWorker.enable"; public const string Disable = "ServiceWorker.disable"; - public const string SendMessage = "ServiceWorker.sendMessage"; - public const string Stop = "ServiceWorker.stop"; public const string Unregister = "ServiceWorker.unregister"; public const string UpdateRegistration = "ServiceWorker.updateRegistration"; public const string StartWorker = "ServiceWorker.startWorker"; + public const string SkipWaiting = "ServiceWorker.skipWaiting"; public const string StopWorker = "ServiceWorker.stopWorker"; public const string InspectWorker = "ServiceWorker.inspectWorker"; - public const string SetDebugOnStart = "ServiceWorker.setDebugOnStart"; + public const string SetForceUpdateOnPageLoad = "ServiceWorker.setForceUpdateOnPageLoad"; public const string DeliverPushMessage = "ServiceWorker.deliverPushMessage"; - public const string WorkerCreated = "ServiceWorker.workerCreated"; - public const string WorkerTerminated = "ServiceWorker.workerTerminated"; - public const string DispatchMessage = "ServiceWorker.dispatchMessage"; + public const string DispatchSyncEvent = "ServiceWorker.dispatchSyncEvent"; public const string WorkerRegistrationUpdated = "ServiceWorker.workerRegistrationUpdated"; public const string WorkerVersionUpdated = "ServiceWorker.workerVersionUpdated"; public const string WorkerErrorReported = "ServiceWorker.workerErrorReported"; - public const string DebugOnStartUpdated = "ServiceWorker.debugOnStartUpdated"; - } - - public static class Canvas - { - public const string Enable = "Canvas.enable"; - public const string Disable = "Canvas.disable"; - public const string DropTraceLog = "Canvas.dropTraceLog"; - public const string HasUninstrumentedCanvases = "Canvas.hasUninstrumentedCanvases"; - public const string CaptureFrame = "Canvas.captureFrame"; - public const string StartCapturing = "Canvas.startCapturing"; - public const string StopCapturing = "Canvas.stopCapturing"; - public const string GetTraceLog = "Canvas.getTraceLog"; - public const string ReplayTraceLog = "Canvas.replayTraceLog"; - public const string GetResourceState = "Canvas.getResourceState"; - public const string EvaluateTraceLogCallArgument = "Canvas.evaluateTraceLogCallArgument"; - public const string ContextCreated = "Canvas.contextCreated"; - public const string TraceLogsRemoved = "Canvas.traceLogsRemoved"; } public static class Input { + public const string SetIgnoreInputEvents = "Input.setIgnoreInputEvents"; public const string DispatchKeyEvent = "Input.dispatchKeyEvent"; public const string DispatchMouseEvent = "Input.dispatchMouseEvent"; public const string DispatchTouchEvent = "Input.dispatchTouchEvent"; @@ -490,35 +513,67 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome public const string Start = "Tracing.start"; public const string End = "Tracing.end"; public const string GetCategories = "Tracing.getCategories"; + public const string RequestMemoryDump = "Tracing.requestMemoryDump"; + public const string RecordClockSyncMarker = "Tracing.recordClockSyncMarker"; public const string DataCollected = "Tracing.dataCollected"; public const string TracingComplete = "Tracing.tracingComplete"; public const string BufferUsage = "Tracing.bufferUsage"; } - public static class Power - { - public const string Start = "Power.start"; - public const string End = "Power.end"; - public const string CanProfilePower = "Power.canProfilePower"; - public const string GetAccuracyLevel = "Power.getAccuracyLevel"; - public const string DataAvailable = "Power.dataAvailable"; - } - public static class Animation { public const string Enable = "Animation.enable"; - public const string GetAnimationPlayersForNode = "Animation.getAnimationPlayersForNode"; + public const string Disable = "Animation.disable"; public const string GetPlaybackRate = "Animation.getPlaybackRate"; public const string SetPlaybackRate = "Animation.setPlaybackRate"; - public const string SetCurrentTime = "Animation.setCurrentTime"; + public const string GetCurrentTime = "Animation.getCurrentTime"; + public const string SetPaused = "Animation.setPaused"; public const string SetTiming = "Animation.setTiming"; - public const string AnimationPlayerCreated = "Animation.animationPlayerCreated"; - public const string AnimationPlayerCanceled = "Animation.animationPlayerCanceled"; + public const string SeekAnimations = "Animation.seekAnimations"; + public const string ReleaseAnimations = "Animation.releaseAnimations"; + public const string ResolveAnimation = "Animation.resolveAnimation"; + public const string AnimationCreated = "Animation.animationCreated"; + public const string AnimationStarted = "Animation.animationStarted"; + public const string AnimationCanceled = "Animation.animationCanceled"; } public static class Accessibility { - public const string GetAXNode = "Accessibility.getAXNode"; + public const string GetPartialAXTree = "Accessibility.getPartialAXTree"; + } + + public static class Storage + { + public const string ClearDataForOrigin = "Storage.clearDataForOrigin"; + } + + public static class Log + { + public const string Enable = "Log.enable"; + public const string Disable = "Log.disable"; + public const string Clear = "Log.clear"; + public const string StartViolationsReport = "Log.startViolationsReport"; + public const string StopViolationsReport = "Log.stopViolationsReport"; + public const string EntryAdded = "Log.entryAdded"; + } + + public static class SystemInfo + { + public const string GetInfo = "SystemInfo.getInfo"; + } + + public static class Tethering + { + public const string Bind = "Tethering.bind"; + public const string Unbind = "Tethering.unbind"; + public const string Accepted = "Tethering.accepted"; + } + + public static class Browser + { + public const string GetWindowForTarget = "Browser.getWindowForTarget"; + public const string SetWindowBounds = "Browser.setWindowBounds"; + public const string GetWindowBounds = "Browser.getWindowBounds"; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetContinuousPaintingEnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Rendering/SetContinuousPaintingEnabledCommand.cs deleted file mode 100644 index b8f6cb7dc0d27e8fbde942bbe09db110e5a88052..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetContinuousPaintingEnabledCommand.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering -{ - /// <summary> - /// Requests that backend enables continuous painting - /// </summary> - [Command(ProtocolName.Rendering.SetContinuousPaintingEnabled)] - [SupportedBy("Chrome")] - public class SetContinuousPaintingEnabledCommand - { - /// <summary> - /// Gets or sets True for enabling cointinuous painting - /// </summary> - public bool Enabled { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetContinuousPaintingEnabledCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Rendering/SetContinuousPaintingEnabledCommandResponse.cs deleted file mode 100644 index 60833d6996ef32b318815449176c5ad22514420e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Rendering/SetContinuousPaintingEnabledCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Rendering -{ - /// <summary> - /// Requests that backend enables continuous painting - /// </summary> - [CommandResponse(ProtocolName.Rendering.SetContinuousPaintingEnabled)] - [SupportedBy("Chrome")] - public class SetContinuousPaintingEnabledCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/AwaitPromiseCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/AwaitPromiseCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..5a9cd9102b5f53b585f44ca21556e027582878aa --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/AwaitPromiseCommand.cs @@ -0,0 +1,29 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Add handler to promise with given promise object id. + /// </summary> + [Command(ProtocolName.Runtime.AwaitPromise)] + [SupportedBy("Chrome")] + public class AwaitPromiseCommand: ICommand<AwaitPromiseCommandResponse> + { + /// <summary> + /// Gets or sets Identifier of the promise. + /// </summary> + public string PromiseObjectId { get; set; } + /// <summary> + /// Gets or sets Whether the result is expected to be a JSON object that should be sent by value. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? ReturnByValue { get; set; } + /// <summary> + /// Gets or sets Whether preview should be generated for the result. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? GeneratePreview { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/AwaitPromiseCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/AwaitPromiseCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..a9978d51566adfc23c73ddf3bab8fac7ee1479ee --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/AwaitPromiseCommandResponse.cs @@ -0,0 +1,24 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Add handler to promise with given promise object id. + /// </summary> + [CommandResponse(ProtocolName.Runtime.AwaitPromise)] + [SupportedBy("Chrome")] + public class AwaitPromiseCommandResponse + { + /// <summary> + /// Gets or sets Promise result. Will contain rejected value if promise was rejected. + /// </summary> + public RemoteObject Result { get; set; } + /// <summary> + /// Gets or sets Exception details if stack strace is available. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public ExceptionDetails ExceptionDetails { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/CallArgument.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallArgument.cs index 515af4273e36aab1fe80079f939dd7dad7b132a8..a015ba92a0559fc51685082966336c0c41f0e96d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/CallArgument.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallArgument.cs @@ -5,25 +5,25 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> - /// Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified. + /// Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified. /// </summary> [SupportedBy("Chrome")] public class CallArgument { /// <summary> - /// Gets or sets Primitive value, or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0). + /// Gets or sets Primitive value. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public object Value { get; set; } /// <summary> - /// Gets or sets Remote object handle. + /// Gets or sets Primitive value which can not be JSON-stringified. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectId { get; set; } + public UnserializableValue UnserializableValue { get; set; } /// <summary> - /// Gets or sets Object type. + /// Gets or sets Remote object handle. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } + public string ObjectId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Console/CallFrame.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFrame.cs similarity index 74% rename from source/ChromeDevTools/Protocol/Chrome/Console/CallFrame.cs rename to source/ChromeDevTools/Protocol/Chrome/Runtime/CallFrame.cs index f55c0abbff0f2540e3054d1bc1d706243b93a0c8..f29a8a33115a3e7f5df50d67de4eb4b7f639185e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Console/CallFrame.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFrame.cs @@ -2,10 +2,10 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> - /// Stack entry for console errors and assertions. + /// Stack entry for runtime errors and assertions. /// </summary> [SupportedBy("Chrome")] public class CallFrame @@ -23,11 +23,11 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Console /// </summary> public string Url { get; set; } /// <summary> - /// Gets or sets JavaScript script line number. + /// Gets or sets JavaScript script line number (0-based). /// </summary> public long LineNumber { get; set; } /// <summary> - /// Gets or sets JavaScript script column number. + /// Gets or sets JavaScript script column number (0-based). /// </summary> public long ColumnNumber { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommand.cs index a8ce50bc8e8485fa53632a2ed2ffe205bd7ecdb3..834a39995fc529fb6a98cb6876512aa4c7d1b761 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [Command(ProtocolName.Runtime.CallFunctionOn)] [SupportedBy("Chrome")] - public class CallFunctionOnCommand + public class CallFunctionOnCommand: ICommand<CallFunctionOnCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to call function on. @@ -25,10 +25,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public CallArgument[] Arguments { get; set; } /// <summary> - /// Gets or sets Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state. + /// Gets or sets In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? DoNotPauseOnExceptionsAndMuteConsole { get; set; } + public bool? Silent { get; set; } /// <summary> /// Gets or sets Whether the result is expected to be a JSON object which should be sent by value. /// </summary> @@ -39,5 +39,15 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? GeneratePreview { get; set; } + /// <summary> + /// Gets or sets Whether execution should be treated as initiated by user in the UI. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? UserGesture { get; set; } + /// <summary> + /// Gets or sets Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? AwaitPromise { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommandResponse.cs index a41117123fddceeeab45b95fca134edc64ba6ac7..7bed517fee15f0b20e6699732a3b92bdd6449d43 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/CallFunctionOnCommandResponse.cs @@ -16,9 +16,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> public RemoteObject Result { get; set; } /// <summary> - /// Gets or sets True if the result was thrown during the evaluation. + /// Gets or sets Exception details. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? WasThrown { get; set; } + public ExceptionDetails ExceptionDetails { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/CompileScriptCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/CompileScriptCommand.cs similarity index 62% rename from source/ChromeDevTools/Protocol/Chrome/Debugger/CompileScriptCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Runtime/CompileScriptCommand.cs index be2da0a9126db1bc4e7be6c83cb869a4df90e705..896fc0fcf8bcf72c178b6a6ae0302573c8704026 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/CompileScriptCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/CompileScriptCommand.cs @@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> /// Compiles expression. /// </summary> - [Command(ProtocolName.Debugger.CompileScript)] + [Command(ProtocolName.Runtime.CompileScript)] [SupportedBy("Chrome")] - public class CompileScriptCommand + public class CompileScriptCommand: ICommand<CompileScriptCommandResponse> { /// <summary> /// Gets or sets Expression to compile. @@ -24,7 +24,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger /// </summary> public bool PersistScript { get; set; } /// <summary> - /// Gets or sets Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page. + /// Gets or sets Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? ExecutionContextId { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/CompileScriptCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/CompileScriptCommandResponse.cs similarity index 83% rename from source/ChromeDevTools/Protocol/Chrome/Debugger/CompileScriptCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Runtime/CompileScriptCommandResponse.cs index 6c3e1be54ffcb589c681c7602558984d91bcd215..4167c49b3f86f714fca358ad4b068632cf3823c1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/CompileScriptCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/CompileScriptCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> /// Compiles expression. /// </summary> - [CommandResponse(ProtocolName.Debugger.CompileScript)] + [CommandResponse(ProtocolName.Runtime.CompileScript)] [SupportedBy("Chrome")] public class CompileScriptCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ConsoleAPICalledEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ConsoleAPICalledEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f1d70d396f765144172c5de407d9088a363308eb --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ConsoleAPICalledEvent.cs @@ -0,0 +1,34 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Issued when console API was called. + /// </summary> + [Event(ProtocolName.Runtime.ConsoleAPICalled)] + [SupportedBy("Chrome")] + public class ConsoleAPICalledEvent + { + /// <summary> + /// Gets or sets Type of the call. + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Call arguments. + /// </summary> + public RemoteObject[] Args { get; set; } + /// <summary> + /// Gets or sets Identifier of the context where the call was made. + /// </summary> + public long ExecutionContextId { get; set; } + /// <summary> + /// Gets or sets Call timestamp. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets Stack trace captured when the call was made. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public StackTrace StackTrace { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/CustomPreview.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/CustomPreview.cs index f13348a69d9dac3750a12ed76b600c926bef998b..2da7ee769fb063f3fc4378da7161f50d3cbeb024 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/CustomPreview.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/CustomPreview.cs @@ -23,6 +23,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> public string FormatterObjectId { get; set; } /// <summary> + /// Gets or sets BindRemoteObjectFunctionId + /// </summary> + public string BindRemoteObjectFunctionId { get; set; } + /// <summary> /// Gets or sets ConfigObjectId /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/DisableCommand.cs index f846d3c572a7ff9dead1035fa6ef11dff2160abe..e6e049cf45ffe90d4b565b7a8f3940a002b5563a 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [Command(ProtocolName.Runtime.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/DiscardConsoleEntriesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/DiscardConsoleEntriesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9738281c7ae9a9d9732e698d315fdbd5b0260b82 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/DiscardConsoleEntriesCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Discards collected exceptions and console API calls. + /// </summary> + [Command(ProtocolName.Runtime.DiscardConsoleEntries)] + [SupportedBy("Chrome")] + public class DiscardConsoleEntriesCommand: ICommand<DiscardConsoleEntriesCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/RunCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/DiscardConsoleEntriesCommandResponse.cs similarity index 55% rename from source/ChromeDevTools/Protocol/Chrome/Runtime/RunCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/Runtime/DiscardConsoleEntriesCommandResponse.cs index 82494c85c61f1f47e9ffc8f7a09fbaa894a021e2..3151e63f2bb62aaac2f68082e838644937d5607e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/RunCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/DiscardConsoleEntriesCommandResponse.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> - /// Tells inspected instance(worker or page) that it can run in case it was started paused. + /// Discards collected exceptions and console API calls. /// </summary> - [Command(ProtocolName.Runtime.Run)] + [CommandResponse(ProtocolName.Runtime.DiscardConsoleEntries)] [SupportedBy("Chrome")] - public class RunCommand + public class DiscardConsoleEntriesCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/EnableCommand.cs index e35efcc6b01b58a400dbab3882adf9ab23ceef95..5d14738ca502bcc58e2ab91bba683d1e52ec386c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [Command(ProtocolName.Runtime.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommand.cs index 9026149f940f8ed17f56bfb9a266fd9fa81e0371..0eb6c82d15e006d8fa94b3adbb0d8e3202d5f508 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [Command(ProtocolName.Runtime.Evaluate)] [SupportedBy("Chrome")] - public class EvaluateCommand + public class EvaluateCommand: ICommand<EvaluateCommandResponse> { /// <summary> /// Gets or sets Expression to evaluate. @@ -26,12 +26,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? IncludeCommandLineAPI { get; set; } /// <summary> - /// Gets or sets Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state. + /// Gets or sets In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? DoNotPauseOnExceptionsAndMuteConsole { get; set; } + public bool? Silent { get; set; } /// <summary> - /// Gets or sets Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page. + /// Gets or sets Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public long? ContextId { get; set; } @@ -45,5 +45,15 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public bool? GeneratePreview { get; set; } + /// <summary> + /// Gets or sets Whether execution should be treated as initiated by user in the UI. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? UserGesture { get; set; } + /// <summary> + /// Gets or sets Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? AwaitPromise { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommandResponse.cs index 702bda706e41ca810c75ee0781b780ca7d29a508..1f7d767c87b981dbf880d255dc7b7d3d898821d9 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/EvaluateCommandResponse.cs @@ -16,14 +16,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> public RemoteObject Result { get; set; } /// <summary> - /// Gets or sets True if the result was thrown during the evaluation. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? WasThrown { get; set; } - /// <summary> /// Gets or sets Exception details. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Debugger.ExceptionDetails ExceptionDetails { get; set; } + public ExceptionDetails ExceptionDetails { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/EventListener.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/EventListener.cs deleted file mode 100644 index 59c441a00fbad3e1bdde73674902b47c995ea48b..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/EventListener.cs +++ /dev/null @@ -1,31 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime -{ - /// <summary> - /// Object event listener. - /// </summary> - [SupportedBy("Chrome")] - public class EventListener - { - /// <summary> - /// Gets or sets <code>EventListener</code>'s type. - /// </summary> - public string Type { get; set; } - /// <summary> - /// Gets or sets <code>EventListener</code>'s useCapture. - /// </summary> - public bool UseCapture { get; set; } - /// <summary> - /// Gets or sets Handler code location. - /// </summary> - public Debugger.Location Location { get; set; } - /// <summary> - /// Gets or sets Event handler function value. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Runtime.RemoteObject Handler { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionDetails.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionDetails.cs new file mode 100644 index 0000000000000000000000000000000000000000..ef3b64d91262cae683394762983d0c8b1055d726 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionDetails.cs @@ -0,0 +1,55 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Detailed information about exception (or error) that was thrown during script compilation or execution. + /// </summary> + [SupportedBy("Chrome")] + public class ExceptionDetails + { + /// <summary> + /// Gets or sets Exception id. + /// </summary> + public long ExceptionId { get; set; } + /// <summary> + /// Gets or sets Exception text, which should be used together with exception object when available. + /// </summary> + public string Text { get; set; } + /// <summary> + /// Gets or sets Line number of the exception location (0-based). + /// </summary> + public long LineNumber { get; set; } + /// <summary> + /// Gets or sets Column number of the exception location (0-based). + /// </summary> + public long ColumnNumber { get; set; } + /// <summary> + /// Gets or sets Script ID of the exception location. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets URL of the exception location, to be used when the script was not reported. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Url { get; set; } + /// <summary> + /// Gets or sets JavaScript stack trace if available. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public StackTrace StackTrace { get; set; } + /// <summary> + /// Gets or sets Exception object if available. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public RemoteObject Exception { get; set; } + /// <summary> + /// Gets or sets Identifier of the context where exception happened. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ExecutionContextId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionRevokedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionRevokedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..202cfcb37ead423aa07f3a3723d953ff4e16561a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionRevokedEvent.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Issued when unhandled exception was revoked. + /// </summary> + [Event(ProtocolName.Runtime.ExceptionRevoked)] + [SupportedBy("Chrome")] + public class ExceptionRevokedEvent + { + /// <summary> + /// Gets or sets Reason describing why exception was revoked. + /// </summary> + public string Reason { get; set; } + /// <summary> + /// Gets or sets The id of revoked exception, as reported in <code>exceptionUnhandled</code>. + /// </summary> + public long ExceptionId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionThrownEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionThrownEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..a695600b47503c4f4bd96a0dab0b4163283f6912 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExceptionThrownEvent.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Issued when exception was thrown and unhandled. + /// </summary> + [Event(ProtocolName.Runtime.ExceptionThrown)] + [SupportedBy("Chrome")] + public class ExceptionThrownEvent + { + /// <summary> + /// Gets or sets Timestamp of the exception. + /// </summary> + public double Timestamp { get; set; } + /// <summary> + /// Gets or sets ExceptionDetails + /// </summary> + public ExceptionDetails ExceptionDetails { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs index 0a60e503e9f497ed306336bc2576c0dacb86b7b2..53d76bbc7eaeb4fcd26040b0e6c94dd0ecaee594 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextCreatedEvent.cs @@ -10,7 +10,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime public class ExecutionContextCreatedEvent { /// <summary> - /// Gets or sets A newly created execution contex. + /// Gets or sets A newly created execution context. /// </summary> public ExecutionContextDescription Context { get; set; } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextDescription.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextDescription.cs index 38c8116620053477c5449804e3b0da9c7cedda02..bc0d48a53f564732c9273ad1f725117fd521927b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextDescription.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ExecutionContextDescription.cs @@ -15,11 +15,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> public long Id { get; set; } /// <summary> - /// Gets or sets True if this is a context where inpspected web page scripts run. False if it is a content script isolated context. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsPageContext { get; set; } - /// <summary> /// Gets or sets Execution context origin. /// </summary> public string Origin { get; set; } @@ -28,8 +23,9 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> public string Name { get; set; } /// <summary> - /// Gets or sets Id of the owning frame. May be an empty string if the context is not associated with a frame. + /// Gets or sets Embedder-specific auxiliary data. /// </summary> - public string FrameId { get; set; } + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public object AuxData { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetEventListenersCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/GetEventListenersCommand.cs deleted file mode 100644 index ca02539670105143395d2a0799614df0994cad8d..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetEventListenersCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime -{ - /// <summary> - /// Returns event listeners of the given object. - /// </summary> - [Command(ProtocolName.Runtime.GetEventListeners)] - [SupportedBy("Chrome")] - public class GetEventListenersCommand - { - /// <summary> - /// Gets or sets Identifier of the object to return listeners for. - /// </summary> - public string ObjectId { get; set; } - /// <summary> - /// Gets or sets Symbolic group name for handler value. Handler value is not returned without this parameter specified. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string ObjectGroup { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommand.cs index e7634cf132ce88b6f7a502608561d1ea45a9ae1b..2d20d64a6fe1ccdbc43eb22ad6a7373469973c1f 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [Command(ProtocolName.Runtime.GetProperties)] [SupportedBy("Chrome")] - public class GetPropertiesCommand + public class GetPropertiesCommand: ICommand<GetPropertiesCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to return properties for. diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommandResponse.cs index 3d007868ba01132fc0f2e43ee26e4ad9b8efd957..db45ce6689caf8b5e0d437c86bbc7c1bc8993cc3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/GetPropertiesCommandResponse.cs @@ -20,5 +20,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public InternalPropertyDescriptor[] InternalProperties { get; set; } + /// <summary> + /// Gets or sets Exception details. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public ExceptionDetails ExceptionDetails { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/InspectRequestedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/InspectRequestedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..42340473b517a6502dd76a943c86f17e7ceaf2a2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/InspectRequestedEvent.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Issued when object should be inspected (for example, as a result of inspect() command line API call). + /// </summary> + [Event(ProtocolName.Runtime.InspectRequested)] + [SupportedBy("Chrome")] + public class InspectRequestedEvent + { + /// <summary> + /// Gets or sets Object + /// </summary> + public RemoteObject Object { get; set; } + /// <summary> + /// Gets or sets Hints + /// </summary> + public object Hints { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/IsRunRequiredCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/IsRunRequiredCommand.cs deleted file mode 100644 index ec7816b4bbff2c8a7a3149e79ae2c402230e775c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/IsRunRequiredCommand.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime -{ - [Command(ProtocolName.Runtime.IsRunRequired)] - [SupportedBy("Chrome")] - public class IsRunRequiredCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/IsRunRequiredCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/IsRunRequiredCommandResponse.cs deleted file mode 100644 index 864aaa41d4a1a06b7e56d9fd9c93c78a1f4a2c09..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/IsRunRequiredCommandResponse.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime -{ - [CommandResponse(ProtocolName.Runtime.IsRunRequired)] - [SupportedBy("Chrome")] - public class IsRunRequiredCommandResponse - { - /// <summary> - /// Gets or sets True if the Runtime is in paused on start state. - /// </summary> - public bool Result { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ObjectPreview.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ObjectPreview.cs index 03a64ea7cf0435041efc6bd8862a8cfda78417f4..c03af1a80aba36a8cd6cbb9e792090b34f40a6c3 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/ObjectPreview.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ObjectPreview.cs @@ -25,10 +25,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Description { get; set; } /// <summary> - /// Gets or sets Determines whether preview is lossless (contains all information of the original object). - /// </summary> - public bool Lossless { get; set; } - /// <summary> /// Gets or sets True iff some of the properties or entries of the original object did not fit. /// </summary> public bool Overflow { get; set; } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectCommand.cs index 569893069b98c3f53d9eed6b9855ec6abbb8ac8b..a9bc1e6f4163a2d9e063a3e969ae00856a24fe89 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [Command(ProtocolName.Runtime.ReleaseObject)] [SupportedBy("Chrome")] - public class ReleaseObjectCommand + public class ReleaseObjectCommand: ICommand<ReleaseObjectCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to release. diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectGroupCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectGroupCommand.cs index f8fa45bf1efa9e6a0ba3c43c9541e57dcb323437..e8f12fd46010980444961f7a760ff6359ae34024 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectGroupCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/ReleaseObjectGroupCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime /// </summary> [Command(ProtocolName.Runtime.ReleaseObjectGroup)] [SupportedBy("Chrome")] - public class ReleaseObjectGroupCommand + public class ReleaseObjectGroupCommand: ICommand<ReleaseObjectGroupCommandResponse> { /// <summary> /// Gets or sets Symbolic object group name. diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/RemoteObject.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/RemoteObject.cs index 52e81f0ad44c616812cd5f5026a8af66c04248ab..401fe9cb86aa1225af787f40c3b2fc09c1a9530b 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/RemoteObject.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/RemoteObject.cs @@ -25,11 +25,16 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string ClassName { get; set; } /// <summary> - /// Gets or sets Remote object value in case of primitive values or JSON values (if it was requested), or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0). + /// Gets or sets Remote object value in case of primitive values or JSON values (if it was requested). /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public object Value { get; set; } /// <summary> + /// Gets or sets Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public UnserializableValue UnserializableValue { get; set; } + /// <summary> /// Gets or sets String representation of the object. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/RunIfWaitingForDebuggerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunIfWaitingForDebuggerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..b88249cdd670fc27294a364ec0ba812183f3fed1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunIfWaitingForDebuggerCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Tells inspected instance to run if it was waiting for debugger to attach. + /// </summary> + [Command(ProtocolName.Runtime.RunIfWaitingForDebugger)] + [SupportedBy("Chrome")] + public class RunIfWaitingForDebuggerCommand: ICommand<RunIfWaitingForDebuggerCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/RunCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunIfWaitingForDebuggerCommandResponse.cs similarity index 52% rename from source/ChromeDevTools/Protocol/Chrome/Runtime/RunCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Runtime/RunIfWaitingForDebuggerCommandResponse.cs index 33eac339415b784bfb72c2e91140635d6b96a83b..4d82cb081f34226009e2e5d01d466a2bf7902378 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/RunCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunIfWaitingForDebuggerCommandResponse.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> - /// Tells inspected instance(worker or page) that it can run in case it was started paused. + /// Tells inspected instance to run if it was waiting for debugger to attach. /// </summary> - [CommandResponse(ProtocolName.Runtime.Run)] + [CommandResponse(ProtocolName.Runtime.RunIfWaitingForDebugger)] [SupportedBy("Chrome")] - public class RunCommandResponse + public class RunIfWaitingForDebuggerCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/RunScriptCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunScriptCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf0041b8d7616833b0e0b489ef87dca9ccd346c9 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunScriptCommand.cs @@ -0,0 +1,54 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime +{ + /// <summary> + /// Runs script with given id in a given context. + /// </summary> + [Command(ProtocolName.Runtime.RunScript)] + [SupportedBy("Chrome")] + public class RunScriptCommand: ICommand<RunScriptCommandResponse> + { + /// <summary> + /// Gets or sets Id of the script to run. + /// </summary> + public string ScriptId { get; set; } + /// <summary> + /// Gets or sets Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? ExecutionContextId { get; set; } + /// <summary> + /// Gets or sets Symbolic group name that can be used to release multiple objects. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string ObjectGroup { get; set; } + /// <summary> + /// Gets or sets In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? Silent { get; set; } + /// <summary> + /// Gets or sets Determines whether Command Line API should be available during the evaluation. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? IncludeCommandLineAPI { get; set; } + /// <summary> + /// Gets or sets Whether the result is expected to be a JSON object which should be sent by value. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? ReturnByValue { get; set; } + /// <summary> + /// Gets or sets Whether preview should be generated for the result. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? GeneratePreview { get; set; } + /// <summary> + /// Gets or sets Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? AwaitPromise { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/RunScriptCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunScriptCommandResponse.cs similarity index 75% rename from source/ChromeDevTools/Protocol/Chrome/Debugger/RunScriptCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Runtime/RunScriptCommandResponse.cs index 0495a238a49ebd59202d7b9a5e80e102ca81d4c0..91a939a906e0f92c78d934e93f52da0139ad0533 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/RunScriptCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/RunScriptCommandResponse.cs @@ -2,19 +2,19 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> /// Runs script with given id in a given context. /// </summary> - [CommandResponse(ProtocolName.Debugger.RunScript)] + [CommandResponse(ProtocolName.Runtime.RunScript)] [SupportedBy("Chrome")] public class RunScriptCommandResponse { /// <summary> /// Gets or sets Run result. /// </summary> - public Runtime.RemoteObject Result { get; set; } + public RemoteObject Result { get; set; } /// <summary> /// Gets or sets Exception details. /// </summary> diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/SetCustomObjectFormatterEnabledCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/SetCustomObjectFormatterEnabledCommand.cs index 7997001a8ef6a53be3c6b2c4bb98f94bca61cd6a..ede82b66ed80e113ca3e829a10874e3356f3ea6c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Runtime/SetCustomObjectFormatterEnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/SetCustomObjectFormatterEnabledCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { [Command(ProtocolName.Runtime.SetCustomObjectFormatterEnabled)] [SupportedBy("Chrome")] - public class SetCustomObjectFormatterEnabledCommand + public class SetCustomObjectFormatterEnabledCommand: ICommand<SetCustomObjectFormatterEnabledCommandResponse> { /// <summary> /// Gets or sets Enabled diff --git a/source/ChromeDevTools/Protocol/Chrome/Debugger/StackTrace.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/StackTrace.cs similarity index 52% rename from source/ChromeDevTools/Protocol/Chrome/Debugger/StackTrace.cs rename to source/ChromeDevTools/Protocol/Chrome/Runtime/StackTrace.cs index d509aeae498ded6772a182ac44afe6cd0fa549ed..0217d896282813d066868c94829113bdba3c4182 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Debugger/StackTrace.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/StackTrace.cs @@ -2,27 +2,32 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime { /// <summary> - /// JavaScript call stack, including async stack traces. + /// Call frames for assertions or error messages. /// </summary> [SupportedBy("Chrome")] public class StackTrace { /// <summary> - /// Gets or sets Call frames of the stack trace. + /// Gets or sets String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + /// <summary> + /// Gets or sets JavaScript function name. /// </summary> public CallFrame[] CallFrames { get; set; } /// <summary> - /// Gets or sets String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + /// Gets or sets Asynchronous JavaScript stack trace that preceded this stack, if available. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } + public StackTrace Parent { get; set; } /// <summary> - /// Gets or sets Async stack trace, if any. + /// Gets or sets Creation frame of the Promise which produced the next synchronous trace when resolved, if available. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public StackTrace AsyncStackTrace { get; set; } + public CallFrame PromiseCreationFrame { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Runtime/UnserializableValue.cs b/source/ChromeDevTools/Protocol/Chrome/Runtime/UnserializableValue.cs new file mode 100644 index 0000000000000000000000000000000000000000..221689497dc665aa17b0e435985e0f99968e2d41 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Runtime/UnserializableValue.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime{ + /// <summary> + /// Primitive value which cannot be JSON-stringified. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum UnserializableValue + { + Infinity, + NaN, + [EnumMember(Value = "-Infinity")] + _Infinity, + [EnumMember(Value = "-0")] + _0, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Schema/Domain.cs b/source/ChromeDevTools/Protocol/Chrome/Schema/Domain.cs new file mode 100644 index 0000000000000000000000000000000000000000..738d86835479ce1157a0419995b3a5d257662613 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Schema/Domain.cs @@ -0,0 +1,22 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Schema +{ + /// <summary> + /// Description of the protocol domain. + /// </summary> + [SupportedBy("Chrome")] + public class Domain + { + /// <summary> + /// Gets or sets Domain name. + /// </summary> + public string Name { get; set; } + /// <summary> + /// Gets or sets Domain version. + /// </summary> + public string Version { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Schema/GetDomainsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Schema/GetDomainsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..63266ed4d53f668790646bae6c16e79893fb76e8 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Schema/GetDomainsCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Schema +{ + /// <summary> + /// Returns supported domains. + /// </summary> + [Command(ProtocolName.Schema.GetDomains)] + [SupportedBy("Chrome")] + public class GetDomainsCommand: ICommand<GetDomainsCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Schema/GetDomainsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Schema/GetDomainsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..44d411f4e422642cb47fc08914e3bf9737a9f5cc --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Schema/GetDomainsCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Schema +{ + /// <summary> + /// Returns supported domains. + /// </summary> + [CommandResponse(ProtocolName.Schema.GetDomains)] + [SupportedBy("Chrome")] + public class GetDomainsCommandResponse + { + /// <summary> + /// Gets or sets List of supported domains. + /// </summary> + public Domain[] Domains { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorAction.cs b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorAction.cs new file mode 100644 index 0000000000000000000000000000000000000000..7d699bb681824009867f8fc47c275706d4b149fe --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorAction.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security{ + /// <summary> + /// The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum CertificateErrorAction + { + Continue, + Cancel, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..e6f8d20139f97d108e36921631c034bc4cbeb29f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/CertificateErrorEvent.cs @@ -0,0 +1,25 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally. + /// </summary> + [Event(ProtocolName.Security.CertificateError)] + [SupportedBy("Chrome")] + public class CertificateErrorEvent + { + /// <summary> + /// Gets or sets The ID of the event. + /// </summary> + public long EventId { get; set; } + /// <summary> + /// Gets or sets The type of the error. + /// </summary> + public string ErrorType { get; set; } + /// <summary> + /// Gets or sets The url that was requested. + /// </summary> + public string RequestURL { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Security/DisableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..8cf8dffabd6f06d4eec44c1ec4b72b1a35a884ca --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/DisableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Disables tracking security state changes. + /// </summary> + [Command(ProtocolName.Security.Disable)] + [SupportedBy("Chrome")] + public class DisableCommand: ICommand<DisableCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DisableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Security/DisableCommandResponse.cs similarity index 55% rename from source/ChromeDevTools/Protocol/Chrome/FileSystem/DisableCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Security/DisableCommandResponse.cs index eaa8f257a10992f996668271e729c7ba644c4113..1bdd9b421b1cf16b9198b6bec459a973832e95da 100644 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/DisableCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Security/DisableCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security { /// <summary> - /// Disables events from backend. + /// Disables tracking security state changes. /// </summary> - [CommandResponse(ProtocolName.FileSystem.Disable)] + [CommandResponse(ProtocolName.Security.Disable)] [SupportedBy("Chrome")] public class DisableCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Security/EnableCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..308eaf7e2b99938adb72d59da5abc4c07b01152f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/EnableCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Enables tracking security state changes. + /// </summary> + [Command(ProtocolName.Security.Enable)] + [SupportedBy("Chrome")] + public class EnableCommand: ICommand<EnableCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/FileSystem/EnableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Security/EnableCommandResponse.cs similarity index 55% rename from source/ChromeDevTools/Protocol/Chrome/FileSystem/EnableCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/Security/EnableCommandResponse.cs index 2bcb0ce0089cbee5200e090ceb3037e7b9ac5e23..416324634a64039af811828bd54ec9e885862bd1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/FileSystem/EnableCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Security/EnableCommandResponse.cs @@ -2,12 +2,12 @@ using MasterDevs.ChromeDevTools; using Newtonsoft.Json; using System.Collections.Generic; -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.FileSystem +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security { /// <summary> - /// Enables events from backend. + /// Enables tracking security state changes. /// </summary> - [CommandResponse(ProtocolName.FileSystem.Enable)] + [CommandResponse(ProtocolName.Security.Enable)] [SupportedBy("Chrome")] public class EnableCommandResponse { diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..204335bde267598ae48f46f9405cdba99ab76ee2 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Handles a certificate error that fired a certificateError event. + /// </summary> + [Command(ProtocolName.Security.HandleCertificateError)] + [SupportedBy("Chrome")] + public class HandleCertificateErrorCommand: ICommand<HandleCertificateErrorCommandResponse> + { + /// <summary> + /// Gets or sets The ID of the event. + /// </summary> + public long EventId { get; set; } + /// <summary> + /// Gets or sets The action to take on the certificate error. + /// </summary> + public string Action { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..c89f25685636ec9f6eeb742cb2ced07bfd3282a5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/HandleCertificateErrorCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Handles a certificate error that fired a certificateError event. + /// </summary> + [CommandResponse(ProtocolName.Security.HandleCertificateError)] + [SupportedBy("Chrome")] + public class HandleCertificateErrorCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/InsecureContentStatus.cs b/source/ChromeDevTools/Protocol/Chrome/Security/InsecureContentStatus.cs new file mode 100644 index 0000000000000000000000000000000000000000..99f7a81bf7a9a61ae199a4eca1c15d8b2e5ffdff --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/InsecureContentStatus.cs @@ -0,0 +1,42 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Information about insecure content on the page. + /// </summary> + [SupportedBy("Chrome")] + public class InsecureContentStatus + { + /// <summary> + /// Gets or sets True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts. + /// </summary> + public bool RanMixedContent { get; set; } + /// <summary> + /// Gets or sets True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images. + /// </summary> + public bool DisplayedMixedContent { get; set; } + /// <summary> + /// Gets or sets True if the page was loaded over HTTPS and contained a form targeting an insecure url. + /// </summary> + public bool ContainedMixedForm { get; set; } + /// <summary> + /// Gets or sets True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors. + /// </summary> + public bool RanContentWithCertErrors { get; set; } + /// <summary> + /// Gets or sets True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors. + /// </summary> + public bool DisplayedContentWithCertErrors { get; set; } + /// <summary> + /// Gets or sets Security state representing a page that ran insecure content. + /// </summary> + public SecurityState RanInsecureContentStyle { get; set; } + /// <summary> + /// Gets or sets Security state representing a page that displayed insecure content. + /// </summary> + public SecurityState DisplayedInsecureContentStyle { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/SecurityState.cs b/source/ChromeDevTools/Protocol/Chrome/Security/SecurityState.cs new file mode 100644 index 0000000000000000000000000000000000000000..50c3a003d0b3fbbf3fc75ff41e67268fbc34ca48 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/SecurityState.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security{ + /// <summary> + /// The security level of a page or resource. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum SecurityState + { + Unknown, + Neutral, + Insecure, + Warning, + Secure, + Info, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/SecurityStateChangedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Security/SecurityStateChangedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..607b782d9847ef109b3fb20dee4e15241c7c2594 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/SecurityStateChangedEvent.cs @@ -0,0 +1,34 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// The security state of the page changed. + /// </summary> + [Event(ProtocolName.Security.SecurityStateChanged)] + [SupportedBy("Chrome")] + public class SecurityStateChangedEvent + { + /// <summary> + /// Gets or sets Security state. + /// </summary> + public SecurityState SecurityState { get; set; } + /// <summary> + /// Gets or sets True if the page was loaded over cryptographic transport such as HTTPS. + /// </summary> + public bool SchemeIsCryptographic { get; set; } + /// <summary> + /// Gets or sets List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included. + /// </summary> + public SecurityStateExplanation[] Explanations { get; set; } + /// <summary> + /// Gets or sets Information about insecure content on the page. + /// </summary> + public InsecureContentStatus InsecureContentStatus { get; set; } + /// <summary> + /// Gets or sets Overrides user-visible description of the state. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Summary { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/SecurityStateExplanation.cs b/source/ChromeDevTools/Protocol/Chrome/Security/SecurityStateExplanation.cs new file mode 100644 index 0000000000000000000000000000000000000000..6ca684a0190c71dceee43d604b9dd960bacdbd9c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/SecurityStateExplanation.cs @@ -0,0 +1,30 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// An explanation of an factor contributing to the security state. + /// </summary> + [SupportedBy("Chrome")] + public class SecurityStateExplanation + { + /// <summary> + /// Gets or sets Security state representing the severity of the factor being explained. + /// </summary> + public SecurityState SecurityState { get; set; } + /// <summary> + /// Gets or sets Short phrase describing the type of factor. + /// </summary> + public string Summary { get; set; } + /// <summary> + /// Gets or sets Full text explanation of the factor. + /// </summary> + public string Description { get; set; } + /// <summary> + /// Gets or sets True if the page has a certificate. + /// </summary> + public bool HasCertificate { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..809a72b0608d1141fae02ff7d10fe517cf9d3d2f --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands. + /// </summary> + [Command(ProtocolName.Security.SetOverrideCertificateErrors)] + [SupportedBy("Chrome")] + public class SetOverrideCertificateErrorsCommand: ICommand<SetOverrideCertificateErrorsCommandResponse> + { + /// <summary> + /// Gets or sets If true, certificate errors will be overridden. + /// </summary> + public bool Override { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd90815834148149cde3973123977a19a4128866 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/SetOverrideCertificateErrorsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands. + /// </summary> + [CommandResponse(ProtocolName.Security.SetOverrideCertificateErrors)] + [SupportedBy("Chrome")] + public class SetOverrideCertificateErrorsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/ShowCertificateViewerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Security/ShowCertificateViewerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9ca0f7ee30ad7ee722a9631bb41832a0da78bdab --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/ShowCertificateViewerCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Displays native dialog with the certificate details. + /// </summary> + [Command(ProtocolName.Security.ShowCertificateViewer)] + [SupportedBy("Chrome")] + public class ShowCertificateViewerCommand: ICommand<ShowCertificateViewerCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Security/ShowCertificateViewerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Security/ShowCertificateViewerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0f5b7f40549e4fea9843cef5e3546839abc5b973 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Security/ShowCertificateViewerCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Security +{ + /// <summary> + /// Displays native dialog with the certificate details. + /// </summary> + [CommandResponse(ProtocolName.Security.ShowCertificateViewer)] + [SupportedBy("Chrome")] + public class ShowCertificateViewerCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DebugOnStartUpdatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DebugOnStartUpdatedEvent.cs deleted file mode 100644 index bd1587917decc3beca8860df762ca125d750251d..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DebugOnStartUpdatedEvent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker -{ - [Event(ProtocolName.ServiceWorker.DebugOnStartUpdated)] - [SupportedBy("Chrome")] - public class DebugOnStartUpdatedEvent - { - /// <summary> - /// Gets or sets DebugOnStart - /// </summary> - public bool DebugOnStart { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DeliverPushMessageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DeliverPushMessageCommand.cs index 10bd4a539d3c1776bd9c0899d1e17a6314df5882..d3d68d78fa5a20b0185f444618ee33b475a63666 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DeliverPushMessageCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DeliverPushMessageCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.DeliverPushMessage)] [SupportedBy("Chrome")] - public class DeliverPushMessageCommand + public class DeliverPushMessageCommand: ICommand<DeliverPushMessageCommandResponse> { /// <summary> /// Gets or sets Origin diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DisableCommand.cs index 28617ed8bcc0d4c7bfe511f92e3d89749737bac8..70bee320380c3f5fc2254685c366c0d627551ddd 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DisableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.Disable)] [SupportedBy("Chrome")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchMessageEvent.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchMessageEvent.cs deleted file mode 100644 index 7cf42acfaaff6b6b3b8bc2e47fb7d588ea9ec9a7..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchMessageEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker -{ - [Event(ProtocolName.ServiceWorker.DispatchMessage)] - [SupportedBy("Chrome")] - public class DispatchMessageEvent - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - /// <summary> - /// Gets or sets Message - /// </summary> - public string Message { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchSyncEventCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchSyncEventCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d042e3e852bc102c62b5edad2977aed83830d886 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchSyncEventCommand.cs @@ -0,0 +1,28 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.DispatchSyncEvent)] + [SupportedBy("Chrome")] + public class DispatchSyncEventCommand: ICommand<DispatchSyncEventCommandResponse> + { + /// <summary> + /// Gets or sets Origin + /// </summary> + public string Origin { get; set; } + /// <summary> + /// Gets or sets RegistrationId + /// </summary> + public string RegistrationId { get; set; } + /// <summary> + /// Gets or sets Tag + /// </summary> + public string Tag { get; set; } + /// <summary> + /// Gets or sets LastChance + /// </summary> + public bool LastChance { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SendMessageCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchSyncEventCommandResponse.cs similarity index 63% rename from source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SendMessageCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchSyncEventCommandResponse.cs index cce3efaa862191f170d3ba345993423ee42a7492..483a30436a4a3e8a925bd94ea13540654acfa1d1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SendMessageCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/DispatchSyncEventCommandResponse.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { - [CommandResponse(ProtocolName.ServiceWorker.SendMessage)] + [CommandResponse(ProtocolName.ServiceWorker.DispatchSyncEvent)] [SupportedBy("Chrome")] - public class SendMessageCommandResponse + public class DispatchSyncEventCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/EnableCommand.cs index a9d6087352c81bb7f601aaf736e8963e48acd7a5..a6e8b070f876d3c551c021d0ca83feb2e7084636 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/EnableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.Enable)] [SupportedBy("Chrome")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/InspectWorkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/InspectWorkerCommand.cs index 136dd3496ac67ce5c5dafe5cc4aa5839d3731e23..97860a808f81e83a0c8be2f3d88d6327e2371296 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/InspectWorkerCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/InspectWorkerCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.InspectWorker)] [SupportedBy("Chrome")] - public class InspectWorkerCommand + public class InspectWorkerCommand: ICommand<InspectWorkerCommandResponse> { /// <summary> /// Gets or sets VersionId diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SendMessageCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SendMessageCommand.cs deleted file mode 100644 index 01d49d36c724aa304e00749e9c2a104c2f01a70a..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SendMessageCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker -{ - [Command(ProtocolName.ServiceWorker.SendMessage)] - [SupportedBy("Chrome")] - public class SendMessageCommand - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - /// <summary> - /// Gets or sets Message - /// </summary> - public string Message { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerRegistration.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerRegistration.cs index 2d2df74d9122a1a2ee5cc1f680e48bfbd9a26488..e02410957e17e40f4af72441451cedecc9b1cb3e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerRegistration.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerRegistration.cs @@ -21,7 +21,6 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker /// <summary> /// Gets or sets IsDeleted /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } + public bool IsDeleted { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerVersion.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerVersion.cs index 5e55a249f985bb6b79f6d83e49889d917eaad3aa..a40f2d537b868f56d30e8d7f0449bc9f5579dee1 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerVersion.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/ServiceWorkerVersion.cs @@ -40,5 +40,15 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public double ScriptResponseTime { get; set; } + /// <summary> + /// Gets or sets ControlledClients + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string[] ControlledClients { get; set; } + /// <summary> + /// Gets or sets TargetId + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string TargetId { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetDebugOnStartCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetDebugOnStartCommand.cs deleted file mode 100644 index 337f373b955e9289d35f2db1fc573c427b90aa4c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetDebugOnStartCommand.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker -{ - [Command(ProtocolName.ServiceWorker.SetDebugOnStart)] - [SupportedBy("Chrome")] - public class SetDebugOnStartCommand - { - /// <summary> - /// Gets or sets DebugOnStart - /// </summary> - public bool DebugOnStart { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetForceUpdateOnPageLoadCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetForceUpdateOnPageLoadCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4c3056efb0513899fa1271f5cb40da4c24823a37 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetForceUpdateOnPageLoadCommand.cs @@ -0,0 +1,16 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker +{ + [Command(ProtocolName.ServiceWorker.SetForceUpdateOnPageLoad)] + [SupportedBy("Chrome")] + public class SetForceUpdateOnPageLoadCommand: ICommand<SetForceUpdateOnPageLoadCommandResponse> + { + /// <summary> + /// Gets or sets ForceUpdateOnPageLoad + /// </summary> + public bool ForceUpdateOnPageLoad { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetDebugOnStartCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetForceUpdateOnPageLoadCommandResponse.cs similarity index 60% rename from source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetDebugOnStartCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetForceUpdateOnPageLoadCommandResponse.cs index 4fcc34cc35bdf0ad2197f61df4af5e9d04b5b653..b03940ce144f4b1662cd993b502eb7cf19abd21c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetDebugOnStartCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SetForceUpdateOnPageLoadCommandResponse.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { - [CommandResponse(ProtocolName.ServiceWorker.SetDebugOnStart)] + [CommandResponse(ProtocolName.ServiceWorker.SetForceUpdateOnPageLoad)] [SupportedBy("Chrome")] - public class SetDebugOnStartCommandResponse + public class SetForceUpdateOnPageLoadCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SkipWaitingCommand.cs similarity index 54% rename from source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopCommand.cs rename to source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SkipWaitingCommand.cs index bcbeb85458d7f30c7d9ba4bad4729b9636ddf7a5..12e9430bf1b8bdd2b2db6cf6dcad31663277d53d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SkipWaitingCommand.cs @@ -4,13 +4,13 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { - [Command(ProtocolName.ServiceWorker.Stop)] + [Command(ProtocolName.ServiceWorker.SkipWaiting)] [SupportedBy("Chrome")] - public class StopCommand + public class SkipWaitingCommand: ICommand<SkipWaitingCommandResponse> { /// <summary> - /// Gets or sets WorkerId + /// Gets or sets ScopeURL /// </summary> - public string WorkerId { get; set; } + public string ScopeURL { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SkipWaitingCommandResponse.cs similarity index 65% rename from source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopCommandResponse.cs rename to source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SkipWaitingCommandResponse.cs index c9a27c0cc77916858d103e87a36a1ce3b750c8f9..a69e2a99f48cc0f7d416d3d4be731568f74f37e2 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopCommandResponse.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/SkipWaitingCommandResponse.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { - [CommandResponse(ProtocolName.ServiceWorker.Stop)] + [CommandResponse(ProtocolName.ServiceWorker.SkipWaiting)] [SupportedBy("Chrome")] - public class StopCommandResponse + public class SkipWaitingCommandResponse { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StartWorkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StartWorkerCommand.cs index 6de67a0a0c8e5c41745ced68ba06410a55863ffd..70ddebeeafe39eae70f0957fe9d30f718327201e 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StartWorkerCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StartWorkerCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.StartWorker)] [SupportedBy("Chrome")] - public class StartWorkerCommand + public class StartWorkerCommand: ICommand<StartWorkerCommandResponse> { /// <summary> /// Gets or sets ScopeURL diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopWorkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopWorkerCommand.cs index 95c07ef5249feabc0392ae90e2c9886741833c64..b96299c9a0d85f2be4a3e3b28c47c53dbb27448c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopWorkerCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/StopWorkerCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.StopWorker)] [SupportedBy("Chrome")] - public class StopWorkerCommand + public class StopWorkerCommand: ICommand<StopWorkerCommandResponse> { /// <summary> /// Gets or sets VersionId diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UnregisterCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UnregisterCommand.cs index d9c379cd9b8f038188baf4921de2a24cf1add6f1..c48a4fd65d719b05461b4ddb58c5aa595f9199c6 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UnregisterCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UnregisterCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.Unregister)] [SupportedBy("Chrome")] - public class UnregisterCommand + public class UnregisterCommand: ICommand<UnregisterCommandResponse> { /// <summary> /// Gets or sets ScopeURL diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UpdateRegistrationCommand.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UpdateRegistrationCommand.cs index 45b100564457c45209e9b2788e9672a8d4d19391..14a8fcb306ead5d9f94c24c3ab86195f7bbe18a5 100644 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UpdateRegistrationCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/UpdateRegistrationCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker { [Command(ProtocolName.ServiceWorker.UpdateRegistration)] [SupportedBy("Chrome")] - public class UpdateRegistrationCommand + public class UpdateRegistrationCommand: ICommand<UpdateRegistrationCommandResponse> { /// <summary> /// Gets or sets ScopeURL diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/WorkerCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/WorkerCreatedEvent.cs deleted file mode 100644 index d1395f16dc5b5567680a320413af576146bdcfb4..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/WorkerCreatedEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker -{ - [Event(ProtocolName.ServiceWorker.WorkerCreated)] - [SupportedBy("Chrome")] - public class WorkerCreatedEvent - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - /// <summary> - /// Gets or sets Url - /// </summary> - public string Url { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/WorkerTerminatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/WorkerTerminatedEvent.cs deleted file mode 100644 index 641e6c889c4324dd0116d1319eef7228ed90a9bd..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/ServiceWorker/WorkerTerminatedEvent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ServiceWorker -{ - [Event(ProtocolName.ServiceWorker.WorkerTerminated)] - [SupportedBy("Chrome")] - public class WorkerTerminatedEvent - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Storage/ClearDataForOriginCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Storage/ClearDataForOriginCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d3ff77286e0beb105a6547f7f5f2efb061ed520 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Storage/ClearDataForOriginCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Storage +{ + /// <summary> + /// Clears storage for origin. + /// </summary> + [Command(ProtocolName.Storage.ClearDataForOrigin)] + [SupportedBy("Chrome")] + public class ClearDataForOriginCommand: ICommand<ClearDataForOriginCommandResponse> + { + /// <summary> + /// Gets or sets Security origin. + /// </summary> + public string Origin { get; set; } + /// <summary> + /// Gets or sets Comma separated origin names. + /// </summary> + public string StorageTypes { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Storage/ClearDataForOriginCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Storage/ClearDataForOriginCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..8820401b9c2f53a331ff3234d6c48a4c603e06b5 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Storage/ClearDataForOriginCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Storage +{ + /// <summary> + /// Clears storage for origin. + /// </summary> + [CommandResponse(ProtocolName.Storage.ClearDataForOrigin)] + [SupportedBy("Chrome")] + public class ClearDataForOriginCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Storage/StorageType.cs b/source/ChromeDevTools/Protocol/Chrome/Storage/StorageType.cs new file mode 100644 index 0000000000000000000000000000000000000000..3193656a3dcdeb976c6dd077b654a86676eb61ff --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Storage/StorageType.cs @@ -0,0 +1,25 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.Runtime.Serialization; + + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Storage{ + /// <summary> + /// Enum of possible storage types. + /// </summary> + [JsonConverter(typeof(StringEnumConverter))] + public enum StorageType + { + Appcache, + Cookies, + File_systems, + Indexeddb, + Local_storage, + Shader_cache, + Websql, + Service_workers, + Cache_storage, + All, + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GPUDevice.cs b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GPUDevice.cs new file mode 100644 index 0000000000000000000000000000000000000000..4eb7de814480077278f89e4ae4fc9bd6eddb7275 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GPUDevice.cs @@ -0,0 +1,30 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.SystemInfo +{ + /// <summary> + /// Describes a single graphics processor (GPU). + /// </summary> + [SupportedBy("Chrome")] + public class GPUDevice + { + /// <summary> + /// Gets or sets PCI ID of the GPU vendor, if available; 0 otherwise. + /// </summary> + public double VendorId { get; set; } + /// <summary> + /// Gets or sets PCI ID of the GPU device, if available; 0 otherwise. + /// </summary> + public double DeviceId { get; set; } + /// <summary> + /// Gets or sets String description of the GPU vendor, if the PCI ID is not available. + /// </summary> + public string VendorString { get; set; } + /// <summary> + /// Gets or sets String description of the GPU device, if the PCI ID is not available. + /// </summary> + public string DeviceString { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GPUInfo.cs b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GPUInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..cec7f214c9843aea49caa84527f410a630ae8217 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GPUInfo.cs @@ -0,0 +1,32 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.SystemInfo +{ + /// <summary> + /// Provides information about the GPU(s) on the system. + /// </summary> + [SupportedBy("Chrome")] + public class GPUInfo + { + /// <summary> + /// Gets or sets The graphics devices on the system. Element 0 is the primary GPU. + /// </summary> + public GPUDevice[] Devices { get; set; } + /// <summary> + /// Gets or sets An optional dictionary of additional GPU related attributes. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public object AuxAttributes { get; set; } + /// <summary> + /// Gets or sets An optional dictionary of graphics features and their status. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public object FeatureStatus { get; set; } + /// <summary> + /// Gets or sets An optional array of GPU driver bug workarounds. + /// </summary> + public string[] DriverBugWorkarounds { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommand.cs b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0bbf65436f5767c4135a0abd5dcbef6c1d698f47 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.SystemInfo +{ + /// <summary> + /// Returns information about the system. + /// </summary> + [Command(ProtocolName.SystemInfo.GetInfo)] + [SupportedBy("Chrome")] + public class GetInfoCommand: ICommand<GetInfoCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..f0c22eabb0227ef49f62b9c21248841b6f9cc2a3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/SystemInfo/GetInfoCommandResponse.cs @@ -0,0 +1,31 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.SystemInfo +{ + /// <summary> + /// Returns information about the system. + /// </summary> + [CommandResponse(ProtocolName.SystemInfo.GetInfo)] + [SupportedBy("Chrome")] + public class GetInfoCommandResponse + { + /// <summary> + /// Gets or sets Information about the GPUs on the system. + /// </summary> + public GPUInfo Gpu { get; set; } + /// <summary> + /// Gets or sets A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported. + /// </summary> + public string ModelName { get; set; } + /// <summary> + /// Gets or sets A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported. + /// </summary> + public string ModelVersion { get; set; } + /// <summary> + /// Gets or sets The command line string used to launch the browser. Will be the empty string if not supported. + /// </summary> + public string CommandLine { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/ActivateTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/ActivateTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b64ed8bcdd4cf49904ee984cdb558fa8853ab08 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/ActivateTargetCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Activates (focuses) the target. + /// </summary> + [Command(ProtocolName.Target.ActivateTarget)] + [SupportedBy("Chrome")] + public class ActivateTargetCommand: ICommand<ActivateTargetCommandResponse> + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/ActivateTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/ActivateTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..998f61f0bc800e2402662701c90da8b73dc598b6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/ActivateTargetCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Activates (focuses) the target. + /// </summary> + [CommandResponse(ProtocolName.Target.ActivateTarget)] + [SupportedBy("Chrome")] + public class ActivateTargetCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/AttachToTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/AttachToTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..dee1b73c4fad19746feda3dad3ac42ddc1f4b385 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/AttachToTargetCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Attaches to the target with given id. + /// </summary> + [Command(ProtocolName.Target.AttachToTarget)] + [SupportedBy("Chrome")] + public class AttachToTargetCommand: ICommand<AttachToTargetCommandResponse> + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/AttachToTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/AttachToTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..954dfeb4d0e255e165e99b51af783e9a2260ce55 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/AttachToTargetCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Attaches to the target with given id. + /// </summary> + [CommandResponse(ProtocolName.Target.AttachToTarget)] + [SupportedBy("Chrome")] + public class AttachToTargetCommandResponse + { + /// <summary> + /// Gets or sets Whether attach succeeded. + /// </summary> + public bool Success { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/AttachedToTargetEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Target/AttachedToTargetEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..f8f3bd2f7a8b77fdc9ba82dfa0a76f9a0026fbde --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/AttachedToTargetEvent.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Issued when attached to target because of auto-attach or <code>attachToTarget</code> command. + /// </summary> + [Event(ProtocolName.Target.AttachedToTarget)] + [SupportedBy("Chrome")] + public class AttachedToTargetEvent + { + /// <summary> + /// Gets or sets TargetInfo + /// </summary> + public TargetInfo TargetInfo { get; set; } + /// <summary> + /// Gets or sets WaitingForDebugger + /// </summary> + public bool WaitingForDebugger { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/CloseTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/CloseTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..a12dfbbb998c44c3347939181f60f57a3f674912 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/CloseTargetCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Closes the target. If the target is a page that gets closed too. + /// </summary> + [Command(ProtocolName.Target.CloseTarget)] + [SupportedBy("Chrome")] + public class CloseTargetCommand: ICommand<CloseTargetCommandResponse> + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/CloseTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/CloseTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d6020d19d7142a7939f8870315249cae60537964 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/CloseTargetCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Closes the target. If the target is a page that gets closed too. + /// </summary> + [CommandResponse(ProtocolName.Target.CloseTarget)] + [SupportedBy("Chrome")] + public class CloseTargetCommandResponse + { + /// <summary> + /// Gets or sets Success + /// </summary> + public bool Success { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/CreateBrowserContextCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/CreateBrowserContextCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..c5e80c6a9781af55b3c62207b6be155dea8e8958 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/CreateBrowserContextCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. + /// </summary> + [Command(ProtocolName.Target.CreateBrowserContext)] + [SupportedBy("Chrome")] + public class CreateBrowserContextCommand: ICommand<CreateBrowserContextCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/CreateBrowserContextCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/CreateBrowserContextCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..d3b8d615992d8d0662bdb22707a09be4adc4cf17 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/CreateBrowserContextCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. + /// </summary> + [CommandResponse(ProtocolName.Target.CreateBrowserContext)] + [SupportedBy("Chrome")] + public class CreateBrowserContextCommandResponse + { + /// <summary> + /// Gets or sets The id of the context created. + /// </summary> + public string BrowserContextId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/CreateTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/CreateTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..6fdf50b1a706c96bb6709d62c633905d2f71acf4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/CreateTargetCommand.cs @@ -0,0 +1,34 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Creates a new page. + /// </summary> + [Command(ProtocolName.Target.CreateTarget)] + [SupportedBy("Chrome")] + public class CreateTargetCommand: ICommand<CreateTargetCommandResponse> + { + /// <summary> + /// Gets or sets The initial URL the page will be navigated to. + /// </summary> + public string Url { get; set; } + /// <summary> + /// Gets or sets Frame width in DIP (headless chrome only). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Width { get; set; } + /// <summary> + /// Gets or sets Frame height in DIP (headless chrome only). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public long? Height { get; set; } + /// <summary> + /// Gets or sets The browser context to create the page in (headless chrome only). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string BrowserContextId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/CreateTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/CreateTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0a34bf5504a999364f67aa2fa1069e6f2c2316f7 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/CreateTargetCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Creates a new page. + /// </summary> + [CommandResponse(ProtocolName.Target.CreateTarget)] + [SupportedBy("Chrome")] + public class CreateTargetCommandResponse + { + /// <summary> + /// Gets or sets The id of the page opened. + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/DetachFromTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/DetachFromTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..087e57d954d8bbe44490c7251b48bc9be82911d4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/DetachFromTargetCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Detaches from the target with given id. + /// </summary> + [Command(ProtocolName.Target.DetachFromTarget)] + [SupportedBy("Chrome")] + public class DetachFromTargetCommand: ICommand<DetachFromTargetCommandResponse> + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/DetachFromTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/DetachFromTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0efd4f901de7bc174f3a61fefbe3cba051016075 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/DetachFromTargetCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Detaches from the target with given id. + /// </summary> + [CommandResponse(ProtocolName.Target.DetachFromTarget)] + [SupportedBy("Chrome")] + public class DetachFromTargetCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/DetachedFromTargetEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Target/DetachedFromTargetEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..ceca8bd889b1935ec7320afa9f041de9f8743c24 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/DetachedFromTargetEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Issued when detached from target for any reason (including <code>detachFromTarget</code> command). + /// </summary> + [Event(ProtocolName.Target.DetachedFromTarget)] + [SupportedBy("Chrome")] + public class DetachedFromTargetEvent + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/DisposeBrowserContextCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/DisposeBrowserContextCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..4cea500f681e3314751735ecbf213df3a028e5a0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/DisposeBrowserContextCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Deletes a BrowserContext, will fail of any open page uses it. + /// </summary> + [Command(ProtocolName.Target.DisposeBrowserContext)] + [SupportedBy("Chrome")] + public class DisposeBrowserContextCommand: ICommand<DisposeBrowserContextCommandResponse> + { + /// <summary> + /// Gets or sets BrowserContextId + /// </summary> + public string BrowserContextId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/DisposeBrowserContextCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/DisposeBrowserContextCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..638b2a753e03e71b360a3b1710c007a62652a0d0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/DisposeBrowserContextCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Deletes a BrowserContext, will fail of any open page uses it. + /// </summary> + [CommandResponse(ProtocolName.Target.DisposeBrowserContext)] + [SupportedBy("Chrome")] + public class DisposeBrowserContextCommandResponse + { + /// <summary> + /// Gets or sets Success + /// </summary> + public bool Success { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetInfoCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetInfoCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed6ac59a84a54775655782a4693b51e28904d8b3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetInfoCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Returns information about a target. + /// </summary> + [Command(ProtocolName.Target.GetTargetInfo)] + [SupportedBy("Chrome")] + public class GetTargetInfoCommand: ICommand<GetTargetInfoCommandResponse> + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetInfoCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetInfoCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..9501d12b2944e516306ca321dd0d345ce2c9a27e --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetInfoCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Returns information about a target. + /// </summary> + [CommandResponse(ProtocolName.Target.GetTargetInfo)] + [SupportedBy("Chrome")] + public class GetTargetInfoCommandResponse + { + /// <summary> + /// Gets or sets TargetInfo + /// </summary> + public TargetInfo TargetInfo { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..00b00c1aada90a288255c97ea0af3e15f715465c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetsCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Retrieves a list of available targets. + /// </summary> + [Command(ProtocolName.Target.GetTargets)] + [SupportedBy("Chrome")] + public class GetTargetsCommand: ICommand<GetTargetsCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..815149cf7e6d7353dc787a23f75a82f6dade2c62 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/GetTargetsCommandResponse.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Retrieves a list of available targets. + /// </summary> + [CommandResponse(ProtocolName.Target.GetTargets)] + [SupportedBy("Chrome")] + public class GetTargetsCommandResponse + { + /// <summary> + /// Gets or sets The list of targets. + /// </summary> + public TargetInfo[] TargetInfos { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/ReceivedMessageFromTargetEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Target/ReceivedMessageFromTargetEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..fc71fe5d855b1642424ee4b8587dc88b6511a6ba --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/ReceivedMessageFromTargetEvent.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Notifies about new protocol message from attached target. + /// </summary> + [Event(ProtocolName.Target.ReceivedMessageFromTarget)] + [SupportedBy("Chrome")] + public class ReceivedMessageFromTargetEvent + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + /// <summary> + /// Gets or sets Message + /// </summary> + public string Message { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/RemoteLocation.cs b/source/ChromeDevTools/Protocol/Chrome/Target/RemoteLocation.cs new file mode 100644 index 0000000000000000000000000000000000000000..c33bc2e5a6ae41ce4a1edc12258b16a276d2e3c7 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/RemoteLocation.cs @@ -0,0 +1,22 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// + /// </summary> + [SupportedBy("Chrome")] + public class RemoteLocation + { + /// <summary> + /// Gets or sets Host + /// </summary> + public string Host { get; set; } + /// <summary> + /// Gets or sets Port + /// </summary> + public long Port { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SendMessageToTargetCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SendMessageToTargetCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..036c50747d4613edcb1a4940a0cc6d8a66bd5cbf --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SendMessageToTargetCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Sends protocol message to the target with given id. + /// </summary> + [Command(ProtocolName.Target.SendMessageToTarget)] + [SupportedBy("Chrome")] + public class SendMessageToTargetCommand: ICommand<SendMessageToTargetCommandResponse> + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + /// <summary> + /// Gets or sets Message + /// </summary> + public string Message { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SendMessageToTargetCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SendMessageToTargetCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2e25cd3f7aaa47910372d9d5cf8f554aa47e45a1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SendMessageToTargetCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Sends protocol message to the target with given id. + /// </summary> + [CommandResponse(ProtocolName.Target.SendMessageToTarget)] + [SupportedBy("Chrome")] + public class SendMessageToTargetCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetAttachToFramesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetAttachToFramesCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..1a63593d6cc84dcbcb5d1871af54bf9a19959fd1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetAttachToFramesCommand.cs @@ -0,0 +1,16 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + [Command(ProtocolName.Target.SetAttachToFrames)] + [SupportedBy("Chrome")] + public class SetAttachToFramesCommand: ICommand<SetAttachToFramesCommandResponse> + { + /// <summary> + /// Gets or sets Whether to attach to frames. + /// </summary> + public bool Value { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetAttachToFramesCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetAttachToFramesCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2a3de2257f027bfd022d772c049639b34333a4eb --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetAttachToFramesCommandResponse.cs @@ -0,0 +1,12 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + [CommandResponse(ProtocolName.Target.SetAttachToFrames)] + [SupportedBy("Chrome")] + public class SetAttachToFramesCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetAutoAttachCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetAutoAttachCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..d17ac374a11abf7fcfc7703df35e6cf33749d6e3 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetAutoAttachCommand.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. + /// </summary> + [Command(ProtocolName.Target.SetAutoAttach)] + [SupportedBy("Chrome")] + public class SetAutoAttachCommand: ICommand<SetAutoAttachCommandResponse> + { + /// <summary> + /// Gets or sets Whether to auto-attach to related targets. + /// </summary> + public bool AutoAttach { get; set; } + /// <summary> + /// Gets or sets Whether to pause new targets when attaching to them. Use <code>Runtime.runIfWaitingForDebugger</code> to run paused targets. + /// </summary> + public bool WaitForDebuggerOnStart { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetAutoAttachCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetAutoAttachCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..43d78e9b9d35bf9642605006132cc27792c7243a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetAutoAttachCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. + /// </summary> + [CommandResponse(ProtocolName.Target.SetAutoAttach)] + [SupportedBy("Chrome")] + public class SetAutoAttachCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetDiscoverTargetsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetDiscoverTargetsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..ff6f875ba8f9522b9e08e3d825b47001d7dcba3c --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetDiscoverTargetsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Controls whether to discover available targets and notify via <code>targetCreated/targetDestroyed</code> events. + /// </summary> + [Command(ProtocolName.Target.SetDiscoverTargets)] + [SupportedBy("Chrome")] + public class SetDiscoverTargetsCommand: ICommand<SetDiscoverTargetsCommandResponse> + { + /// <summary> + /// Gets or sets Whether to discover available targets. + /// </summary> + public bool Discover { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetDiscoverTargetsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetDiscoverTargetsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..3f1315c18c38980598edb0c37d34cf91cd7aa86a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetDiscoverTargetsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Controls whether to discover available targets and notify via <code>targetCreated/targetDestroyed</code> events. + /// </summary> + [CommandResponse(ProtocolName.Target.SetDiscoverTargets)] + [SupportedBy("Chrome")] + public class SetDiscoverTargetsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetRemoteLocationsCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetRemoteLocationsCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..db9e29f2ecb47f2ec30ddd4d5d29874285837cf1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetRemoteLocationsCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Enables target discovery for the specified locations, when <code>setDiscoverTargets</code> was set to <code>true</code>. + /// </summary> + [Command(ProtocolName.Target.SetRemoteLocations)] + [SupportedBy("Chrome")] + public class SetRemoteLocationsCommand: ICommand<SetRemoteLocationsCommandResponse> + { + /// <summary> + /// Gets or sets List of remote locations. + /// </summary> + public RemoteLocation[] Locations { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/SetRemoteLocationsCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Target/SetRemoteLocationsCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..0d5052de2e86da27fe68161002a28b0cb9fc776e --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/SetRemoteLocationsCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Enables target discovery for the specified locations, when <code>setDiscoverTargets</code> was set to <code>true</code>. + /// </summary> + [CommandResponse(ProtocolName.Target.SetRemoteLocations)] + [SupportedBy("Chrome")] + public class SetRemoteLocationsCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/TargetCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Target/TargetCreatedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..29084c42eb15296581e47d5d8453792fa709fad4 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/TargetCreatedEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Issued when a possible inspection target is created. + /// </summary> + [Event(ProtocolName.Target.TargetCreated)] + [SupportedBy("Chrome")] + public class TargetCreatedEvent + { + /// <summary> + /// Gets or sets TargetInfo + /// </summary> + public TargetInfo TargetInfo { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/TargetDestroyedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Target/TargetDestroyedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..da09f06e71f54fce8444f8cd721bcd7b68f9fcdb --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/TargetDestroyedEvent.cs @@ -0,0 +1,17 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// Issued when a target is destroyed. + /// </summary> + [Event(ProtocolName.Target.TargetDestroyed)] + [SupportedBy("Chrome")] + public class TargetDestroyedEvent + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Target/TargetInfo.cs b/source/ChromeDevTools/Protocol/Chrome/Target/TargetInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..1a167d5e0fd116319f3d00f56f2eebdc3831a998 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Target/TargetInfo.cs @@ -0,0 +1,30 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Target +{ + /// <summary> + /// + /// </summary> + [SupportedBy("Chrome")] + public class TargetInfo + { + /// <summary> + /// Gets or sets TargetId + /// </summary> + public string TargetId { get; set; } + /// <summary> + /// Gets or sets Type + /// </summary> + public string Type { get; set; } + /// <summary> + /// Gets or sets Title + /// </summary> + public string Title { get; set; } + /// <summary> + /// Gets or sets Url + /// </summary> + public string Url { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tethering/AcceptedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Tethering/AcceptedEvent.cs new file mode 100644 index 0000000000000000000000000000000000000000..41b9f8a053ed014f1b9817ad1e4a38972ae984d0 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tethering/AcceptedEvent.cs @@ -0,0 +1,21 @@ +using MasterDevs.ChromeDevTools;using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tethering +{ + /// <summary> + /// Informs that port was successfully bound and got a specified connection id. + /// </summary> + [Event(ProtocolName.Tethering.Accepted)] + [SupportedBy("Chrome")] + public class AcceptedEvent + { + /// <summary> + /// Gets or sets Port number that was successfully bound. + /// </summary> + public long Port { get; set; } + /// <summary> + /// Gets or sets Connection id to be used. + /// </summary> + public string ConnectionId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tethering/BindCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Tethering/BindCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..094412bdbf74f52768ff54c5da9026faca3f77e1 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tethering/BindCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tethering +{ + /// <summary> + /// Request browser port binding. + /// </summary> + [Command(ProtocolName.Tethering.Bind)] + [SupportedBy("Chrome")] + public class BindCommand: ICommand<BindCommandResponse> + { + /// <summary> + /// Gets or sets Port number to bind. + /// </summary> + public long Port { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tethering/BindCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Tethering/BindCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..7fd279ce72ba6c62b98185069599c0e1f1502376 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tethering/BindCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tethering +{ + /// <summary> + /// Request browser port binding. + /// </summary> + [CommandResponse(ProtocolName.Tethering.Bind)] + [SupportedBy("Chrome")] + public class BindCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tethering/UnbindCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Tethering/UnbindCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..79c2ef446b16f4f5c8373c5c6d8fd0a7dbac6a20 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tethering/UnbindCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tethering +{ + /// <summary> + /// Request browser port unbinding. + /// </summary> + [Command(ProtocolName.Tethering.Unbind)] + [SupportedBy("Chrome")] + public class UnbindCommand: ICommand<UnbindCommandResponse> + { + /// <summary> + /// Gets or sets Port number to unbind. + /// </summary> + public long Port { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tethering/UnbindCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Tethering/UnbindCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..2040cf3ddd40b7585203d3c8d0c693c5dccded63 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tethering/UnbindCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tethering +{ + /// <summary> + /// Request browser port unbinding. + /// </summary> + [CommandResponse(ProtocolName.Tethering.Unbind)] + [SupportedBy("Chrome")] + public class UnbindCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/EnableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Timeline/EnableCommandResponse.cs deleted file mode 100644 index 469256d584e3e9f2ae05546ef209f45f73c8a152..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/EnableCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline -{ - /// <summary> - /// Deprecated. - /// </summary> - [CommandResponse(ProtocolName.Timeline.Enable)] - [SupportedBy("Chrome")] - public class EnableCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/EventRecordedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Timeline/EventRecordedEvent.cs deleted file mode 100644 index ec6936c5cb20607a6bbd3890d9411a1a280f72cd..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/EventRecordedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline -{ - /// <summary> - /// Deprecated. - /// </summary> - [Event(ProtocolName.Timeline.EventRecorded)] - [SupportedBy("Chrome")] - public class EventRecordedEvent - { - /// <summary> - /// Gets or sets Timeline event record data. - /// </summary> - public TimelineEvent Record { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/StartCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Timeline/StartCommand.cs deleted file mode 100644 index 888b9a9d9ddc9c855c3f401fc6cb9b475a8028bd..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/StartCommand.cs +++ /dev/null @@ -1,40 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline -{ - /// <summary> - /// Deprecated. - /// </summary> - [Command(ProtocolName.Timeline.Start)] - [SupportedBy("Chrome")] - public class StartCommand - { - /// <summary> - /// Gets or sets Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public long? MaxCallStackDepth { get; set; } - /// <summary> - /// Gets or sets Whether instrumentation events should be buffered and returned upon <code>stop</code> call. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? BufferEvents { get; set; } - /// <summary> - /// Gets or sets Coma separated event types to issue although bufferEvents is set. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string LiveEvents { get; set; } - /// <summary> - /// Gets or sets Whether counters data should be included into timeline events. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeCounters { get; set; } - /// <summary> - /// Gets or sets Whether events from GPU process should be collected. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public bool? IncludeGPUEvents { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/StartCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Timeline/StartCommandResponse.cs deleted file mode 100644 index 36c89979a520eba507c14530dac4b045804e5d9e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/StartCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline -{ - /// <summary> - /// Deprecated. - /// </summary> - [CommandResponse(ProtocolName.Timeline.Start)] - [SupportedBy("Chrome")] - public class StartCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/StopCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Timeline/StopCommand.cs deleted file mode 100644 index 89779b9529730e11351783212901e8650c1a27d6..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/StopCommand.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline -{ - /// <summary> - /// Deprecated. - /// </summary> - [Command(ProtocolName.Timeline.Stop)] - [SupportedBy("Chrome")] - public class StopCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/StopCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Timeline/StopCommandResponse.cs deleted file mode 100644 index 1de900f31c6a0a8a0becae44ece519db3aa0444e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/StopCommandResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline -{ - /// <summary> - /// Deprecated. - /// </summary> - [CommandResponse(ProtocolName.Timeline.Stop)] - [SupportedBy("Chrome")] - public class StopCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Timeline/TimelineEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Timeline/TimelineEvent.cs deleted file mode 100644 index e1118e1711411e5b2d98b431a24f20d5723b72bf..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Timeline/TimelineEvent.cs +++ /dev/null @@ -1,51 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Timeline -{ - /// <summary> - /// Timeline record contains information about the recorded activity. - /// </summary> - [SupportedBy("Chrome")] - public class TimelineEvent - { - /// <summary> - /// Gets or sets Event type. - /// </summary> - public string Type { get; set; } - /// <summary> - /// Gets or sets Event data. - /// </summary> - public object Data { get; set; } - /// <summary> - /// Gets or sets Start time. - /// </summary> - public double StartTime { get; set; } - /// <summary> - /// Gets or sets End time. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public double EndTime { get; set; } - /// <summary> - /// Gets or sets Nested records. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public TimelineEvent[] Children { get; set; } - /// <summary> - /// Gets or sets If present, identifies the thread that produced the event. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string Thread { get; set; } - /// <summary> - /// Gets or sets Stack trace. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public Console.CallFrame[] StackTrace { get; set; } - /// <summary> - /// Gets or sets Unique identifier of the frame within the page that the event relates to. - /// </summary> - [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public string FrameId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/EndCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/EndCommand.cs index 83be0ee2ef7ad735a736e7f507b1d2e124005b69..330c5fe8b6a43f44298ef3248e44bcfd693ae68c 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Tracing/EndCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/EndCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing /// </summary> [Command(ProtocolName.Tracing.End)] [SupportedBy("Chrome")] - public class EndCommand + public class EndCommand: ICommand<EndCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/GetCategoriesCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/GetCategoriesCommand.cs index e1b65d8d395f02f1baec1c8607209001bc295587..e2bcaabb85beba50d3a1d4e0f038c924463bbef4 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Tracing/GetCategoriesCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/GetCategoriesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing /// </summary> [Command(ProtocolName.Tracing.GetCategories)] [SupportedBy("Chrome")] - public class GetCategoriesCommand + public class GetCategoriesCommand: ICommand<GetCategoriesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/MemoryDumpConfig.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/MemoryDumpConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..4588bda003bad96245d2347abb7ed22fa9a864e9 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/MemoryDumpConfig.cs @@ -0,0 +1,14 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing +{ + /// <summary> + /// Configuration for memory dump. Used only when "memory-infra" category is enabled. + /// </summary> + [SupportedBy("Chrome")] + public class MemoryDumpConfig + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/RecordClockSyncMarkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/RecordClockSyncMarkerCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..35d8d3b54527e0c5d696d48e6f13a964e7394a73 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/RecordClockSyncMarkerCommand.cs @@ -0,0 +1,19 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing +{ + /// <summary> + /// Record a clock sync marker in the trace. + /// </summary> + [Command(ProtocolName.Tracing.RecordClockSyncMarker)] + [SupportedBy("Chrome")] + public class RecordClockSyncMarkerCommand: ICommand<RecordClockSyncMarkerCommandResponse> + { + /// <summary> + /// Gets or sets The ID of this clock sync marker + /// </summary> + public string SyncId { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/RecordClockSyncMarkerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/RecordClockSyncMarkerCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..24b34e28d1ee3e914522f84f996b2e4963456bb6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/RecordClockSyncMarkerCommandResponse.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing +{ + /// <summary> + /// Record a clock sync marker in the trace. + /// </summary> + [CommandResponse(ProtocolName.Tracing.RecordClockSyncMarker)] + [SupportedBy("Chrome")] + public class RecordClockSyncMarkerCommandResponse + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/RequestMemoryDumpCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/RequestMemoryDumpCommand.cs new file mode 100644 index 0000000000000000000000000000000000000000..9f78a43e42a8e51439d7d2eb68405139eb53b13a --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/RequestMemoryDumpCommand.cs @@ -0,0 +1,15 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing +{ + /// <summary> + /// Request a global memory dump. + /// </summary> + [Command(ProtocolName.Tracing.RequestMemoryDump)] + [SupportedBy("Chrome")] + public class RequestMemoryDumpCommand: ICommand<RequestMemoryDumpCommandResponse> + { + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/RequestMemoryDumpCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/RequestMemoryDumpCommandResponse.cs new file mode 100644 index 0000000000000000000000000000000000000000..5bdb135844ea7fae2c86a494fe8de4c6776e6b58 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/RequestMemoryDumpCommandResponse.cs @@ -0,0 +1,23 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing +{ + /// <summary> + /// Request a global memory dump. + /// </summary> + [CommandResponse(ProtocolName.Tracing.RequestMemoryDump)] + [SupportedBy("Chrome")] + public class RequestMemoryDumpCommandResponse + { + /// <summary> + /// Gets or sets GUID of the resulting global memory dump. + /// </summary> + public string DumpGuid { get; set; } + /// <summary> + /// Gets or sets True iff the global memory dump succeeded. + /// </summary> + public bool Success { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/StartCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/StartCommand.cs index ff570e9bc04805811331e1d2a88ea12d70974a88..8280732eb0b572ca69a2c6f491c741c10706988d 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Tracing/StartCommand.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/StartCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing /// </summary> [Command(ProtocolName.Tracing.Start)] [SupportedBy("Chrome")] - public class StartCommand + public class StartCommand: ICommand<StartCommandResponse> { /// <summary> /// Gets or sets Category/tag filter @@ -26,5 +26,15 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public double BufferUsageReportingInterval { get; set; } + /// <summary> + /// Gets or sets Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to <code>ReportEvents</code>). + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string TransferMode { get; set; } + /// <summary> + /// Gets or sets + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public TraceConfig TraceConfig { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/TraceConfig.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/TraceConfig.cs new file mode 100644 index 0000000000000000000000000000000000000000..64f74d3b5bae8b81785fa3353bf8b3a243a5bb89 --- /dev/null +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/TraceConfig.cs @@ -0,0 +1,54 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing +{ + /// <summary> + /// + /// </summary> + [SupportedBy("Chrome")] + public class TraceConfig + { + /// <summary> + /// Gets or sets Controls how the trace buffer stores data. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string RecordMode { get; set; } + /// <summary> + /// Gets or sets Turns on JavaScript stack sampling. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableSampling { get; set; } + /// <summary> + /// Gets or sets Turns on system tracing. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableSystrace { get; set; } + /// <summary> + /// Gets or sets Turns on argument filter. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public bool? EnableArgumentFilter { get; set; } + /// <summary> + /// Gets or sets Included category filters. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string[] IncludedCategories { get; set; } + /// <summary> + /// Gets or sets Excluded category filters. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string[] ExcludedCategories { get; set; } + /// <summary> + /// Gets or sets Configuration to synthesize the delays in tracing. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string[] SyntheticDelays { get; set; } + /// <summary> + /// Gets or sets Configuration for memory dump triggers. Used only when "memory-infra" category is enabled. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public MemoryDumpConfig MemoryDumpConfig { get; set; } + } +} diff --git a/source/ChromeDevTools/Protocol/Chrome/Tracing/TracingCompleteEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Tracing/TracingCompleteEvent.cs index eddff6a9cacbc67ee08faa85b755b64ec7865689..ddf0a7d6868c3572fb4fda166144ead1231b6908 100644 --- a/source/ChromeDevTools/Protocol/Chrome/Tracing/TracingCompleteEvent.cs +++ b/source/ChromeDevTools/Protocol/Chrome/Tracing/TracingCompleteEvent.cs @@ -9,5 +9,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Tracing [SupportedBy("Chrome")] public class TracingCompleteEvent { + /// <summary> + /// Gets or sets A handle of the stream that holds resulting trace data. + /// </summary> + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public string Stream { get; set; } } } diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/ConnectToWorkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/ConnectToWorkerCommand.cs deleted file mode 100644 index 751f512cb31de5fbc454919763e2e117f8b56384..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/ConnectToWorkerCommand.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Command(ProtocolName.Worker.ConnectToWorker)] - [SupportedBy("Chrome")] - public class ConnectToWorkerCommand - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/ConnectToWorkerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/ConnectToWorkerCommandResponse.cs deleted file mode 100644 index d784cd9ad8c5a0f5f8372c697ca3d41dfea0db56..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/ConnectToWorkerCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [CommandResponse(ProtocolName.Worker.ConnectToWorker)] - [SupportedBy("Chrome")] - public class ConnectToWorkerCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/DisableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/DisableCommand.cs deleted file mode 100644 index 90763365eae82393a07b0f84abed43659f858128..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/DisableCommand.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Command(ProtocolName.Worker.Disable)] - [SupportedBy("Chrome")] - public class DisableCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/DisableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/DisableCommandResponse.cs deleted file mode 100644 index 3051bc57892504930853f1aca7bca1ecc104665c..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/DisableCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [CommandResponse(ProtocolName.Worker.Disable)] - [SupportedBy("Chrome")] - public class DisableCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/DisconnectFromWorkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/DisconnectFromWorkerCommand.cs deleted file mode 100644 index 3f4f6a520be3fe75d647965e564dd548150590db..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/DisconnectFromWorkerCommand.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Command(ProtocolName.Worker.DisconnectFromWorker)] - [SupportedBy("Chrome")] - public class DisconnectFromWorkerCommand - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/DisconnectFromWorkerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/DisconnectFromWorkerCommandResponse.cs deleted file mode 100644 index d4a104af21bedfd4dcfb8fe2212c0e909a438a77..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/DisconnectFromWorkerCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [CommandResponse(ProtocolName.Worker.DisconnectFromWorker)] - [SupportedBy("Chrome")] - public class DisconnectFromWorkerCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/DispatchMessageFromWorkerEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/DispatchMessageFromWorkerEvent.cs deleted file mode 100644 index 441d9bada7ad18b22d92e2fadd78fc6dd7ed57b8..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/DispatchMessageFromWorkerEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Event(ProtocolName.Worker.DispatchMessageFromWorker)] - [SupportedBy("Chrome")] - public class DispatchMessageFromWorkerEvent - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - /// <summary> - /// Gets or sets Message - /// </summary> - public string Message { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/EnableCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/EnableCommand.cs deleted file mode 100644 index fe0942350cb102adfcf10c6772797998b00c4ce9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/EnableCommand.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Command(ProtocolName.Worker.Enable)] - [SupportedBy("Chrome")] - public class EnableCommand - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/EnableCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/EnableCommandResponse.cs deleted file mode 100644 index 0c6de343b1d81372d0f2fa16d81c6ad9b823b081..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/EnableCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [CommandResponse(ProtocolName.Worker.Enable)] - [SupportedBy("Chrome")] - public class EnableCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/SendMessageToWorkerCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/SendMessageToWorkerCommand.cs deleted file mode 100644 index 29076305b94e880fe1e4200e7f421d941fe0a54e..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/SendMessageToWorkerCommand.cs +++ /dev/null @@ -1,20 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Command(ProtocolName.Worker.SendMessageToWorker)] - [SupportedBy("Chrome")] - public class SendMessageToWorkerCommand - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - /// <summary> - /// Gets or sets Message - /// </summary> - public string Message { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/SendMessageToWorkerCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/SendMessageToWorkerCommandResponse.cs deleted file mode 100644 index aa5a44d7426dfc690093afc04f8d9a1c299c56d9..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/SendMessageToWorkerCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [CommandResponse(ProtocolName.Worker.SendMessageToWorker)] - [SupportedBy("Chrome")] - public class SendMessageToWorkerCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/SetAutoconnectToWorkersCommand.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/SetAutoconnectToWorkersCommand.cs deleted file mode 100644 index 9a0014cf7c742a986e30728907ea2b23eaeb3c71..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/SetAutoconnectToWorkersCommand.cs +++ /dev/null @@ -1,16 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Command(ProtocolName.Worker.SetAutoconnectToWorkers)] - [SupportedBy("Chrome")] - public class SetAutoconnectToWorkersCommand - { - /// <summary> - /// Gets or sets Value - /// </summary> - public bool Value { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/SetAutoconnectToWorkersCommandResponse.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/SetAutoconnectToWorkersCommandResponse.cs deleted file mode 100644 index 35f9dcd99e9dcc255ab642e9c0cd5d48607e9181..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/SetAutoconnectToWorkersCommandResponse.cs +++ /dev/null @@ -1,12 +0,0 @@ -using MasterDevs.ChromeDevTools; -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [CommandResponse(ProtocolName.Worker.SetAutoconnectToWorkers)] - [SupportedBy("Chrome")] - public class SetAutoconnectToWorkersCommandResponse - { - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/WorkerCreatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/WorkerCreatedEvent.cs deleted file mode 100644 index 54811edab30d23e4584b5953f74929710ca0b07f..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/WorkerCreatedEvent.cs +++ /dev/null @@ -1,22 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Event(ProtocolName.Worker.WorkerCreated)] - [SupportedBy("Chrome")] - public class WorkerCreatedEvent - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - /// <summary> - /// Gets or sets Url - /// </summary> - public string Url { get; set; } - /// <summary> - /// Gets or sets InspectorConnected - /// </summary> - public bool InspectorConnected { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/Chrome/Worker/WorkerTerminatedEvent.cs b/source/ChromeDevTools/Protocol/Chrome/Worker/WorkerTerminatedEvent.cs deleted file mode 100644 index 9f94c83bf60ddcb41ffefd17557f896b8b8bb2ff..0000000000000000000000000000000000000000 --- a/source/ChromeDevTools/Protocol/Chrome/Worker/WorkerTerminatedEvent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MasterDevs.ChromeDevTools;using Newtonsoft.Json; - -namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Worker -{ - [Event(ProtocolName.Worker.WorkerTerminated)] - [SupportedBy("Chrome")] - public class WorkerTerminatedEvent - { - /// <summary> - /// Gets or sets WorkerId - /// </summary> - public string WorkerId { get; set; } - } -} diff --git a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/EnableCommand.cs index 6be51f5f6e387f169ffa65adc2db3b2705a86c05..44b7633af09ce19da9df7967c74b081ad9def393 100644 --- a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetApplicationCacheForFrameCommand.cs b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetApplicationCacheForFrameCommand.cs index 02aefa116e6a7dab96d21f9078952599c0cfe6dd..a1ab344c0fc17e23bf563ea287cda29da618367f 100644 --- a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetApplicationCacheForFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetApplicationCacheForFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.GetApplicationCacheForFrame)] [SupportedBy("iOS")] - public class GetApplicationCacheForFrameCommand + public class GetApplicationCacheForFrameCommand: ICommand<GetApplicationCacheForFrameCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame containing document whose application cache is retrieved. diff --git a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetFramesWithManifestsCommand.cs b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetFramesWithManifestsCommand.cs index b353e1583400bc2fa395aeee97cb943608db9023..91f349ba1cc6c7d555b832741b05dcfe0dc812b5 100644 --- a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetFramesWithManifestsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetFramesWithManifestsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.GetFramesWithManifests)] [SupportedBy("iOS")] - public class GetFramesWithManifestsCommand + public class GetFramesWithManifestsCommand: ICommand<GetFramesWithManifestsCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetManifestForFrameCommand.cs b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetManifestForFrameCommand.cs index b6149303d6698ad4330a55574bf174d49cbf52a3..cc8f22241d8cf98cd5242a375cad179404a30baa 100644 --- a/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetManifestForFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/ApplicationCache/GetManifestForFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.ApplicationCache /// </summary> [Command(ProtocolName.ApplicationCache.GetManifestForFrame)] [SupportedBy("iOS")] - public class GetManifestForFrameCommand + public class GetManifestForFrameCommand: ICommand<GetManifestForFrameCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame containing document whose manifest is retrieved. diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/AddRuleCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/AddRuleCommand.cs index c53bd832158acba217f2f0076c6e96c97163b8e1..baeb145681d629165c19925bcb89e8dcf256009c 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/AddRuleCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/AddRuleCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.AddRule)] [SupportedBy("iOS")] - public class AddRuleCommand + public class AddRuleCommand: ICommand<AddRuleCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/CreateStyleSheetCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/CreateStyleSheetCommand.cs index 89422ed73d9aab71309008f772c6d11afda1ed56..794b0055342c961596c4fb6ce5c75f96dfeb46dd 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/CreateStyleSheetCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/CreateStyleSheetCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.CreateStyleSheet)] [SupportedBy("iOS")] - public class CreateStyleSheetCommand + public class CreateStyleSheetCommand: ICommand<CreateStyleSheetCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame where the new "inspector" stylesheet should be created. diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/DisableCommand.cs index 1df505f73cd495739dad6e48d8afe6922d4aa6f1..b1a884ddd048415e2da1d162c150f6be07d98a33 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/EnableCommand.cs index 3ff0295b58ccba5a9d5887019bf822ca3e0a7d66..06b97c0540bdf031ecac06449f447a992fb922aa 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/ForcePseudoStateCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/ForcePseudoStateCommand.cs index c2aaf5d9053ae42c303e7e3576ebf451998d969e..54cc23d5c9957fcfca21f02b2fdbe8239c8d1d43 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/ForcePseudoStateCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/ForcePseudoStateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.ForcePseudoState)] [SupportedBy("iOS")] - public class ForcePseudoStateCommand + public class ForcePseudoStateCommand: ICommand<ForcePseudoStateCommandResponse> { /// <summary> /// Gets or sets The element id for which to force the pseudo state. diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetAllStyleSheetsCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetAllStyleSheetsCommand.cs index 3b790daf81b7fed9f3baf6f43aa2c7cb926366f3..d63598dfc623d4803d4db62c4492c481120a8270 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetAllStyleSheetsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetAllStyleSheetsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetAllStyleSheets)] [SupportedBy("iOS")] - public class GetAllStyleSheetsCommand + public class GetAllStyleSheetsCommand: ICommand<GetAllStyleSheetsCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetComputedStyleForNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetComputedStyleForNodeCommand.cs index cd2933936d4c512bf2b3d26e2fa7f6fc41b8bfdd..4058868dc91ea8b224bca28620f177b8888a7715 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetComputedStyleForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetComputedStyleForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetComputedStyleForNode)] [SupportedBy("iOS")] - public class GetComputedStyleForNodeCommand + public class GetComputedStyleForNodeCommand: ICommand<GetComputedStyleForNodeCommandResponse> { /// <summary> /// Gets or sets NodeId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetInlineStylesForNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetInlineStylesForNodeCommand.cs index ac19b7232d548f6c4fe23f9d062e495dd13e5a92..3ec503b091d43569d6cf9a605ef1e83ff3464969 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetInlineStylesForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetInlineStylesForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetInlineStylesForNode)] [SupportedBy("iOS")] - public class GetInlineStylesForNodeCommand + public class GetInlineStylesForNodeCommand: ICommand<GetInlineStylesForNodeCommandResponse> { /// <summary> /// Gets or sets NodeId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetMatchedStylesForNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetMatchedStylesForNodeCommand.cs index b2734bd3d96f0cfb73667061ad4c510bd674e9bf..9746864d1ec2503ec8b621827703257d21bef5e4 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetMatchedStylesForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetMatchedStylesForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetMatchedStylesForNode)] [SupportedBy("iOS")] - public class GetMatchedStylesForNodeCommand + public class GetMatchedStylesForNodeCommand: ICommand<GetMatchedStylesForNodeCommandResponse> { /// <summary> /// Gets or sets NodeId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetNamedFlowCollectionCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetNamedFlowCollectionCommand.cs index 0eeb004bd6921e7ca84a5a5190a4b129cfbd3969..91ee886d1e385109d10baceb91650db318b47be5 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetNamedFlowCollectionCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetNamedFlowCollectionCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetNamedFlowCollection)] [SupportedBy("iOS")] - public class GetNamedFlowCollectionCommand + public class GetNamedFlowCollectionCommand: ICommand<GetNamedFlowCollectionCommandResponse> { /// <summary> /// Gets or sets The document node id for which to get the Named Flow Collection. diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetCommand.cs index 6b251d1fd78b59f878f2a2057c16f71d96593871..a0551506bf0d6249f8430193c351c9cc40a327a2 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetStyleSheet)] [SupportedBy("iOS")] - public class GetStyleSheetCommand + public class GetStyleSheetCommand: ICommand<GetStyleSheetCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetTextCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetTextCommand.cs index 5b682e8aa1a4996bf7d98e6c1e0dfde90a4981eb..6f5ec6bdfd866040d51631347614b087cf3b8fae 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetTextCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetStyleSheetTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetStyleSheetText)] [SupportedBy("iOS")] - public class GetStyleSheetTextCommand + public class GetStyleSheetTextCommand: ICommand<GetStyleSheetTextCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedCSSPropertiesCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedCSSPropertiesCommand.cs index c4222c70d4d23d8f3ac90a0730fffe73882398d9..01d71edf49a87e03dfe59658c8655974b35993e4 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedCSSPropertiesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedCSSPropertiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetSupportedCSSProperties)] [SupportedBy("iOS")] - public class GetSupportedCSSPropertiesCommand + public class GetSupportedCSSPropertiesCommand: ICommand<GetSupportedCSSPropertiesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedSystemFontFamilyNamesCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedSystemFontFamilyNamesCommand.cs index 2815739fc77a156984c0d0083f368f959f57bda8..4aa2467ca72457a336778705143ee5d309027005 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedSystemFontFamilyNamesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/GetSupportedSystemFontFamilyNamesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.GetSupportedSystemFontFamilyNames)] [SupportedBy("iOS")] - public class GetSupportedSystemFontFamilyNamesCommand + public class GetSupportedSystemFontFamilyNamesCommand: ICommand<GetSupportedSystemFontFamilyNamesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/SetRuleSelectorCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/SetRuleSelectorCommand.cs index daea511da866432cad10dcdd2c211c8893b87eac..8b6de45fe1a938ac616794599505225ad14749a0 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/SetRuleSelectorCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/SetRuleSelectorCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.SetRuleSelector)] [SupportedBy("iOS")] - public class SetRuleSelectorCommand + public class SetRuleSelectorCommand: ICommand<SetRuleSelectorCommandResponse> { /// <summary> /// Gets or sets RuleId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleSheetTextCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleSheetTextCommand.cs index 0427a9d9d4a510ab4c94d6853f1bbe486ce6ec41..a87ab40f0a993d18319fc3754513102f034710bd 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleSheetTextCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleSheetTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.SetStyleSheetText)] [SupportedBy("iOS")] - public class SetStyleSheetTextCommand + public class SetStyleSheetTextCommand: ICommand<SetStyleSheetTextCommandResponse> { /// <summary> /// Gets or sets StyleSheetId diff --git a/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleTextCommand.cs b/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleTextCommand.cs index 98458939dd013a4152c161b223eaa597519a8183..1af16b0db8cd742e3a2ca394618eb0995a7792c6 100644 --- a/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleTextCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/CSS/SetStyleTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.CSS /// </summary> [Command(ProtocolName.CSS.SetStyleText)] [SupportedBy("iOS")] - public class SetStyleTextCommand + public class SetStyleTextCommand: ICommand<SetStyleTextCommandResponse> { /// <summary> /// Gets or sets StyleId diff --git a/source/ChromeDevTools/Protocol/iOS/Console/AddInspectedNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/Console/AddInspectedNodeCommand.cs index 1570a9b77c7a727750ca04a695202a68275ddfc1..722e5e353d9ac03668b428766b5d4cd4dfc6d55c 100644 --- a/source/ChromeDevTools/Protocol/iOS/Console/AddInspectedNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Console/AddInspectedNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Console /// </summary> [Command(ProtocolName.Console.AddInspectedNode)] [SupportedBy("iOS")] - public class AddInspectedNodeCommand + public class AddInspectedNodeCommand: ICommand<AddInspectedNodeCommandResponse> { /// <summary> /// Gets or sets DOM node id to be accessible by means of $0 command line API. diff --git a/source/ChromeDevTools/Protocol/iOS/Console/ClearMessagesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Console/ClearMessagesCommand.cs index c09e125860cfbba89cedb7076083c6f5579eadcf..f2429393e2f4104c50af2c13e42a4bd841faf370 100644 --- a/source/ChromeDevTools/Protocol/iOS/Console/ClearMessagesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Console/ClearMessagesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Console /// </summary> [Command(ProtocolName.Console.ClearMessages)] [SupportedBy("iOS")] - public class ClearMessagesCommand + public class ClearMessagesCommand: ICommand<ClearMessagesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Console/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Console/DisableCommand.cs index 03c9476ab403cdda40afc0ba44353181b688c3b4..c0de9bea113263023696c0ad0a8cc517e7dba16e 100644 --- a/source/ChromeDevTools/Protocol/iOS/Console/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Console/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Console /// </summary> [Command(ProtocolName.Console.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Console/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Console/EnableCommand.cs index 9029301c20466f34f589846ac27061e9362fc357..a51e2f73abeccc99250aba7da6f199bed89ffa71 100644 --- a/source/ChromeDevTools/Protocol/iOS/Console/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Console/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Console /// </summary> [Command(ProtocolName.Console.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Console/SetMonitoringXHREnabledCommand.cs b/source/ChromeDevTools/Protocol/iOS/Console/SetMonitoringXHREnabledCommand.cs index 9de82a0e3364730a1bdf711d6f0232cbe77eba1c..b82146511aa6e27457a9f35d0507897b5823c665 100644 --- a/source/ChromeDevTools/Protocol/iOS/Console/SetMonitoringXHREnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Console/SetMonitoringXHREnabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Console /// </summary> [Command(ProtocolName.Console.SetMonitoringXHREnabled)] [SupportedBy("iOS")] - public class SetMonitoringXHREnabledCommand + public class SetMonitoringXHREnabledCommand: ICommand<SetMonitoringXHREnabledCommandResponse> { /// <summary> /// Gets or sets Monitoring enabled state. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/DiscardSearchResultsCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/DiscardSearchResultsCommand.cs index d81591f3b9ab5a8bd3439a934d45ef6d5cfcde7d..6e8a3eeb75e79536e76040e6eab23b4d80ac0dce 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/DiscardSearchResultsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/DiscardSearchResultsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.DiscardSearchResults)] [SupportedBy("iOS")] - public class DiscardSearchResultsCommand + public class DiscardSearchResultsCommand: ICommand<DiscardSearchResultsCommandResponse> { /// <summary> /// Gets or sets Unique search session identifier. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/FocusCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/FocusCommand.cs index 0632f5fb8d9b43ffac3e3705bc3ef368bc13b4bf..ec82e8481e0099226fa7f7035aa375777bcb4f04 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/FocusCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/FocusCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.Focus)] [SupportedBy("iOS")] - public class FocusCommand + public class FocusCommand: ICommand<FocusCommandResponse> { /// <summary> /// Gets or sets Id of the node to focus. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/GetAccessibilityPropertiesForNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/GetAccessibilityPropertiesForNodeCommand.cs index 988699c9ff6b1db7c832e5a63753d6a8f210200b..9fe6c7a3373c1fabbdbdea3621055ab490fc04cc 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/GetAccessibilityPropertiesForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/GetAccessibilityPropertiesForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.GetAccessibilityPropertiesForNode)] [SupportedBy("iOS")] - public class GetAccessibilityPropertiesForNodeCommand + public class GetAccessibilityPropertiesForNodeCommand: ICommand<GetAccessibilityPropertiesForNodeCommandResponse> { /// <summary> /// Gets or sets Id of the node for which to get accessibility properties. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/GetAttributesCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/GetAttributesCommand.cs index 95dfe9eca705af9554fbe4ea279f5b515ba23b95..03adcd022d61de1a0e408323bf1c1cbf444590e7 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/GetAttributesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/GetAttributesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.GetAttributes)] [SupportedBy("iOS")] - public class GetAttributesCommand + public class GetAttributesCommand: ICommand<GetAttributesCommandResponse> { /// <summary> /// Gets or sets Id of the node to retrieve attibutes for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/GetDocumentCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/GetDocumentCommand.cs index 27e9e1e48d8d867f794950876ccbc9267136d2d5..e444760f7fcf982c8ee2ee4efa7cec011b469d5f 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/GetDocumentCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/GetDocumentCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.GetDocument)] [SupportedBy("iOS")] - public class GetDocumentCommand + public class GetDocumentCommand: ICommand<GetDocumentCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/GetEventListenersForNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/GetEventListenersForNodeCommand.cs index e8bfefa460613404991a211de0934cf96f75abcf..173e70577bfe03846eb1b0a6204aa0af08eadb7c 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/GetEventListenersForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/GetEventListenersForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.GetEventListenersForNode)] [SupportedBy("iOS")] - public class GetEventListenersForNodeCommand + public class GetEventListenersForNodeCommand: ICommand<GetEventListenersForNodeCommandResponse> { /// <summary> /// Gets or sets Id of the node to get listeners for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/GetOuterHTMLCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/GetOuterHTMLCommand.cs index dc1e0c962bab35df53323f8baf536f48bfe57970..7c748f050f979f69bf3a9424b8eface1332e173a 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/GetOuterHTMLCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/GetOuterHTMLCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.GetOuterHTML)] [SupportedBy("iOS")] - public class GetOuterHTMLCommand + public class GetOuterHTMLCommand: ICommand<GetOuterHTMLCommandResponse> { /// <summary> /// Gets or sets Id of the node to get markup for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/GetSearchResultsCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/GetSearchResultsCommand.cs index 4b30ae744aa49bf93606954e4a91fa8370a94fb9..d0451bc4748a2e4dfa0cc44e515bdc3fdd7cd2b8 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/GetSearchResultsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/GetSearchResultsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.GetSearchResults)] [SupportedBy("iOS")] - public class GetSearchResultsCommand + public class GetSearchResultsCommand: ICommand<GetSearchResultsCommandResponse> { /// <summary> /// Gets or sets Unique search session identifier. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/HideHighlightCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/HideHighlightCommand.cs index 24cf242158ae3c4017654630dc853deb8299455d..35dcc63f19115230be36812277bb2fe40947a222 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/HideHighlightCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/HideHighlightCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.HideHighlight)] [SupportedBy("iOS")] - public class HideHighlightCommand + public class HideHighlightCommand: ICommand<HideHighlightCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightFrameCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightFrameCommand.cs index 139cc8b3baf54f3fc8d22b94c6e06c5ef9230cdf..c325633821b9e0e8805a8a202616b9756bd7910a 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.HighlightFrame)] [SupportedBy("iOS")] - public class HighlightFrameCommand + public class HighlightFrameCommand: ICommand<HighlightFrameCommandResponse> { /// <summary> /// Gets or sets Identifier of the frame to highlight. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightNodeCommand.cs index 08e1a96f5804d7872ae5ba88f24eb1f33e38e3b9..0d45ca291406d28353d6474d31a7d934de3be02e 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.HighlightNode)] [SupportedBy("iOS")] - public class HighlightNodeCommand + public class HighlightNodeCommand: ICommand<HighlightNodeCommandResponse> { /// <summary> /// Gets or sets A descriptor for the highlight appearance. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightQuadCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightQuadCommand.cs index 94d92baa8bbf6f1e5a2a8d86ed9750bef1e39ab4..6c63ea48de010e840e8c97e5afba6405d9298b55 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightQuadCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightQuadCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.HighlightQuad)] [SupportedBy("iOS")] - public class HighlightQuadCommand + public class HighlightQuadCommand: ICommand<HighlightQuadCommandResponse> { /// <summary> /// Gets or sets Quad to highlight diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightRectCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightRectCommand.cs index 9ef25c6d4dd8d74143dda7630611676528824d91..bc4c8488c414aefa444a9d792ea90f5c8912cd8d 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightRectCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightRectCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.HighlightRect)] [SupportedBy("iOS")] - public class HighlightRectCommand + public class HighlightRectCommand: ICommand<HighlightRectCommandResponse> { /// <summary> /// Gets or sets X coordinate diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightSelectorCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightSelectorCommand.cs index e0c496cf380cf915205a5bc16fd725a994b67512..d897677129900cd2c7e0a01fa0a659bfe3464fb0 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/HighlightSelectorCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/HighlightSelectorCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.HighlightSelector)] [SupportedBy("iOS")] - public class HighlightSelectorCommand + public class HighlightSelectorCommand: ICommand<HighlightSelectorCommandResponse> { /// <summary> /// Gets or sets A descriptor for the highlight appearance. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/MarkUndoableStateCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/MarkUndoableStateCommand.cs index 49e3e00dc556714b09d342fffbbcf60bf61b2512..f8de1f863fa120667323f5eca905a97cd3755fbd 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/MarkUndoableStateCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/MarkUndoableStateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.MarkUndoableState)] [SupportedBy("iOS")] - public class MarkUndoableStateCommand + public class MarkUndoableStateCommand: ICommand<MarkUndoableStateCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/MoveToCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/MoveToCommand.cs index e3777a6a8717d8e4e71ba7abdaf4de6094847301..87992388e9ffe613dafb66550e11f651e93f8351 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/MoveToCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/MoveToCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.MoveTo)] [SupportedBy("iOS")] - public class MoveToCommand + public class MoveToCommand: ICommand<MoveToCommandResponse> { /// <summary> /// Gets or sets Id of the node to drop. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/PerformSearchCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/PerformSearchCommand.cs index af028ead5000bae50a328975a6b23eac2f0e79f9..527e2f3fee4fdf15efc08d225d26a60e37d49ffb 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/PerformSearchCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/PerformSearchCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.PerformSearch)] [SupportedBy("iOS")] - public class PerformSearchCommand + public class PerformSearchCommand: ICommand<PerformSearchCommandResponse> { /// <summary> /// Gets or sets Plain text or query selector or XPath search query. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByBackendIdToFrontendCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByBackendIdToFrontendCommand.cs index e2cf9c9698e9ddf4823477868ed69dbddcafa443..96413af4e832e0ecd22894253a30704625c6e5e9 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByBackendIdToFrontendCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByBackendIdToFrontendCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.PushNodeByBackendIdToFrontend)] [SupportedBy("iOS")] - public class PushNodeByBackendIdToFrontendCommand + public class PushNodeByBackendIdToFrontendCommand: ICommand<PushNodeByBackendIdToFrontendCommandResponse> { /// <summary> /// Gets or sets The backend node id of the node. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByPathToFrontendCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByPathToFrontendCommand.cs index 810c9e640537f2327f432c48cbc122a7ae3bb569..2bc986d5f4f74a5c3eadd5a684e69383c49c6954 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByPathToFrontendCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/PushNodeByPathToFrontendCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.PushNodeByPathToFrontend)] [SupportedBy("iOS")] - public class PushNodeByPathToFrontendCommand + public class PushNodeByPathToFrontendCommand: ICommand<PushNodeByPathToFrontendCommandResponse> { /// <summary> /// Gets or sets Path to node in the proprietary format. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorAllCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorAllCommand.cs index f086fe882f2f40b9a389185dc1974d0794ed95b3..828f2a98d0efdfd2d014a8b9cee0e4f3c670a6d2 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorAllCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorAllCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.QuerySelectorAll)] [SupportedBy("iOS")] - public class QuerySelectorAllCommand + public class QuerySelectorAllCommand: ICommand<QuerySelectorAllCommandResponse> { /// <summary> /// Gets or sets Id of the node to query upon. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorCommand.cs index d40fdd10ffd379d9fa01001be3605eb78108ebef..387d5764a21d55ecae4a88a07cb938c74a55f115 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/QuerySelectorCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.QuerySelector)] [SupportedBy("iOS")] - public class QuerySelectorCommand + public class QuerySelectorCommand: ICommand<QuerySelectorCommandResponse> { /// <summary> /// Gets or sets Id of the node to query upon. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/RedoCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/RedoCommand.cs index 50dabcfc22d395ca6fa8bc3342cd00defb960a1f..8aad43d81194c998a920fbf0355e3f9659801b1e 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/RedoCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/RedoCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.Redo)] [SupportedBy("iOS")] - public class RedoCommand + public class RedoCommand: ICommand<RedoCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/ReleaseBackendNodeIdsCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/ReleaseBackendNodeIdsCommand.cs index 5e64b55e709f96fdbdc6092c4f0b92c5d95fac55..3b65504dc33231177e811bfb2550db82063033d6 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/ReleaseBackendNodeIdsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/ReleaseBackendNodeIdsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.ReleaseBackendNodeIds)] [SupportedBy("iOS")] - public class ReleaseBackendNodeIdsCommand + public class ReleaseBackendNodeIdsCommand: ICommand<ReleaseBackendNodeIdsCommandResponse> { /// <summary> /// Gets or sets The backend node ids group name. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/RemoveAttributeCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/RemoveAttributeCommand.cs index 5b7990b822d58bdfca57092fb59f581ef5e245f3..a232cb6e561bbbe70977735aec95c0640c6fa3eb 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/RemoveAttributeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/RemoveAttributeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.RemoveAttribute)] [SupportedBy("iOS")] - public class RemoveAttributeCommand + public class RemoveAttributeCommand: ICommand<RemoveAttributeCommandResponse> { /// <summary> /// Gets or sets Id of the element to remove attribute from. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/RemoveNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/RemoveNodeCommand.cs index f3681cf923ca43a6cfd1214af3593e2795fab828..31c605655a309c15972fd2db5e46798ae4b32349 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/RemoveNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/RemoveNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.RemoveNode)] [SupportedBy("iOS")] - public class RemoveNodeCommand + public class RemoveNodeCommand: ICommand<RemoveNodeCommandResponse> { /// <summary> /// Gets or sets Id of the node to remove. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/RequestChildNodesCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/RequestChildNodesCommand.cs index 02a0c2504ba395713d7b970e760298657d922d50..f4283d5a2537e458d906f2334d1786a4686555b3 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/RequestChildNodesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/RequestChildNodesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.RequestChildNodes)] [SupportedBy("iOS")] - public class RequestChildNodesCommand + public class RequestChildNodesCommand: ICommand<RequestChildNodesCommandResponse> { /// <summary> /// Gets or sets Id of the node to get children for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/RequestNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/RequestNodeCommand.cs index 34ad809f2608d8d708397096485c1d15ab2a4632..bb2a003ffebc1d1176348292b65b527571fe6b1b 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/RequestNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/RequestNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.RequestNode)] [SupportedBy("iOS")] - public class RequestNodeCommand + public class RequestNodeCommand: ICommand<RequestNodeCommandResponse> { /// <summary> /// Gets or sets JavaScript object id to convert into node. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/ResolveNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/ResolveNodeCommand.cs index 6df96755709033a76adcfc78c70995faae2af0e0..74eafbdf4f46c88cc991eace5f8985d40dbc13c9 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/ResolveNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/ResolveNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.ResolveNode)] [SupportedBy("iOS")] - public class ResolveNodeCommand + public class ResolveNodeCommand: ICommand<ResolveNodeCommandResponse> { /// <summary> /// Gets or sets Id of the node to resolve. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributeValueCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributeValueCommand.cs index fcea45b92f5897cbcfbdbcce08b284c0bdc6f0f1..31b97dab796d53c5b381c26dc1a896aa19682cea 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributeValueCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributeValueCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.SetAttributeValue)] [SupportedBy("iOS")] - public class SetAttributeValueCommand + public class SetAttributeValueCommand: ICommand<SetAttributeValueCommandResponse> { /// <summary> /// Gets or sets Id of the element to set attribute for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributesAsTextCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributesAsTextCommand.cs index c829a1a8407f8b58f32100d7fe83f3affddc44a1..89c81ed857bcdb276d791e6729eb115f5a2c9d51 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributesAsTextCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/SetAttributesAsTextCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.SetAttributesAsText)] [SupportedBy("iOS")] - public class SetAttributesAsTextCommand + public class SetAttributesAsTextCommand: ICommand<SetAttributesAsTextCommandResponse> { /// <summary> /// Gets or sets Id of the element to set attributes for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/SetInspectModeEnabledCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/SetInspectModeEnabledCommand.cs index c916d8e83cda91763e28c2afdcd43cb5f5cfe2ec..aed2676cbf9935fc64b1b5facae81bc32c4c1a47 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/SetInspectModeEnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/SetInspectModeEnabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.SetInspectModeEnabled)] [SupportedBy("iOS")] - public class SetInspectModeEnabledCommand + public class SetInspectModeEnabledCommand: ICommand<SetInspectModeEnabledCommandResponse> { /// <summary> /// Gets or sets True to enable inspection mode, false to disable it. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeNameCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeNameCommand.cs index 025a58b54665d3be179a5a41433080d4799561f7..1ce9a9dd78a9e22f1235f644219231ea29ba8090 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeNameCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeNameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.SetNodeName)] [SupportedBy("iOS")] - public class SetNodeNameCommand + public class SetNodeNameCommand: ICommand<SetNodeNameCommandResponse> { /// <summary> /// Gets or sets Id of the node to set name for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeValueCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeValueCommand.cs index 13bdaeeff99b5c45bd3f57c0a663470c85dbe374..b1ca848728d7e869ba4554d9aef155436407e3b5 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeValueCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/SetNodeValueCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.SetNodeValue)] [SupportedBy("iOS")] - public class SetNodeValueCommand + public class SetNodeValueCommand: ICommand<SetNodeValueCommandResponse> { /// <summary> /// Gets or sets Id of the node to set value for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/SetOuterHTMLCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/SetOuterHTMLCommand.cs index 11c83821e331e0fdd7c8fdb9b0083b8646221df6..adbb79c93a9ad777e78aab7aec57497103eb3a74 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/SetOuterHTMLCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/SetOuterHTMLCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.SetOuterHTML)] [SupportedBy("iOS")] - public class SetOuterHTMLCommand + public class SetOuterHTMLCommand: ICommand<SetOuterHTMLCommandResponse> { /// <summary> /// Gets or sets Id of the node to set markup for. diff --git a/source/ChromeDevTools/Protocol/iOS/DOM/UndoCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOM/UndoCommand.cs index 6241e2bbb1a219db0ea6ce3cbcaee87139b640a8..901d61c9f8c5342dc072221790b560919a58e6dc 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOM/UndoCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOM/UndoCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOM /// </summary> [Command(ProtocolName.DOM.Undo)] [SupportedBy("iOS")] - public class UndoCommand + public class UndoCommand: ICommand<UndoCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveDOMBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveDOMBreakpointCommand.cs index 17edec4daf7b1c757f002451599bdd995603da20..c58bbfee22b0388255ec5258fa40d5be227e2319 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveDOMBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveDOMBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveDOMBreakpoint)] [SupportedBy("iOS")] - public class RemoveDOMBreakpointCommand + public class RemoveDOMBreakpointCommand: ICommand<RemoveDOMBreakpointCommandResponse> { /// <summary> /// Gets or sets Identifier of the node to remove breakpoint from. diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveEventListenerBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveEventListenerBreakpointCommand.cs index 51f470b8e7922ced86a2136578664a20081bc537..5bba6643edcd3a6780aff1922d30b82ef4f76b32 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveEventListenerBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveEventListenerBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveEventListenerBreakpoint)] [SupportedBy("iOS")] - public class RemoveEventListenerBreakpointCommand + public class RemoveEventListenerBreakpointCommand: ICommand<RemoveEventListenerBreakpointCommandResponse> { /// <summary> /// Gets or sets Event name. diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs index 848ea24087941532a0fe4c4ef0f5a74d0ceff68c..255e2655444d69746cb0a222987ad7ae39b978ad 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveInstrumentationBreakpoint)] [SupportedBy("iOS")] - public class RemoveInstrumentationBreakpointCommand + public class RemoveInstrumentationBreakpointCommand: ICommand<RemoveInstrumentationBreakpointCommandResponse> { /// <summary> /// Gets or sets Instrumentation name to stop on. diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveXHRBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveXHRBreakpointCommand.cs index f2c00d14b1edca7e99e40123fff66048b48ee6d2..10db6b6c17b78b3192cba0d4a41069ce021b9523 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveXHRBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/RemoveXHRBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.RemoveXHRBreakpoint)] [SupportedBy("iOS")] - public class RemoveXHRBreakpointCommand + public class RemoveXHRBreakpointCommand: ICommand<RemoveXHRBreakpointCommandResponse> { /// <summary> /// Gets or sets Resource URL substring. diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetDOMBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetDOMBreakpointCommand.cs index 639467a46db67a5bb118047fdfd9d72cce79eab3..fdabcd0ba64a631ebc27ba7b554a62ff23348492 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetDOMBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetDOMBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetDOMBreakpoint)] [SupportedBy("iOS")] - public class SetDOMBreakpointCommand + public class SetDOMBreakpointCommand: ICommand<SetDOMBreakpointCommandResponse> { /// <summary> /// Gets or sets Identifier of the node to set breakpoint on. diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetEventListenerBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetEventListenerBreakpointCommand.cs index deae5882cc0134c0ec23d6da4561c45e34fafac9..f6a111ef4aec4309e789d4750ccde41e681515cf 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetEventListenerBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetEventListenerBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetEventListenerBreakpoint)] [SupportedBy("iOS")] - public class SetEventListenerBreakpointCommand + public class SetEventListenerBreakpointCommand: ICommand<SetEventListenerBreakpointCommandResponse> { /// <summary> /// Gets or sets DOM Event name to stop on (any DOM event will do). diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetInstrumentationBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetInstrumentationBreakpointCommand.cs index ecfe2210d13bf9645efd3f745694c031e6a61836..94fb34f8a232bdabf9e212e0223c323423519eb5 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetInstrumentationBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetInstrumentationBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetInstrumentationBreakpoint)] [SupportedBy("iOS")] - public class SetInstrumentationBreakpointCommand + public class SetInstrumentationBreakpointCommand: ICommand<SetInstrumentationBreakpointCommandResponse> { /// <summary> /// Gets or sets Instrumentation name to stop on. diff --git a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetXHRBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetXHRBreakpointCommand.cs index 4c8f00390f050075287b9bf5e44fc72d670b1cbd..60914141e6ab20912e7999b39f4053e63b139467 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetXHRBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMDebugger/SetXHRBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMDebugger /// </summary> [Command(ProtocolName.DOMDebugger.SetXHRBreakpoint)] [SupportedBy("iOS")] - public class SetXHRBreakpointCommand + public class SetXHRBreakpointCommand: ICommand<SetXHRBreakpointCommandResponse> { /// <summary> /// Gets or sets Resource URL substring. All XHRs having this substring in the URL will get stopped upon. diff --git a/source/ChromeDevTools/Protocol/iOS/DOMStorage/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMStorage/DisableCommand.cs index 51d7f77e3f8a3e52a32e4ccde0c941de0c720681..4efd139a4cafb760610c3c5071b507beee38029d 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMStorage/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMStorage/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMStorage /// </summary> [Command(ProtocolName.DOMStorage.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/DOMStorage/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMStorage/EnableCommand.cs index b626dc8fc3f52aa3bc2bb94bb84a99025a19bc72..490846f147b762cde0f606f8323420b019ac789b 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMStorage/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMStorage/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMStorage /// </summary> [Command(ProtocolName.DOMStorage.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/DOMStorage/GetDOMStorageItemsCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMStorage/GetDOMStorageItemsCommand.cs index d72d3c9139cee726a1ed78b5696c45fc037f8105..800f25a7cd6766c9fd7b0e8f5815e87103c968d3 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMStorage/GetDOMStorageItemsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMStorage/GetDOMStorageItemsCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMStorage { [Command(ProtocolName.DOMStorage.GetDOMStorageItems)] [SupportedBy("iOS")] - public class GetDOMStorageItemsCommand + public class GetDOMStorageItemsCommand: ICommand<GetDOMStorageItemsCommandResponse> { /// <summary> /// Gets or sets StorageId diff --git a/source/ChromeDevTools/Protocol/iOS/DOMStorage/RemoveDOMStorageItemCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMStorage/RemoveDOMStorageItemCommand.cs index abbc806f1dbc8d7bf48414e8f72164a33a378289..bfb144408ce6fe99d1459d091b4dfd93f821635a 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMStorage/RemoveDOMStorageItemCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMStorage/RemoveDOMStorageItemCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMStorage { [Command(ProtocolName.DOMStorage.RemoveDOMStorageItem)] [SupportedBy("iOS")] - public class RemoveDOMStorageItemCommand + public class RemoveDOMStorageItemCommand: ICommand<RemoveDOMStorageItemCommandResponse> { /// <summary> /// Gets or sets StorageId diff --git a/source/ChromeDevTools/Protocol/iOS/DOMStorage/SetDOMStorageItemCommand.cs b/source/ChromeDevTools/Protocol/iOS/DOMStorage/SetDOMStorageItemCommand.cs index aae2c5011d59f75ea78436937669bffc1f998263..d5bfe994bf4df713c566d383fc9f5e1b6592420a 100644 --- a/source/ChromeDevTools/Protocol/iOS/DOMStorage/SetDOMStorageItemCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/DOMStorage/SetDOMStorageItemCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.DOMStorage { [Command(ProtocolName.DOMStorage.SetDOMStorageItem)] [SupportedBy("iOS")] - public class SetDOMStorageItemCommand + public class SetDOMStorageItemCommand: ICommand<SetDOMStorageItemCommandResponse> { /// <summary> /// Gets or sets StorageId diff --git a/source/ChromeDevTools/Protocol/iOS/Database/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Database/DisableCommand.cs index 09c7bd5a0164493359e6e83a8b1f018c9d3068f9..4eb71681425a659248e5935d98070c81b45ce61d 100644 --- a/source/ChromeDevTools/Protocol/iOS/Database/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Database/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Database /// </summary> [Command(ProtocolName.Database.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Database/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Database/EnableCommand.cs index 984fd4ba3513d93da64a4c4b58602e452343e8b7..fb927afa9a98ca43072ad7faba3a24bce5af83d8 100644 --- a/source/ChromeDevTools/Protocol/iOS/Database/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Database/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Database /// </summary> [Command(ProtocolName.Database.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Database/ExecuteSQLCommand.cs b/source/ChromeDevTools/Protocol/iOS/Database/ExecuteSQLCommand.cs index b9e773c73aa4ecb67bbf7303489dbc225dffdf1b..051d0bf4ab9d7d5b4b425cd6f12286e3196cd5b9 100644 --- a/source/ChromeDevTools/Protocol/iOS/Database/ExecuteSQLCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Database/ExecuteSQLCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Database { [Command(ProtocolName.Database.ExecuteSQL)] [SupportedBy("iOS")] - public class ExecuteSQLCommand + public class ExecuteSQLCommand: ICommand<ExecuteSQLCommandResponse> { /// <summary> /// Gets or sets DatabaseId diff --git a/source/ChromeDevTools/Protocol/iOS/Database/GetDatabaseTableNamesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Database/GetDatabaseTableNamesCommand.cs index 915ca70b70fa327ac74e68d7dd0278791adb3f3e..59370cb567fc913399166aaaf066d4d67da1cb1c 100644 --- a/source/ChromeDevTools/Protocol/iOS/Database/GetDatabaseTableNamesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Database/GetDatabaseTableNamesCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Database { [Command(ProtocolName.Database.GetDatabaseTableNames)] [SupportedBy("iOS")] - public class GetDatabaseTableNamesCommand + public class GetDatabaseTableNamesCommand: ICommand<GetDatabaseTableNamesCommandResponse> { /// <summary> /// Gets or sets DatabaseId diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/ContinueToLocationCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/ContinueToLocationCommand.cs index d135d9c268e89ac0b8a2b48b328eb870a9e49a86..28a2a90b446a8f428a4378043215e109d9d318d6 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/ContinueToLocationCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/ContinueToLocationCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.ContinueToLocation)] [SupportedBy("iOS")] - public class ContinueToLocationCommand + public class ContinueToLocationCommand: ICommand<ContinueToLocationCommandResponse> { /// <summary> /// Gets or sets Location to continue to. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/DisableCommand.cs index b72b5ba1adc221d60cfb9af55b27a7d6bb3cf4fa..41785e1a368d541756f38171d77f19a0c4420965 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/EnableCommand.cs index c90bd3849557c951638c1ad1fe62756d6e8e3d32..1312c358ad2e2d050330406d74cdbb32c27d1d80 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/EvaluateOnCallFrameCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/EvaluateOnCallFrameCommand.cs index 175c8d2606c24bf39658b46428354f6816b93cdb..f073d13c6fcfbfb58373b33531c257e3c7460e4a 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/EvaluateOnCallFrameCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/EvaluateOnCallFrameCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.EvaluateOnCallFrame)] [SupportedBy("iOS")] - public class EvaluateOnCallFrameCommand + public class EvaluateOnCallFrameCommand: ICommand<EvaluateOnCallFrameCommandResponse> { /// <summary> /// Gets or sets Call frame identifier to evaluate on. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/GetFunctionDetailsCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/GetFunctionDetailsCommand.cs index bbc37f71435ec6743385d129687658e646a43966..e658f4a2cf18b5b5d443a58c9b369f97fc05a924 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/GetFunctionDetailsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/GetFunctionDetailsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.GetFunctionDetails)] [SupportedBy("iOS")] - public class GetFunctionDetailsCommand + public class GetFunctionDetailsCommand: ICommand<GetFunctionDetailsCommandResponse> { /// <summary> /// Gets or sets Id of the function to get location for. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/GetScriptSourceCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/GetScriptSourceCommand.cs index ec5de502a3e799829753731ad25fa03973ee84dd..198c95777571b56dea0d523fcdb02d2d211fc658 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/GetScriptSourceCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/GetScriptSourceCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.GetScriptSource)] [SupportedBy("iOS")] - public class GetScriptSourceCommand + public class GetScriptSourceCommand: ICommand<GetScriptSourceCommandResponse> { /// <summary> /// Gets or sets Id of the script to get source for. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/PauseCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/PauseCommand.cs index 800223573255315c21d82b289779f2177512da43..4f0465b6e1c9f953d99675dadac1dba6b861c8cf 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/PauseCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/PauseCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.Pause)] [SupportedBy("iOS")] - public class PauseCommand + public class PauseCommand: ICommand<PauseCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/RemoveBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/RemoveBreakpointCommand.cs index 0816ad44ffe8bd3783e3ce5e1c9f572812d1f5fa..bbc0512e5a7fcbb0ed496234d27c92786884cb72 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/RemoveBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/RemoveBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.RemoveBreakpoint)] [SupportedBy("iOS")] - public class RemoveBreakpointCommand + public class RemoveBreakpointCommand: ICommand<RemoveBreakpointCommandResponse> { /// <summary> /// Gets or sets BreakpointId diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/ResumeCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/ResumeCommand.cs index dc1878b8ffb8c75cc6eaad6dabe5ec0641c723b5..0201f9478206e1472ac00336f99d2f5e4c50bf85 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/ResumeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/ResumeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.Resume)] [SupportedBy("iOS")] - public class ResumeCommand + public class ResumeCommand: ICommand<ResumeCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/SearchInContentCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/SearchInContentCommand.cs index e0d1593ab29b7b3395e0abbc4993454c13b1711b..c241e66ec478c4a6f3a834c7253c7f8c00b95f65 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/SearchInContentCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/SearchInContentCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.SearchInContent)] [SupportedBy("iOS")] - public class SearchInContentCommand + public class SearchInContentCommand: ICommand<SearchInContentCommandResponse> { /// <summary> /// Gets or sets Id of the script to search in. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointByUrlCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointByUrlCommand.cs index b4fb7cb85e3e01cd2f59822d62a943c3a492507e..6e3d2f190fb3d553d4ee2110653bf7c77fb4a39a 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointByUrlCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointByUrlCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.SetBreakpointByUrl)] [SupportedBy("iOS")] - public class SetBreakpointByUrlCommand + public class SetBreakpointByUrlCommand: ICommand<SetBreakpointByUrlCommandResponse> { /// <summary> /// Gets or sets Line number to set breakpoint at. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointCommand.cs index d3a5f2874dc2ac9766e1ca67587ae6e41a971c4b..c19c69aad59d644cab1723be9cbb4d39f41f43bc 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.SetBreakpoint)] [SupportedBy("iOS")] - public class SetBreakpointCommand + public class SetBreakpointCommand: ICommand<SetBreakpointCommandResponse> { /// <summary> /// Gets or sets Location to set breakpoint in. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointsActiveCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointsActiveCommand.cs index 5c214e51404496ebf561294d514593e7ccd526e7..717e21197f07a588f9fe8e05a4c3c13e302581bd 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointsActiveCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/SetBreakpointsActiveCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.SetBreakpointsActive)] [SupportedBy("iOS")] - public class SetBreakpointsActiveCommand + public class SetBreakpointsActiveCommand: ICommand<SetBreakpointsActiveCommandResponse> { /// <summary> /// Gets or sets New value for breakpoints active state. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/SetOverlayMessageCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/SetOverlayMessageCommand.cs index 267f485094b3b6bedb09f1eb5d67fcd16254e913..bac986a5608f6ae775b927d07d33da1a61ad6549 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/SetOverlayMessageCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/SetOverlayMessageCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.SetOverlayMessage)] [SupportedBy("iOS")] - public class SetOverlayMessageCommand + public class SetOverlayMessageCommand: ICommand<SetOverlayMessageCommandResponse> { /// <summary> /// Gets or sets Overlay message to display when paused in debugger. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/SetPauseOnExceptionsCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/SetPauseOnExceptionsCommand.cs index db5ca39dda973716117b91c6781df5b331d775a5..40b09b31c4e469aae1da2d89a4d070ac8b40cf05 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/SetPauseOnExceptionsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/SetPauseOnExceptionsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.SetPauseOnExceptions)] [SupportedBy("iOS")] - public class SetPauseOnExceptionsCommand + public class SetPauseOnExceptionsCommand: ICommand<SetPauseOnExceptionsCommandResponse> { /// <summary> /// Gets or sets Pause on exceptions mode. diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/StepIntoCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/StepIntoCommand.cs index 0968ee5aaa5d70a0a535b26e1db9ba7c6c654fdd..ce5bf2127c8d5d8a4892917328bb0e3b8f73c044 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/StepIntoCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/StepIntoCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.StepInto)] [SupportedBy("iOS")] - public class StepIntoCommand + public class StepIntoCommand: ICommand<StepIntoCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/StepOutCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/StepOutCommand.cs index 0f56703812229d26bd51832c2371fe3f390f0e4f..992754653a162a9cbf51db9f5389bda805157b58 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/StepOutCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/StepOutCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.StepOut)] [SupportedBy("iOS")] - public class StepOutCommand + public class StepOutCommand: ICommand<StepOutCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Debugger/StepOverCommand.cs b/source/ChromeDevTools/Protocol/iOS/Debugger/StepOverCommand.cs index 98847bb336a142d39b78108a3cc24723571c075a..34aa56401e0777aa7d354b976fda70423b65e0da 100644 --- a/source/ChromeDevTools/Protocol/iOS/Debugger/StepOverCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Debugger/StepOverCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Debugger /// </summary> [Command(ProtocolName.Debugger.StepOver)] [SupportedBy("iOS")] - public class StepOverCommand + public class StepOverCommand: ICommand<StepOverCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/IndexedDB/ClearObjectStoreCommand.cs b/source/ChromeDevTools/Protocol/iOS/IndexedDB/ClearObjectStoreCommand.cs index 6f26cbb7e016a80368b63c5c188abfd787def4c1..5ce57af316f63693b503ef70fb0d78606abe7da6 100644 --- a/source/ChromeDevTools/Protocol/iOS/IndexedDB/ClearObjectStoreCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/IndexedDB/ClearObjectStoreCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.ClearObjectStore)] [SupportedBy("iOS")] - public class ClearObjectStoreCommand + public class ClearObjectStoreCommand: ICommand<ClearObjectStoreCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/iOS/IndexedDB/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/IndexedDB/DisableCommand.cs index 07fdef9d57291f3691e9b682a655f9381043d7c7..445933148bd0404b56cb7c5d31a93843bcb63e28 100644 --- a/source/ChromeDevTools/Protocol/iOS/IndexedDB/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/IndexedDB/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/IndexedDB/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/IndexedDB/EnableCommand.cs index 68095e25ccbdba3070aca312c4453153f638a465..bc92b7b3ead4c6e262125c7be1ff54f72688fca4 100644 --- a/source/ChromeDevTools/Protocol/iOS/IndexedDB/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/IndexedDB/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDataCommand.cs b/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDataCommand.cs index 5c06c656e8cc8446a53d6cafddb78f6bf2ba48bf..c117efa29243274ec901f11b094c9bf7b43b2b43 100644 --- a/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDataCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDataCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.RequestData)] [SupportedBy("iOS")] - public class RequestDataCommand + public class RequestDataCommand: ICommand<RequestDataCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseCommand.cs b/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseCommand.cs index 9302458523cbb1f0d2729bd051e7df8e533be3bb..2cdd9198447fdcd9adb3afe8be3c0deb979f1a12 100644 --- a/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.RequestDatabase)] [SupportedBy("iOS")] - public class RequestDatabaseCommand + public class RequestDatabaseCommand: ICommand<RequestDatabaseCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseNamesCommand.cs b/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseNamesCommand.cs index f3a014a0a3fff0a6d33ac173c63a84db518647d5..e83ad4e89700669a14964a6a9d83e1d9d76c2523 100644 --- a/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseNamesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/IndexedDB/RequestDatabaseNamesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.IndexedDB /// </summary> [Command(ProtocolName.IndexedDB.RequestDatabaseNames)] [SupportedBy("iOS")] - public class RequestDatabaseNamesCommand + public class RequestDatabaseNamesCommand: ICommand<RequestDatabaseNamesCommandResponse> { /// <summary> /// Gets or sets Security origin. diff --git a/source/ChromeDevTools/Protocol/iOS/Inspector/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Inspector/DisableCommand.cs index aed0c4b00555834403972d1f1c9db931e8c68450..f0605f12f4093c73459944b28df03c1618e8db27 100644 --- a/source/ChromeDevTools/Protocol/iOS/Inspector/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Inspector/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Inspector /// </summary> [Command(ProtocolName.Inspector.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Inspector/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Inspector/EnableCommand.cs index f96370563d7c0d4f7af0481f6c1b63026612560d..7dc8987a8ac265a0632e7307bbe227e07b26e01f 100644 --- a/source/ChromeDevTools/Protocol/iOS/Inspector/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Inspector/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Inspector /// </summary> [Command(ProtocolName.Inspector.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Inspector/InitializedCommand.cs b/source/ChromeDevTools/Protocol/iOS/Inspector/InitializedCommand.cs index c2bb16fbb45f943c39caceb14d15309baf3e239b..6871c1a499328d591f73e3b35441ca937e2c26c7 100644 --- a/source/ChromeDevTools/Protocol/iOS/Inspector/InitializedCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Inspector/InitializedCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Inspector /// </summary> [Command(ProtocolName.Inspector.Initialized)] [SupportedBy("iOS")] - public class InitializedCommand + public class InitializedCommand: ICommand<InitializedCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/LayerTree/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/LayerTree/DisableCommand.cs index b57d2dd843fcff6fb13c4fd5d6b97fe68ec8ec69..26f2420c0fbfee3b3360e81bdeea95380c6187e5 100644 --- a/source/ChromeDevTools/Protocol/iOS/LayerTree/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/LayerTree/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.LayerTree /// </summary> [Command(ProtocolName.LayerTree.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/LayerTree/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/LayerTree/EnableCommand.cs index e506c8d8060f263a2cf79d3758ae082561f5c855..3cc9d00680f8418a50d661ddc8e7f1751dc68bdf 100644 --- a/source/ChromeDevTools/Protocol/iOS/LayerTree/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/LayerTree/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.LayerTree /// </summary> [Command(ProtocolName.LayerTree.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/LayerTree/LayersForNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/LayerTree/LayersForNodeCommand.cs index 250e4f342c39896467b4f88413855ceb782aa7c1..643ebdb45f39a53976e42600161293699033e2ef 100644 --- a/source/ChromeDevTools/Protocol/iOS/LayerTree/LayersForNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/LayerTree/LayersForNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.LayerTree /// </summary> [Command(ProtocolName.LayerTree.LayersForNode)] [SupportedBy("iOS")] - public class LayersForNodeCommand + public class LayersForNodeCommand: ICommand<LayersForNodeCommandResponse> { /// <summary> /// Gets or sets Root of the subtree for which we want to gather layers. diff --git a/source/ChromeDevTools/Protocol/iOS/LayerTree/ReasonsForCompositingLayerCommand.cs b/source/ChromeDevTools/Protocol/iOS/LayerTree/ReasonsForCompositingLayerCommand.cs index b3b9ed07b025ab9ca5f894016d131585b142780e..f0060a42a8a14b32226fdf2e481140f3cb58adda 100644 --- a/source/ChromeDevTools/Protocol/iOS/LayerTree/ReasonsForCompositingLayerCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/LayerTree/ReasonsForCompositingLayerCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.LayerTree /// </summary> [Command(ProtocolName.LayerTree.ReasonsForCompositingLayer)] [SupportedBy("iOS")] - public class ReasonsForCompositingLayerCommand + public class ReasonsForCompositingLayerCommand: ICommand<ReasonsForCompositingLayerCommandResponse> { /// <summary> /// Gets or sets The id of the layer for which we want to get the reasons it was composited. diff --git a/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCacheCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCacheCommand.cs index 51166bd55c798b3e40f5cd204dcc23ba5722de5a..4d4fb386b9899a79ebac483a40ef2b745ecca410 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCacheCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCacheCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.CanClearBrowserCache)] [SupportedBy("iOS")] - public class CanClearBrowserCacheCommand + public class CanClearBrowserCacheCommand: ICommand<CanClearBrowserCacheCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCookiesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCookiesCommand.cs index 76a38896cab12e93d29ea1f0cfe3f404268c648b..d3f67eb0c805ad60d0d67320f129fbd156db01a2 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCookiesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/CanClearBrowserCookiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.CanClearBrowserCookies)] [SupportedBy("iOS")] - public class CanClearBrowserCookiesCommand + public class CanClearBrowserCookiesCommand: ICommand<CanClearBrowserCookiesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCacheCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCacheCommand.cs index 2485481149f129efd0fb0541a013857d60d1ea84..1956573a337adceea5eba3b9f224b0db6c27a93c 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCacheCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCacheCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.ClearBrowserCache)] [SupportedBy("iOS")] - public class ClearBrowserCacheCommand + public class ClearBrowserCacheCommand: ICommand<ClearBrowserCacheCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCookiesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCookiesCommand.cs index 2037df2af4e2972d23f533e95bd024c880e5d85c..bf871b522eaed322ca47e3872132861f064e60eb 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCookiesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/ClearBrowserCookiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.ClearBrowserCookies)] [SupportedBy("iOS")] - public class ClearBrowserCookiesCommand + public class ClearBrowserCookiesCommand: ICommand<ClearBrowserCookiesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Network/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/DisableCommand.cs index c5bc71e2b90769348ab2b04677f08d2c2d6ca464..81fd875cba4f8b754078f7826e8c704d1194bec6 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Network/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/EnableCommand.cs index 9c1bed663f0c00ee6611f2ded975319bf1fec614..9c7a2d3a07f00d479e29ef8627aa9305c4f16e1a 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Network/GetResponseBodyCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/GetResponseBodyCommand.cs index 793854cb71cbbded4030e0cb93f1c57e33dbafba..cdc602d3b32f7fd7c199aef938bc3c329b6bca65 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/GetResponseBodyCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/GetResponseBodyCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.GetResponseBody)] [SupportedBy("iOS")] - public class GetResponseBodyCommand + public class GetResponseBodyCommand: ICommand<GetResponseBodyCommandResponse> { /// <summary> /// Gets or sets Identifier of the network request to get content for. diff --git a/source/ChromeDevTools/Protocol/iOS/Network/Headers.cs b/source/ChromeDevTools/Protocol/iOS/Network/Headers.cs new file mode 100644 index 0000000000000000000000000000000000000000..12d5d53dd596e1214dbbcca6c7bea69c5b6534f6 --- /dev/null +++ b/source/ChromeDevTools/Protocol/iOS/Network/Headers.cs @@ -0,0 +1,14 @@ +using MasterDevs.ChromeDevTools; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network +{ + /// <summary> + /// Request / response headers as keys / values of JSON object. + /// </summary> + [SupportedBy("iOS")] + public class Headers + { + } +} diff --git a/source/ChromeDevTools/Protocol/iOS/Network/LoadResourceCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/LoadResourceCommand.cs index d5ba136da6322be8a6406c46f8f8e9f8e374a17a..189fdde31f75e46ba185bce3228e0e7449ec2531 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/LoadResourceCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/LoadResourceCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.LoadResource)] [SupportedBy("iOS")] - public class LoadResourceCommand + public class LoadResourceCommand: ICommand<LoadResourceCommandResponse> { /// <summary> /// Gets or sets Frame to load the resource from. diff --git a/source/ChromeDevTools/Protocol/iOS/Network/SetCacheDisabledCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/SetCacheDisabledCommand.cs index df16b706b5ca8f47d848671dc773dd6daf074ba2..3000784a4d0329cf01c47b780f8096c26e12673b 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/SetCacheDisabledCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/SetCacheDisabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.SetCacheDisabled)] [SupportedBy("iOS")] - public class SetCacheDisabledCommand + public class SetCacheDisabledCommand: ICommand<SetCacheDisabledCommandResponse> { /// <summary> /// Gets or sets Cache disabled state. diff --git a/source/ChromeDevTools/Protocol/iOS/Network/SetExtraHTTPHeadersCommand.cs b/source/ChromeDevTools/Protocol/iOS/Network/SetExtraHTTPHeadersCommand.cs index 910d057a259c22fa8bf7a8a7f845c2de5718f9f9..18e4a9320923f4256db44775b0c0e2475589fe53 100644 --- a/source/ChromeDevTools/Protocol/iOS/Network/SetExtraHTTPHeadersCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Network/SetExtraHTTPHeadersCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Network /// </summary> [Command(ProtocolName.Network.SetExtraHTTPHeaders)] [SupportedBy("iOS")] - public class SetExtraHTTPHeadersCommand + public class SetExtraHTTPHeadersCommand: ICommand<SetExtraHTTPHeadersCommandResponse> { /// <summary> /// Gets or sets Map with extra HTTP headers. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/AddScriptToEvaluateOnLoadCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/AddScriptToEvaluateOnLoadCommand.cs index 5de2a5bbc308d261de8b445f57e81f5c23b79702..1d2b2cf6617f42a14bbd3787e7c1ace2af1f51f4 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/AddScriptToEvaluateOnLoadCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/AddScriptToEvaluateOnLoadCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page { [Command(ProtocolName.Page.AddScriptToEvaluateOnLoad)] [SupportedBy("iOS")] - public class AddScriptToEvaluateOnLoadCommand + public class AddScriptToEvaluateOnLoadCommand: ICommand<AddScriptToEvaluateOnLoadCommandResponse> { /// <summary> /// Gets or sets ScriptSource diff --git a/source/ChromeDevTools/Protocol/iOS/Page/ArchiveCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/ArchiveCommand.cs index c361e3c61e505ffc45d0ef792c2b7ca822a339ca..64002de0fc648cfa513007f4150f1a77a56f336d 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/ArchiveCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/ArchiveCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.Archive)] [SupportedBy("iOS")] - public class ArchiveCommand + public class ArchiveCommand: ICommand<ArchiveCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Page/DeleteCookieCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/DeleteCookieCommand.cs index da80c23dd886e48d24447d1b029d70daa991f942..ae893cdad4c3d45a2453997213bbf70718d325ff 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/DeleteCookieCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/DeleteCookieCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.DeleteCookie)] [SupportedBy("iOS")] - public class DeleteCookieCommand + public class DeleteCookieCommand: ICommand<DeleteCookieCommandResponse> { /// <summary> /// Gets or sets Name of the cookie to remove. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/DisableCommand.cs index ad609016add776a268b1eb310f5b98594d62cdc7..7c7c482270e150e110ab43f78adc5c208731a2f1 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Page/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/EnableCommand.cs index 9201e324cbdb6095d92734b5084a70c09fb6a72e..924752973aac6ec3784f2863fb6e734a9f97ab6c 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Page/GetCompositingBordersVisibleCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/GetCompositingBordersVisibleCommand.cs index 07d65d2633d67563caafbd8b12418e8123c3d323..09e50ebb19e5a11f1ae2b2e9136b83a751f6accf 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/GetCompositingBordersVisibleCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/GetCompositingBordersVisibleCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.GetCompositingBordersVisible)] [SupportedBy("iOS")] - public class GetCompositingBordersVisibleCommand + public class GetCompositingBordersVisibleCommand: ICommand<GetCompositingBordersVisibleCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Page/GetCookiesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/GetCookiesCommand.cs index 2b0aaaea311d6b0ad4000866ae128898136ab042..b1992baa7d1d0d5a16b3fff0d33514f1a5f88478 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/GetCookiesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/GetCookiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.GetCookies)] [SupportedBy("iOS")] - public class GetCookiesCommand + public class GetCookiesCommand: ICommand<GetCookiesCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Page/GetResourceContentCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/GetResourceContentCommand.cs index dd27cd14d4bdd31cb21ea101d43c0601ef42fccd..e68c17a10e2c09330ef94cd4fc7d75326630507d 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/GetResourceContentCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/GetResourceContentCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.GetResourceContent)] [SupportedBy("iOS")] - public class GetResourceContentCommand + public class GetResourceContentCommand: ICommand<GetResourceContentCommandResponse> { /// <summary> /// Gets or sets Frame id to get resource for. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/GetResourceTreeCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/GetResourceTreeCommand.cs index f2c0aa851768e00028118c61d875ec476f1dd542..304febd6d44bb81999a314e6af154b7ffa56611f 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/GetResourceTreeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/GetResourceTreeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.GetResourceTree)] [SupportedBy("iOS")] - public class GetResourceTreeCommand + public class GetResourceTreeCommand: ICommand<GetResourceTreeCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Page/GetScriptExecutionStatusCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/GetScriptExecutionStatusCommand.cs index 1173bd5223c7211ac5b3d4bfe38db31b37b34c55..4e3f289e3fc070c15c732af7e68766c1e1eb601a 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/GetScriptExecutionStatusCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/GetScriptExecutionStatusCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.GetScriptExecutionStatus)] [SupportedBy("iOS")] - public class GetScriptExecutionStatusCommand + public class GetScriptExecutionStatusCommand: ICommand<GetScriptExecutionStatusCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Page/HandleJavaScriptDialogCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/HandleJavaScriptDialogCommand.cs index e5732bcd847896ba92272bc9b31842ece9b481aa..c750f78e491168bb74e0a080a14c5db22ca0639a 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/HandleJavaScriptDialogCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/HandleJavaScriptDialogCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.HandleJavaScriptDialog)] [SupportedBy("iOS")] - public class HandleJavaScriptDialogCommand + public class HandleJavaScriptDialogCommand: ICommand<HandleJavaScriptDialogCommandResponse> { /// <summary> /// Gets or sets Whether to accept or dismiss the dialog. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/NavigateCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/NavigateCommand.cs index 5a4e6d6bb9f662f07d3c4fb94f6cb7736a43723d..790061f02090165e56e7b10feee27530d946c027 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/NavigateCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/NavigateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.Navigate)] [SupportedBy("iOS")] - public class NavigateCommand + public class NavigateCommand: ICommand<NavigateCommandResponse> { /// <summary> /// Gets or sets URL to navigate the page to. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/ReloadCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/ReloadCommand.cs index ce965df10bc96d98664e1b31d4d6dc4b93081629..a2dceb4f84f0b3c3c337f5cf4560cff53f53d25a 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/ReloadCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/ReloadCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.Reload)] [SupportedBy("iOS")] - public class ReloadCommand + public class ReloadCommand: ICommand<ReloadCommandResponse> { /// <summary> /// Gets or sets If true, browser cache is ignored (as if the user pressed Shift+refresh). diff --git a/source/ChromeDevTools/Protocol/iOS/Page/RemoveScriptToEvaluateOnLoadCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/RemoveScriptToEvaluateOnLoadCommand.cs index 161af6e4aad3b55a4c6f73a22f35f65e600a156e..f06abc323dc04b44aa3a5903b9fa84085e88cc6b 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/RemoveScriptToEvaluateOnLoadCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/RemoveScriptToEvaluateOnLoadCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page { [Command(ProtocolName.Page.RemoveScriptToEvaluateOnLoad)] [SupportedBy("iOS")] - public class RemoveScriptToEvaluateOnLoadCommand + public class RemoveScriptToEvaluateOnLoadCommand: ICommand<RemoveScriptToEvaluateOnLoadCommandResponse> { /// <summary> /// Gets or sets Identifier diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourceCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourceCommand.cs index ee06d5d1bbc25522f477d6ea74381609adb79bfe..f40f6cde969399aee4104c2ff4b86a2e66bb3552 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourceCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourceCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SearchInResource)] [SupportedBy("iOS")] - public class SearchInResourceCommand + public class SearchInResourceCommand: ICommand<SearchInResourceCommandResponse> { /// <summary> /// Gets or sets Frame id for resource to search in. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourcesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourcesCommand.cs index aa537bbc7ce8f4f2e6499916693ddfafd47924f7..9662dd44d90448b657fc10df2557f2df38762817 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourcesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SearchInResourcesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SearchInResources)] [SupportedBy("iOS")] - public class SearchInResourcesCommand + public class SearchInResourcesCommand: ICommand<SearchInResourcesCommandResponse> { /// <summary> /// Gets or sets String to search for. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SetCompositingBordersVisibleCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SetCompositingBordersVisibleCommand.cs index b214a95de3bdbc544bafe829cb04f2e42b220b2e..91672910d9748eac9c343121395a35778f499332 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SetCompositingBordersVisibleCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SetCompositingBordersVisibleCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SetCompositingBordersVisible)] [SupportedBy("iOS")] - public class SetCompositingBordersVisibleCommand + public class SetCompositingBordersVisibleCommand: ICommand<SetCompositingBordersVisibleCommandResponse> { /// <summary> /// Gets or sets True for showing compositing borders. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SetDocumentContentCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SetDocumentContentCommand.cs index a45587065603fed2389bae42cf3f6289692bb159..d228ab72a85c19ea36c3b4418f12982f710fdf89 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SetDocumentContentCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SetDocumentContentCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SetDocumentContent)] [SupportedBy("iOS")] - public class SetDocumentContentCommand + public class SetDocumentContentCommand: ICommand<SetDocumentContentCommandResponse> { /// <summary> /// Gets or sets Frame id to set HTML for. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SetEmulatedMediaCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SetEmulatedMediaCommand.cs index d002451a23f108b60cffb64c9f6da389550cbbcb..1f3fd90414be1eeef5edbbacc4b0b02558d3f677 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SetEmulatedMediaCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SetEmulatedMediaCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SetEmulatedMedia)] [SupportedBy("iOS")] - public class SetEmulatedMediaCommand + public class SetEmulatedMediaCommand: ICommand<SetEmulatedMediaCommandResponse> { /// <summary> /// Gets or sets Media type to emulate. Empty string disables the override. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SetScriptExecutionDisabledCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SetScriptExecutionDisabledCommand.cs index 4c77645ee90524a9a954c25a19b4064a02e04852..f3306dc3876d730b90bc8d3c7c4752571cd13cdf 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SetScriptExecutionDisabledCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SetScriptExecutionDisabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SetScriptExecutionDisabled)] [SupportedBy("iOS")] - public class SetScriptExecutionDisabledCommand + public class SetScriptExecutionDisabledCommand: ICommand<SetScriptExecutionDisabledCommandResponse> { /// <summary> /// Gets or sets Whether script execution should be disabled in the page. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SetShowPaintRectsCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SetShowPaintRectsCommand.cs index 6b280bdc8d79341c6eb1388dd40b99b1c5fb297c..1c42969116846dd4e4b5acebb55298c20f128643 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SetShowPaintRectsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SetShowPaintRectsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SetShowPaintRects)] [SupportedBy("iOS")] - public class SetShowPaintRectsCommand + public class SetShowPaintRectsCommand: ICommand<SetShowPaintRectsCommandResponse> { /// <summary> /// Gets or sets True for showing paint rectangles diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SetTouchEmulationEnabledCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SetTouchEmulationEnabledCommand.cs index 81089c0e5ed903f767410b1d9c2f9db710ce44a7..22d1b747ff270c7c4ff3b3da56139a20627f64e9 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SetTouchEmulationEnabledCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SetTouchEmulationEnabledCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SetTouchEmulationEnabled)] [SupportedBy("iOS")] - public class SetTouchEmulationEnabledCommand + public class SetTouchEmulationEnabledCommand: ICommand<SetTouchEmulationEnabledCommandResponse> { /// <summary> /// Gets or sets Whether the touch event emulation should be enabled. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SnapshotNodeCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SnapshotNodeCommand.cs index b253834557b2bc72d3d2ac835eda01b70adc76e6..292c9ca41b337ac916c4737404325ac911ccd63f 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SnapshotNodeCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SnapshotNodeCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SnapshotNode)] [SupportedBy("iOS")] - public class SnapshotNodeCommand + public class SnapshotNodeCommand: ICommand<SnapshotNodeCommandResponse> { /// <summary> /// Gets or sets Id of the node to snapshot. diff --git a/source/ChromeDevTools/Protocol/iOS/Page/SnapshotRectCommand.cs b/source/ChromeDevTools/Protocol/iOS/Page/SnapshotRectCommand.cs index d55647743c0d09580e829418343fd1abf11f1603..cde292c5b89012d7748cf42426a7a5f50c8f7fe4 100644 --- a/source/ChromeDevTools/Protocol/iOS/Page/SnapshotRectCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Page/SnapshotRectCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Page /// </summary> [Command(ProtocolName.Page.SnapshotRect)] [SupportedBy("iOS")] - public class SnapshotRectCommand + public class SnapshotRectCommand: ICommand<SnapshotRectCommandResponse> { /// <summary> /// Gets or sets X coordinate diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/CallFunctionOnCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/CallFunctionOnCommand.cs index 29b82c20e09480f00fdc36710b62d1b69b790be8..144825f34b919ce8ecf197f3b03f0fa1dc839c7b 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/CallFunctionOnCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/CallFunctionOnCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.CallFunctionOn)] [SupportedBy("iOS")] - public class CallFunctionOnCommand + public class CallFunctionOnCommand: ICommand<CallFunctionOnCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to call function on. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/DisableCommand.cs index 75ccc59486649314933f4e10b5b31592d965e3cb..37e9ced51818758885680df6ca40b35468f55f29 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/DisableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/DisableTypeProfilerCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/DisableTypeProfilerCommand.cs index c8a13362fcfcfab3c25220c24ad2e4fa8f368be8..ee67619d3da1dbe938b92dd192b2a83adc45a180 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/DisableTypeProfilerCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/DisableTypeProfilerCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.DisableTypeProfiler)] [SupportedBy("iOS")] - public class DisableTypeProfilerCommand + public class DisableTypeProfilerCommand: ICommand<DisableTypeProfilerCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/EnableCommand.cs index 637431012062a88657a46891dc69055a4be2a3a4..b4e58c72135b92474f0d13ab0058f458ce75b417 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/EnableCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/EnableTypeProfilerCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/EnableTypeProfilerCommand.cs index 3333151327ca551c446a911504c5ef4f628af37f..00a7f51a04c0d9184b38d9b3886e068fb922e7fd 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/EnableTypeProfilerCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/EnableTypeProfilerCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.EnableTypeProfiler)] [SupportedBy("iOS")] - public class EnableTypeProfilerCommand + public class EnableTypeProfilerCommand: ICommand<EnableTypeProfilerCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/EvaluateCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/EvaluateCommand.cs index a0ac366a74407fd681ba370c35dbf376a5a62971..bfaed6047fb61e114ad5fc13e245d11232b55199 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/EvaluateCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/EvaluateCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.Evaluate)] [SupportedBy("iOS")] - public class EvaluateCommand + public class EvaluateCommand: ICommand<EvaluateCommandResponse> { /// <summary> /// Gets or sets Expression to evaluate. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/GetBasicBlocksCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/GetBasicBlocksCommand.cs index 1a0da7748806de8ddcd87db66a2f1bb426e202a9..371ac0f48e716756cef1f65fe10787054878497b 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/GetBasicBlocksCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/GetBasicBlocksCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.GetBasicBlocks)] [SupportedBy("iOS")] - public class GetBasicBlocksCommand + public class GetBasicBlocksCommand: ICommand<GetBasicBlocksCommandResponse> { /// <summary> /// Gets or sets Indicates which sourceID information is requested for. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/GetCollectionEntriesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/GetCollectionEntriesCommand.cs index c6f656af4ac408e9acc32dac637998628ed9fa11..d65253f0b7eeff1f646c21ed3dd248d3f44e4a8b 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/GetCollectionEntriesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/GetCollectionEntriesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.GetCollectionEntries)] [SupportedBy("iOS")] - public class GetCollectionEntriesCommand + public class GetCollectionEntriesCommand: ICommand<GetCollectionEntriesCommandResponse> { /// <summary> /// Gets or sets Id of the collection to get entries for. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/GetDisplayablePropertiesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/GetDisplayablePropertiesCommand.cs index 01468536f8d64db25b3cc9857afdb86596e8ac25..c20aefcb7a20f70a14b5503610edfd64db0c0018 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/GetDisplayablePropertiesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/GetDisplayablePropertiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.GetDisplayableProperties)] [SupportedBy("iOS")] - public class GetDisplayablePropertiesCommand + public class GetDisplayablePropertiesCommand: ICommand<GetDisplayablePropertiesCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to return properties for. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/GetPropertiesCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/GetPropertiesCommand.cs index 14329f7a7ea93851da66cead061cdca7de3c8a48..b8f87fca852ce17f902e459707483d511c6d77ec 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/GetPropertiesCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/GetPropertiesCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.GetProperties)] [SupportedBy("iOS")] - public class GetPropertiesCommand + public class GetPropertiesCommand: ICommand<GetPropertiesCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to return properties for. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/GetRuntimeTypesForVariablesAtOffsetsCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/GetRuntimeTypesForVariablesAtOffsetsCommand.cs index 428888a9205e9c2659de1a0a291756f6a734a582..18195a47c15e5c03d1b2f2c501fa7772236c2886 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/GetRuntimeTypesForVariablesAtOffsetsCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/GetRuntimeTypesForVariablesAtOffsetsCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.GetRuntimeTypesForVariablesAtOffsets)] [SupportedBy("iOS")] - public class GetRuntimeTypesForVariablesAtOffsetsCommand + public class GetRuntimeTypesForVariablesAtOffsetsCommand: ICommand<GetRuntimeTypesForVariablesAtOffsetsCommandResponse> { /// <summary> /// Gets or sets An array of type locations we're requesting information for. Results are expected in the same order they're sent in. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/ParseCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/ParseCommand.cs index fb07bcfbb5bdcad9707687aa7d8692002a2b92cc..fadcb33d6da5570574d8b050a875b72c7423bf5f 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/ParseCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/ParseCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.Parse)] [SupportedBy("iOS")] - public class ParseCommand + public class ParseCommand: ICommand<ParseCommandResponse> { /// <summary> /// Gets or sets Source code to parse. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectCommand.cs index 3708870e2614a8f529f4b26a304ea944aa3bacd2..2d532f2c437fddcf81657deb26ee576e1e67f678 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.ReleaseObject)] [SupportedBy("iOS")] - public class ReleaseObjectCommand + public class ReleaseObjectCommand: ICommand<ReleaseObjectCommandResponse> { /// <summary> /// Gets or sets Identifier of the object to release. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectGroupCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectGroupCommand.cs index 0b721a13449363c62608b404e19a3061527b245a..dbf11dbdd403cc6771048328bbd1dce1ce482657 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectGroupCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/ReleaseObjectGroupCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.ReleaseObjectGroup)] [SupportedBy("iOS")] - public class ReleaseObjectGroupCommand + public class ReleaseObjectGroupCommand: ICommand<ReleaseObjectGroupCommandResponse> { /// <summary> /// Gets or sets Symbolic object group name. diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/RunCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/RunCommand.cs index 35d5caa5f0d69c4658a7141ccc7c53509a091cc5..4400b0d01862423eea199dae2269d88a2716d3e9 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/RunCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/RunCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.Run)] [SupportedBy("iOS")] - public class RunCommand + public class RunCommand: ICommand<RunCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Runtime/SaveResultCommand.cs b/source/ChromeDevTools/Protocol/iOS/Runtime/SaveResultCommand.cs index ae58255c427b40b57d087c0facd9413616eeb6d1..ae6de868f69ef6d2093611b7df2466c4493b41f6 100644 --- a/source/ChromeDevTools/Protocol/iOS/Runtime/SaveResultCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Runtime/SaveResultCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Runtime /// </summary> [Command(ProtocolName.Runtime.SaveResult)] [SupportedBy("iOS")] - public class SaveResultCommand + public class SaveResultCommand: ICommand<SaveResultCommandResponse> { /// <summary> /// Gets or sets Id or value of the object to save. diff --git a/source/ChromeDevTools/Protocol/iOS/Timeline/StartCommand.cs b/source/ChromeDevTools/Protocol/iOS/Timeline/StartCommand.cs index bbb735f63b10c7127e3ce61f1e3d719ed9eaa2d0..8f1561b4f2850fa13375715d93456d6ccb22c5d5 100644 --- a/source/ChromeDevTools/Protocol/iOS/Timeline/StartCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Timeline/StartCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Timeline /// </summary> [Command(ProtocolName.Timeline.Start)] [SupportedBy("iOS")] - public class StartCommand + public class StartCommand: ICommand<StartCommandResponse> { /// <summary> /// Gets or sets Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5. diff --git a/source/ChromeDevTools/Protocol/iOS/Timeline/StopCommand.cs b/source/ChromeDevTools/Protocol/iOS/Timeline/StopCommand.cs index 9e958eec629d33137de75a70d9703fafe27c6b48..c726f3aa1161a8ba64d56a9dc57740e504032def 100644 --- a/source/ChromeDevTools/Protocol/iOS/Timeline/StopCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Timeline/StopCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Timeline /// </summary> [Command(ProtocolName.Timeline.Stop)] [SupportedBy("iOS")] - public class StopCommand + public class StopCommand: ICommand<StopCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Worker/CanInspectWorkersCommand.cs b/source/ChromeDevTools/Protocol/iOS/Worker/CanInspectWorkersCommand.cs index 955fd0554d9b180729109741488a8d5240989d20..5f9d2f16a2d440c5d83eb525b90a62880a3611a6 100644 --- a/source/ChromeDevTools/Protocol/iOS/Worker/CanInspectWorkersCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Worker/CanInspectWorkersCommand.cs @@ -9,7 +9,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Worker /// </summary> [Command(ProtocolName.Worker.CanInspectWorkers)] [SupportedBy("iOS")] - public class CanInspectWorkersCommand + public class CanInspectWorkersCommand: ICommand<CanInspectWorkersCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Worker/ConnectToWorkerCommand.cs b/source/ChromeDevTools/Protocol/iOS/Worker/ConnectToWorkerCommand.cs index cf97a6d9e6c69eccfa3be3c14958a06c9570f0e4..8e634934ef9f75ecda9aa42184e3973dd7b56446 100644 --- a/source/ChromeDevTools/Protocol/iOS/Worker/ConnectToWorkerCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Worker/ConnectToWorkerCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Worker { [Command(ProtocolName.Worker.ConnectToWorker)] [SupportedBy("iOS")] - public class ConnectToWorkerCommand + public class ConnectToWorkerCommand: ICommand<ConnectToWorkerCommandResponse> { /// <summary> /// Gets or sets WorkerId diff --git a/source/ChromeDevTools/Protocol/iOS/Worker/DisableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Worker/DisableCommand.cs index 4e9cd81273c5bf8872fb615cc99123240c5356f8..28999f97beef372cf5374de52ae3cf8b857f7571 100644 --- a/source/ChromeDevTools/Protocol/iOS/Worker/DisableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Worker/DisableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Worker { [Command(ProtocolName.Worker.Disable)] [SupportedBy("iOS")] - public class DisableCommand + public class DisableCommand: ICommand<DisableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Worker/DisconnectFromWorkerCommand.cs b/source/ChromeDevTools/Protocol/iOS/Worker/DisconnectFromWorkerCommand.cs index f6e671e54171add6d16a4609703b7ca99223b9ec..d4e96141963cc529b870d9c0e42a685f2f3ef790 100644 --- a/source/ChromeDevTools/Protocol/iOS/Worker/DisconnectFromWorkerCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Worker/DisconnectFromWorkerCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Worker { [Command(ProtocolName.Worker.DisconnectFromWorker)] [SupportedBy("iOS")] - public class DisconnectFromWorkerCommand + public class DisconnectFromWorkerCommand: ICommand<DisconnectFromWorkerCommandResponse> { /// <summary> /// Gets or sets WorkerId diff --git a/source/ChromeDevTools/Protocol/iOS/Worker/EnableCommand.cs b/source/ChromeDevTools/Protocol/iOS/Worker/EnableCommand.cs index cfaf51b5d815ae32bbd846af2fe4fafd390bee5e..ce54c396add09751e66bda5921a35d3975f53308 100644 --- a/source/ChromeDevTools/Protocol/iOS/Worker/EnableCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Worker/EnableCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Worker { [Command(ProtocolName.Worker.Enable)] [SupportedBy("iOS")] - public class EnableCommand + public class EnableCommand: ICommand<EnableCommandResponse> { } } diff --git a/source/ChromeDevTools/Protocol/iOS/Worker/SendMessageToWorkerCommand.cs b/source/ChromeDevTools/Protocol/iOS/Worker/SendMessageToWorkerCommand.cs index b59081050e0392bc73dc0db4af60ca0776023ef7..791e89f25d3f952b73bca26d6f2d8c6a3ee74eb6 100644 --- a/source/ChromeDevTools/Protocol/iOS/Worker/SendMessageToWorkerCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Worker/SendMessageToWorkerCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Worker { [Command(ProtocolName.Worker.SendMessageToWorker)] [SupportedBy("iOS")] - public class SendMessageToWorkerCommand + public class SendMessageToWorkerCommand: ICommand<SendMessageToWorkerCommandResponse> { /// <summary> /// Gets or sets WorkerId diff --git a/source/ChromeDevTools/Protocol/iOS/Worker/SetAutoconnectToWorkersCommand.cs b/source/ChromeDevTools/Protocol/iOS/Worker/SetAutoconnectToWorkersCommand.cs index 3163e97b8c6d48e96a8f4baec23d30736be38b41..56f876b72fbab3e0eb1014be2024a9975cee4669 100644 --- a/source/ChromeDevTools/Protocol/iOS/Worker/SetAutoconnectToWorkersCommand.cs +++ b/source/ChromeDevTools/Protocol/iOS/Worker/SetAutoconnectToWorkersCommand.cs @@ -6,7 +6,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.iOS.Worker { [Command(ProtocolName.Worker.SetAutoconnectToWorkers)] [SupportedBy("iOS")] - public class SetAutoconnectToWorkersCommand + public class SetAutoconnectToWorkersCommand: ICommand<SetAutoconnectToWorkersCommandResponse> { /// <summary> /// Gets or sets Value diff --git a/source/ChromeDevTools/RemoteChromeProcess.cs b/source/ChromeDevTools/RemoteChromeProcess.cs new file mode 100644 index 0000000000000000000000000000000000000000..6c061ae7e33f131d8338faacc30415545ee8e9f4 --- /dev/null +++ b/source/ChromeDevTools/RemoteChromeProcess.cs @@ -0,0 +1,47 @@ +using System; +using System.Net.Http; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace MasterDevs.ChromeDevTools +{ + public class RemoteChromeProcess : IChromeProcess + { + private readonly HttpClient http; + + public RemoteChromeProcess(string remoteDebuggingUri) + : this(new Uri(remoteDebuggingUri)) + { + + } + + public RemoteChromeProcess(Uri remoteDebuggingUri) + { + RemoteDebuggingUri = remoteDebuggingUri; + + http = new HttpClient + { + BaseAddress = RemoteDebuggingUri + }; + } + + public Uri RemoteDebuggingUri { get; } + + public virtual void Dispose() + { + http.Dispose(); + } + + public async Task<ChromeSessionInfo[]> GetSessionInfo() + { + string json = await http.GetStringAsync("/json"); + return JsonConvert.DeserializeObject<ChromeSessionInfo[]>(json); + } + + public async Task<ChromeSessionInfo> StartNewSession() + { + string json = await http.GetStringAsync("/json/new"); + return JsonConvert.DeserializeObject<ChromeSessionInfo>(json); + } + } +} \ No newline at end of file diff --git a/source/ChromeDevTools/StubbornDirectoryCleaner.cs b/source/ChromeDevTools/StubbornDirectoryCleaner.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d448698d953da192586d1406278ccfc5db1cfb2 --- /dev/null +++ b/source/ChromeDevTools/StubbornDirectoryCleaner.cs @@ -0,0 +1,24 @@ +using System.IO; +using System.Threading; + +namespace MasterDevs.ChromeDevTools +{ + public class StubbornDirectoryCleaner : IDirectoryCleaner + { + public void Delete(DirectoryInfo dir) + { + while (true) + { + try + { + dir.Delete(true); + return; + } + catch + { + Thread.Sleep(500); + } + } + } + } +} \ No newline at end of file diff --git a/source/MasterDevs.ChromeDevTools.Tests/SerializationTests.cs b/source/MasterDevs.ChromeDevTools.Tests/SerializationTests.cs index 400ca82b27f61a6f9c0e7e738aac56f3906dcdaf..05fef10b4ce46c9a1d948c2aa8cb61045ed24be7 100644 --- a/source/MasterDevs.ChromeDevTools.Tests/SerializationTests.cs +++ b/source/MasterDevs.ChromeDevTools.Tests/SerializationTests.cs @@ -1,12 +1,7 @@ -using MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger; -using MasterDevs.ChromeDevTools.Protocol.Chrome.DOM; +using MasterDevs.ChromeDevTools.Protocol.Chrome.DOM; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using MasterDevs.ChromeDevTools.Protocol.Chrome.Runtime; namespace MasterDevs.ChromeDevTools.Tests { diff --git a/source/ProtocolGenerator.Tests/CommandTests.cs b/source/ProtocolGenerator.Tests/CommandTests.cs index e4835cf75db2f9c041a724f7cb26822ee5c8a95f..ee0616665f37607de1844fd906d1313a89b2eed7 100644 --- a/source/ProtocolGenerator.Tests/CommandTests.cs +++ b/source/ProtocolGenerator.Tests/CommandTests.cs @@ -12,11 +12,12 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests { [TestMethod] [DeploymentItem(DeploymentItems.Inspector11)] - [DeploymentItem(DeploymentItems.Protocol)] + [DeploymentItem(DeploymentItems.BrowserProtocol)] + [DeploymentItem(DeploymentItems.JsProtocol)] public void EqualsTest() { - var inspector11 = ProtocolProcessor.LoadProtocol(DeploymentItems.Inspector11, "inspector-1.1"); - var protocol = ProtocolProcessor.LoadProtocol(DeploymentItems.Protocol, "protocol"); + var inspector11 = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.Inspector11 }, "inspector-1.1"); + var protocol = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.BrowserProtocol, DeploymentItems.JsProtocol }, "protocol"); ProtocolProcessor.ResolveTypeReferences(inspector11, new Dictionary<string, string>()); ProtocolProcessor.ResolveTypeReferences(protocol, new Dictionary<string, string>()); diff --git a/source/ProtocolGenerator.Tests/DeploymentItems.cs b/source/ProtocolGenerator.Tests/DeploymentItems.cs index dec0e235aab89c6757e46a6f6e525dfaf32766c2..6922aac7a10054631f88491816d867ece1d056bc 100644 --- a/source/ProtocolGenerator.Tests/DeploymentItems.cs +++ b/source/ProtocolGenerator.Tests/DeploymentItems.cs @@ -10,7 +10,8 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests { public const string Inspector10 = "Inspector-1.0.json"; public const string Inspector11 = "Inspector-1.1.json"; - public const string Protocol = "protocol.json"; + public const string BrowserProtocol = "browser_protocol.json"; + public const string JsProtocol = "js_protocol.json"; public const string InspectoriOS8 = "Inspector-ios-8.0.json"; } } diff --git a/source/ProtocolGenerator.Tests/MasterDevs.ChromeDevTools.ProtocolGenerator.Tests.csproj b/source/ProtocolGenerator.Tests/MasterDevs.ChromeDevTools.ProtocolGenerator.Tests.csproj index 8e37f6572a6f57b277fbd82e2e651b5ae863513c..e72741eea762403e2f84041017f4a39ce7e2b20a 100644 --- a/source/ProtocolGenerator.Tests/MasterDevs.ChromeDevTools.ProtocolGenerator.Tests.csproj +++ b/source/ProtocolGenerator.Tests/MasterDevs.ChromeDevTools.ProtocolGenerator.Tests.csproj @@ -67,12 +67,6 @@ <Link>Inspector-1.0.json</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> - <None Include="..\ProtocolGenerator\Inspector-iOS-8.0.json"> - <Link>Inspector-iOS-8.0.json</Link> - </None> - <None Include="..\ProtocolGenerator\protocol.json"> - <Link>protocol.json</Link> - </None> </ItemGroup> <Choose> <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'"> diff --git a/source/ProtocolGenerator.Tests/ProtocolProcessorTests.cs b/source/ProtocolGenerator.Tests/ProtocolProcessorTests.cs index 371d1adbd30d98380de0a837e17c090d22a54c72..7995f7d6ce27208a51eb16c41d5655684009d62a 100644 --- a/source/ProtocolGenerator.Tests/ProtocolProcessorTests.cs +++ b/source/ProtocolGenerator.Tests/ProtocolProcessorTests.cs @@ -16,7 +16,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests [DeploymentItem(DeploymentItems.Inspector10)] public void ResolveTypeReferencesCommandParameterTest() { - Protocol p = ProtocolProcessor.LoadProtocol(DeploymentItems.Inspector10, "Chrome-1.0"); + Protocol p = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.Inspector10 }, "Chrome-1.0"); ProtocolProcessor.ResolveTypeReferences(p, new Dictionary<string, string>()); var evaluateCommand = p.GetDomain("Runtime").GetCommand("evaluate"); @@ -29,7 +29,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests [DeploymentItem(DeploymentItems.Inspector10)] public void ResolveTypeReferencesCommandParameterTest2() { - Protocol p = ProtocolProcessor.LoadProtocol(DeploymentItems.Inspector10, "Chrome-1.0"); + Protocol p = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.Inspector10 }, "Chrome-1.0"); ProtocolProcessor.ResolveTypeReferences(p, new Dictionary<string, string>()); var addInspectedNodeCommand = p.GetDomain("Console").GetCommand("addInspectedNode"); @@ -45,7 +45,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests Dictionary<string, string> explicitMappings = new Dictionary<string, string>(); explicitMappings.Add("Page.Cookie", "Network.Cookie"); - Protocol p = ProtocolProcessor.LoadProtocol(DeploymentItems.InspectoriOS8, "iOS-8.0"); + Protocol p = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.InspectoriOS8 }, "iOS-8.0"); ProtocolProcessor.ResolveTypeReferences(p, explicitMappings); var getCookiesCommand = p.GetDomain("Page").GetCommand("getCookies"); @@ -61,7 +61,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests Dictionary<string, string> explicitMappings = new Dictionary<string, string>(); explicitMappings.Add("GenericTypes.SearchMatch", "Debugger.SearchMatch"); - Protocol p = ProtocolProcessor.LoadProtocol(DeploymentItems.InspectoriOS8, "iOS-8.0"); + Protocol p = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.InspectoriOS8 }, "iOS-8.0"); ProtocolProcessor.ResolveTypeReferences(p, explicitMappings); var searchInResourceCommand = p.GetDomain("Page").GetCommand("searchInResource"); diff --git a/source/ProtocolGenerator.Tests/TypeTests.cs b/source/ProtocolGenerator.Tests/TypeTests.cs index 1b0f6d76e2580c2da2cc4f18d6049dfd255ab42b..21f44b6ce292709b48c96080d947051a4f3d2e1f 100644 --- a/source/ProtocolGenerator.Tests/TypeTests.cs +++ b/source/ProtocolGenerator.Tests/TypeTests.cs @@ -15,7 +15,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests [DeploymentItem(DeploymentItems.Inspector10)] public void TypeNameTest() { - Protocol p = ProtocolProcessor.LoadProtocol(DeploymentItems.Inspector10, "Chrome-1.0"); + Protocol p = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.Inspector10 }, "Chrome-1.0"); var evaluateCommand = p.GetDomain("Page").GetCommand("searchInResource"); var result = evaluateCommand.Returns.Single(); @@ -27,7 +27,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator.Tests [DeploymentItem(DeploymentItems.Inspector10)] public void ToStringTest() { - Protocol p = ProtocolProcessor.LoadProtocol(DeploymentItems.Inspector10, "Chrome-1.0"); + Protocol p = ProtocolProcessor.LoadProtocol(new[] { DeploymentItems.Inspector10 }, "Chrome-1.0"); var evaluateCommand = p.GetDomain("Page").GetCommand("searchInResource"); var result = evaluateCommand.Returns.Single(); diff --git a/source/ProtocolGenerator/Command.cs b/source/ProtocolGenerator/Command.cs index 1bc90d0866630fb1d6b44d2f66d6c5f92ee2d932..59199f9d2b014ea7f55530dc1133e9cd2053b364 100644 --- a/source/ProtocolGenerator/Command.cs +++ b/source/ProtocolGenerator/Command.cs @@ -3,6 +3,7 @@ using System.Collections.ObjectModel; using System.Text; using System.Linq; using System; +using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.ProtocolGenerator { @@ -54,6 +55,9 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator set; } + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } + public override bool Equals(object obj) { var other = obj as Command; @@ -81,7 +85,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator { hash = hash * 23 + this.Error.GetHashCode(); } - + hash = hash * 23 + this.Parameters.GetCollectionHashCode(); return hash; } diff --git a/source/ProtocolGenerator/Domain.cs b/source/ProtocolGenerator/Domain.cs index a707947291ead3d5f658dbf253806220c0e99ab8..16815cb1dc521d415dd83c8f0ef86fa9ebd96733 100644 --- a/source/ProtocolGenerator/Domain.cs +++ b/source/ProtocolGenerator/Domain.cs @@ -2,6 +2,7 @@ using System; using System.Collections.ObjectModel; using System.Linq; +using Newtonsoft.Json.Linq; namespace MasterDevs.ChromeDevTools.ProtocolGenerator { @@ -51,6 +52,15 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator set; } + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } + + [JsonProperty("deprecated")] + public bool IsDeprecated { get; set; } + + + public string[] Dependencies { get; set; } + public Command GetCommand(string name) { return this.Commands.SingleOrDefault(c => string.Equals(c.Name, name, StringComparison.OrdinalIgnoreCase)); diff --git a/source/ProtocolGenerator/Event.cs b/source/ProtocolGenerator/Event.cs index 2456dc94e67fcaace2dd87c8fabf9cedf7230380..fe6e146a4cccdf25b72b22356b6ad7f869ff1bd5 100644 --- a/source/ProtocolGenerator/Event.cs +++ b/source/ProtocolGenerator/Event.cs @@ -1,4 +1,5 @@ using System.Collections.ObjectModel; +using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.ProtocolGenerator { @@ -27,5 +28,8 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator get; set; } + + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } } } diff --git a/source/ProtocolGenerator/MasterDevs.ChromeDevTools.ProtocolGenerator.csproj b/source/ProtocolGenerator/MasterDevs.ChromeDevTools.ProtocolGenerator.csproj index cd0b46db0a4800c8797c327e4eecba16136e57c2..2f280b1286361d076100599b2fd6a4da02dbdaf2 100644 --- a/source/ProtocolGenerator/MasterDevs.ChromeDevTools.ProtocolGenerator.csproj +++ b/source/ProtocolGenerator/MasterDevs.ChromeDevTools.ProtocolGenerator.csproj @@ -67,6 +67,9 @@ </ItemGroup> <ItemGroup> <None Include="App.config" /> + <None Include="browser_protocol.json"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="Inspector-0.1.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> @@ -88,12 +91,12 @@ <None Include="Inspector-iOS-9.3.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="js_protocol.json"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="packages.config"> <SubType>Designer</SubType> </None> - <None Include="protocol.json"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> diff --git a/source/ProtocolGenerator/Program.cs b/source/ProtocolGenerator/Program.cs index 1cddb26f0cbf041e110faf0ea12a49bb3b286c4f..0550241a8be747f498e105e6753ff538dda750b5 100644 --- a/source/ProtocolGenerator/Program.cs +++ b/source/ProtocolGenerator/Program.cs @@ -1,6 +1,4 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; @@ -28,15 +26,20 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator { // At this point in time, we only process the most recent Chrome // and iOS (Safari) protocols. - Dictionary<string, string> protocolFiles = new Dictionary<string, string>(); + Dictionary<string, string[]> protocolFiles = new Dictionary<string, string[]> + { + {"Chrome", new [] { "js_protocol.json", "browser_protocol.json" } }, + {"iOS", new [] { "Inspector-iOS-9.3.json" } } + }; + + //protocolFiles.Add("Chrome-0.1", "Inspector-0.1.json"); //protocolFiles.Add("Chrome-1.0", "Inspector-1.0.json"); //protocolFiles.Add("Chrome", "Inspector-1.1.json"); - protocolFiles.Add("Chrome", "protocol.json"); //protocolFiles.Add("iOS-7.0", "Inspector-iOS-7.0.json"); //protocolFiles.Add("iOS-8.0", "Inspector-iOS-8.0.json"); //protocolFiles.Add("iOS-9.0", "Inspector-iOS-9.0.json"); - protocolFiles.Add("iOS", "Inspector-iOS-9.3.json"); + Collection<Protocol> protocols = new Collection<Protocol>(); @@ -134,7 +137,10 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator { itemsType = items.TypeReference; } - domainDictionary[type.Name] = domain + "." + itemsType + "[]"; + if (IsGeneratedNativeType(itemsType)) + domainDictionary[type.Name] = itemsType + "[]"; + else + domainDictionary[type.Name] = domain + "." + itemsType + "[]"; } private static void WriteProtocolClasses(DirectoryInfo directory, string ns, string domainName, IEnumerable<Type> types, IEnumerable<Command> commands, IEnumerable<Event> events) @@ -292,6 +298,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator private static void WriteCommand(DirectoryInfo domainDirectoryInfo, string ns, string commandName, string description, IEnumerable<Property> parameters, IEnumerable<string> supportedBy) { var className = ToCamelCase(commandName) + CommandSubclass; + var responseClassName = ToCamelCase(commandName) + CommandResponseSubclass; var sb = new StringBuilder(); sb.AppendFormat("using MasterDevs.ChromeDevTools;"); sb.AppendLine(); @@ -311,7 +318,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator sb.AppendFormat("\t[{0}({1}.{2}.{3})]", CommandAttribute, ProtocolNameClass, domainDirectoryInfo.Name, ToCamelCase(commandName)); sb.AppendLine(); WriteSupportedBy(sb, supportedBy); - sb.AppendFormat("\tpublic class {0}", className); + sb.AppendFormat("\tpublic class {0}: ICommand<{1}>", className, responseClassName); sb.AppendLine(); sb.AppendLine("\t{"); foreach (var parameterProperty in parameters) @@ -327,7 +334,8 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator { if (null == type) return; if (type.Enum.Any()) WriteTypeEnum(domainDirectoryInfo, ns, type); - if (type.Properties.Any()) WriteTypeClass(domainDirectoryInfo, ns, type); + /*if (type.Properties.Any())*/ + WriteTypeClass(domainDirectoryInfo, ns, type); WriteTypeSimple(domainDirectoryInfo, type); } @@ -475,6 +483,20 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator } } + private static bool IsGeneratedNativeType(string propertyType) + { + switch (propertyType) + { + case "double": + case "long": + case "bool": + case "object": + return true; + default: + return false; + } + } + private static string GeneratePropertyName(string propertyName) { return ToCamelCase(propertyName); diff --git a/source/ProtocolGenerator/Property.cs b/source/ProtocolGenerator/Property.cs index 9002cadf8e2aca6267369b3cb830540bab33b4df..2e461dbc70b0521a7f64bf39c91fa939bdf2339d 100644 --- a/source/ProtocolGenerator/Property.cs +++ b/source/ProtocolGenerator/Property.cs @@ -16,5 +16,8 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator get; set; } + + [JsonProperty("deprecated")] + public bool IsDeprecated { get; set; } } } diff --git a/source/ProtocolGenerator/Protocol.cs b/source/ProtocolGenerator/Protocol.cs index 1f5ff07a73dd3593c4dc464a322093524c1f3fac..a2f692395e9e003b4b992855ac341de2ff768f0f 100644 --- a/source/ProtocolGenerator/Protocol.cs +++ b/source/ProtocolGenerator/Protocol.cs @@ -5,57 +5,27 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator { public class Protocol { - public Protocol() - { - this.Compatible = new Collection<string>(); - this.Domains = new Collection<Domain>(); - } + public Collection<string> Compatible { get; set; } = new Collection<string>(); - public Collection<string> Compatible - { - get; - set; - } - - public Version Version - { - get; - set; - } + public Version Version { get; set; } - public Collection<Domain> Domains - { - get; - set; - } + public Collection<Domain> Domains { get; set; } = new Collection<Domain>(); - public string SourceFile - { - get; - set; - } + public string[] SourceFiles { get; set; } - public string Alias - { - get; - set; - } + public string Alias { get; set; } public Domain GetDomain(string name) { - return this.Domains.SingleOrDefault(d => string.Equals(d.Name, name, System.StringComparison.OrdinalIgnoreCase)); + return Domains.SingleOrDefault(d => string.Equals(d.Name, name, System.StringComparison.OrdinalIgnoreCase)); } public override string ToString() { - if(this.SourceFile != null) - { - return $"{this.Alias} ({this.SourceFile})"; - } - else - { - return this.Alias; - } + if (SourceFiles?.Any() == true) + return $"{Alias} ({string.Join(", ", SourceFiles)})"; + + return Alias; } } } diff --git a/source/ProtocolGenerator/ProtocolProcessor.cs b/source/ProtocolGenerator/ProtocolProcessor.cs index 2286424ad44295645d84ee2932fa53e860bae2e2..481821acf7b9d41661e4fa89548a232df866c75b 100644 --- a/source/ProtocolGenerator/ProtocolProcessor.cs +++ b/source/ProtocolGenerator/ProtocolProcessor.cs @@ -3,8 +3,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MasterDevs.ChromeDevTools.ProtocolGenerator { @@ -82,22 +80,39 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator property.TypeReference = explicitMappings[fullReferenceName]; } } - else if(property.Items != null) + else if (property.Items != null) { ResolveTypeReferences(protocol, domain, property.Items, explicitMappings); } } - public static Protocol LoadProtocol(string path, string alias) + public static Protocol LoadProtocol(string[] paths, string alias) { - string json = File.ReadAllText(path); - JsonSerializerSettings settings = new JsonSerializerSettings(); - settings.MissingMemberHandling = MissingMemberHandling.Error; - settings.MetadataPropertyHandling = MetadataPropertyHandling.Ignore; + if (paths == null || paths.Length < 1) + throw new ArgumentException("Must specify at least one path", nameof(paths)); + + JsonSerializerSettings settings = new JsonSerializerSettings + { + MissingMemberHandling = MissingMemberHandling.Error, + MetadataPropertyHandling = MetadataPropertyHandling.Ignore + }; + + string json = File.ReadAllText(paths[0]); Protocol p = JsonConvert.DeserializeObject<Protocol>(json, settings); - p.SourceFile = path; + p.SourceFiles = paths; p.Alias = alias; + if (paths.Length > 1) + { + foreach (var path in paths.Skip(1)) + { + json = File.ReadAllText(path); + Protocol partial = JsonConvert.DeserializeObject<Protocol>(json, settings); + foreach (var domain in partial.Domains) + p.Domains.Add(domain); + } + } + foreach (var domain in p.Domains) { foreach (var command in domain.Commands) diff --git a/source/ProtocolGenerator/Type.cs b/source/ProtocolGenerator/Type.cs index 7d8f8cfc9850d3fb9b9691e0d5a92b3a14e67bee..1fbeff975ea37fad1663ebd0e667a9be6896d71b 100644 --- a/source/ProtocolGenerator/Type.cs +++ b/source/ProtocolGenerator/Type.cs @@ -87,6 +87,10 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator } } } + + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } + public override bool Equals(object obj) { var other = obj as Type; diff --git a/source/ProtocolGenerator/protocol.json b/source/ProtocolGenerator/browser_protocol.json similarity index 61% rename from source/ProtocolGenerator/protocol.json rename to source/ProtocolGenerator/browser_protocol.json index ea0dc88f5cdbce651b1d4a148418743307deb51f..a8edd99e01380b00c225eadaf99cedb99a5c02cd 100644 --- a/source/ProtocolGenerator/protocol.json +++ b/source/ProtocolGenerator/browser_protocol.json @@ -1,8 +1,8 @@ -{ - "version": { "major": "1", "minor": "1" }, +{ + "version": { "major": "1", "minor": "2" }, "domains": [{ "domain": "Inspector", - "hidden": true, + "experimental": true, "types": [], "commands": [ { @@ -15,38 +15,30 @@ } ], "events": [ - { - "name": "evaluateForTestInFrontend", - "parameters": [ - { "name": "testCallId", "type": "integer" }, - { "name": "script", "type": "string" } - ] - }, - { - "name": "inspect", - "parameters": [ - { "name": "object", "$ref": "Runtime.RemoteObject" }, - { "name": "hints", "type": "object" } - ] - }, { "name": "detached", "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.", "parameters": [ { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." } - ], - "handlers": ["browser"] + ] }, { "name": "targetCrashed", - "description": "Fired when debugging target has crashed", - "handlers": ["browser"] + "description": "Fired when debugging target has crashed" } ] }, { "domain": "Memory", - "hidden": true, + "experimental": true, + "types": [ + { + "id": "PressureLevel", + "type": "string", + "enum": ["moderate", "critical"], + "description": "Memory pressure level." + } + ], "commands": [ { "name": "getDOMCounters", @@ -55,17 +47,32 @@ { "name": "nodes", "type": "integer" }, { "name": "jsEventListeners", "type": "integer" } ] + }, + { + "name": "setPressureNotificationsSuppressed", + "description": "Enable/disable suppressing memory pressure notifications in all processes.", + "parameters": [ + { "name": "suppressed", "type": "boolean", "description": "If true, memory pressure notifications will be suppressed."} + ] + }, + { + "name": "simulatePressureNotification", + "description": "Simulate a memory pressure notification in all processes.", + "parameters": [ + { "name": "level", "$ref": "PressureLevel", "description": "Memory pressure level of the notification." } + ] } ] }, { "domain": "Page", "description": "Actions and events related to the inspected page belong to the page domain.", + "dependencies": ["Debugger", "DOM"], "types": [ { "id": "ResourceType", "type": "string", - "enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "WebSocket", "Other"], + "enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "EventSource", "WebSocket", "Manifest", "Other"], "description": "Resource type as it was perceived by the rendering engine." }, { @@ -87,6 +94,21 @@ { "name": "mimeType", "type": "string", "description": "Frame document's mimeType as determined by the browser." } ] }, + { + "id": "FrameResource", + "type": "object", + "description": "Information about the Resource on the page.", + "properties": [ + { "name": "url", "type": "string", "description": "Resource URL." }, + { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." }, + { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, + { "name": "lastModified", "$ref": "Network.Timestamp", "description": "last-modified timestamp as reported by server.", "optional": true }, + { "name": "contentSize", "type": "number", "description": "Resource content size.", "optional": true }, + { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." }, + { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." } + ], + "experimental": true + }, { "id": "FrameResourceTree", "type": "object", @@ -94,27 +116,22 @@ "properties": [ { "name": "frame", "$ref": "Frame", "description": "Frame information for this tree item." }, { "name": "childFrames", "type": "array", "optional": true, "items": { "$ref": "FrameResourceTree" }, "description": "Child frames." }, - { "name": "resources", "type": "array", - "items": { - "type": "object", - "properties": [ - { "name": "url", "type": "string", "description": "Resource URL." }, - { "name": "type", "$ref": "ResourceType", "description": "Type of this resource." }, - { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." }, - { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load." }, - { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading." } - ] - }, - "description": "Information about frame resources." - } - ], - "hidden": true + { "name": "resources", "type": "array", "items": { "$ref": "FrameResource" }, "description": "Information about frame resources." } + ], + "experimental": true }, { "id": "ScriptIdentifier", "type": "string", "description": "Unique script identifier.", - "hidden": true + "experimental": true + }, + { + "id": "TransitionType", + "type": "string", + "description": "Transition type.", + "experimental": true, + "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated", "other"] }, { "id": "NavigationEntry", @@ -123,36 +140,89 @@ "properties": [ { "name": "id", "type": "integer", "description": "Unique id of the navigation history entry." }, { "name": "url", "type": "string", "description": "URL of the navigation history entry." }, - { "name": "title", "type": "string", "description": "Title of the navigation history entry." } + { "name": "userTypedURL", "type": "string", "description": "URL that the user typed in the url bar." }, + { "name": "title", "type": "string", "description": "Title of the navigation history entry." }, + { "name": "transitionType", "$ref": "TransitionType", "description": "Transition type." } ], - "hidden": true + "experimental": true }, { "id": "ScreencastFrameMetadata", "type": "object", - "description": "Screencast frame metadata", + "description": "Screencast frame metadata.", + "properties": [ + { "name": "offsetTop", "type": "number", "experimental": true, "description": "Top offset in DIP." }, + { "name": "pageScaleFactor", "type": "number", "experimental": true, "description": "Page scale factor." }, + { "name": "deviceWidth", "type": "number", "experimental": true, "description": "Device screen width in DIP." }, + { "name": "deviceHeight", "type": "number", "experimental": true, "description": "Device screen height in DIP." }, + { "name": "scrollOffsetX", "type": "number", "experimental": true, "description": "Position of horizontal scroll in CSS pixels." }, + { "name": "scrollOffsetY", "type": "number", "experimental": true, "description": "Position of vertical scroll in CSS pixels." }, + { "name": "timestamp", "type": "number", "optional": true, "experimental": true, "description": "Frame swap timestamp." } + ], + "experimental": true + }, + { + "id": "DialogType", + "description": "Javascript dialog type.", + "type": "string", + "enum": ["alert", "confirm", "prompt", "beforeunload"], + "experimental": true + }, + { + "id": "AppManifestError", + "description": "Error while paring app manifest.", + "type": "object", + "properties": [ + { "name": "message", "type": "string", "description": "Error message." }, + { "name": "critical", "type": "integer", "description": "If criticial, this is a non-recoverable parse error." }, + { "name": "line", "type": "integer", "description": "Error line." }, + { "name": "column", "type": "integer", "description": "Error column." } + ], + "experimental": true + }, + { + "id": "NavigationResponse", + "description": "Proceed: allow the navigation; Cancel: cancel the navigation; CancelAndIgnore: cancels the navigation and makes the requester of the navigation acts like the request was never made.", + "type": "string", + "enum": ["Proceed", "Cancel", "CancelAndIgnore"], + "experimental": true + }, + { + "id": "LayoutViewport", + "type": "object", + "description": "Layout viewport position and dimensions.", + "experimental": true, + "properties": [ + { "name": "pageX", "type": "integer", "description": "Horizontal offset relative to the document (CSS pixels)." }, + { "name": "pageY", "type": "integer", "description": "Vertical offset relative to the document (CSS pixels)." }, + { "name": "clientWidth", "type": "integer", "description": "Width (CSS pixels), excludes scrollbar if present." }, + { "name": "clientHeight", "type": "integer", "description": "Height (CSS pixels), excludes scrollbar if present." } + ] + }, + { + "id": "VisualViewport", + "type": "object", + "description": "Visual viewport position, dimensions, and scale.", + "experimental": true, "properties": [ - { "name": "offsetTop", "type": "number", "hidden": true, "description": "Top offset in DIP." }, - { "name": "pageScaleFactor", "type": "number", "hidden": true, "description": "Page scale factor." }, - { "name": "deviceWidth", "type": "number", "hidden": true, "description": "Device screen width in DIP." }, - { "name": "deviceHeight", "type": "number", "hidden": true, "description": "Device screen height in DIP." }, - { "name": "scrollOffsetX", "type": "number", "hidden": true, "description": "Position of horizontal scroll in CSS pixels." }, - { "name": "scrollOffsetY", "type": "number", "hidden": true, "description": "Position of vertical scroll in CSS pixels." }, - { "name": "timestamp", "type": "number", "optional": true, "hidden": true, "description": "Frame swap timestamp." } - ], - "hidden": true + { "name": "offsetX", "type": "number", "description": "Horizontal offset relative to the layout viewport (CSS pixels)." }, + { "name": "offsetY", "type": "number", "description": "Vertical offset relative to the layout viewport (CSS pixels)." }, + { "name": "pageX", "type": "number", "description": "Horizontal offset relative to the document (CSS pixels)." }, + { "name": "pageY", "type": "number", "description": "Vertical offset relative to the document (CSS pixels)." }, + { "name": "clientWidth", "type": "number", "description": "Width (CSS pixels), excludes scrollbar if present." }, + { "name": "clientHeight", "type": "number", "description": "Height (CSS pixels), excludes scrollbar if present." }, + { "name": "scale", "type": "number", "description": "Scale relative to the ideal viewport (size at width=device-width)." } + ] } ], "commands": [ { "name": "enable", - "description": "Enables page domain notifications.", - "handlers": ["browser", "renderer"] + "description": "Enables page domain notifications." }, { "name": "disable", - "description": "Disables page domain notifications.", - "handlers": ["browser", "renderer"] + "description": "Disables page domain notifications." }, { "name": "addScriptToEvaluateOnLoad", @@ -162,14 +232,22 @@ "returns": [ { "name": "identifier", "$ref": "ScriptIdentifier", "description": "Identifier of the added script." } ], - "hidden": true + "experimental": true }, { "name": "removeScriptToEvaluateOnLoad", "parameters": [ { "name": "identifier", "$ref": "ScriptIdentifier" } ], - "hidden": true + "experimental": true + }, + { + "name": "setAutoAttachToCreatedPages", + "parameters": [ + { "name": "autoAttach", "type": "boolean", "description": "If true, browser will open a new inspector window for every page created from this one." } + ], + "description": "Controls whether browser will open a new inspector window for connected pages.", + "experimental": true }, { "name": "reload", @@ -177,30 +255,33 @@ { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." }, { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." } ], - "description": "Reloads given page optionally ignoring the cache.", - "handlers": ["browser", "renderer"] + "description": "Reloads given page optionally ignoring the cache." }, { "name": "navigate", "parameters": [ - { "name": "url", "type": "string", "description": "URL to navigate the page to." } + { "name": "url", "type": "string", "description": "URL to navigate the page to." }, + { "name": "referrer", "type": "string", "optional": true, "experimental": true, "description": "Referrer URL." }, + { "name": "transitionType", "$ref": "TransitionType", "optional": true, "experimental": true, "description": "Intended transition type." } ], "returns": [ - { "name": "frameId", "$ref": "FrameId", "hidden": true, "description": "Frame id that will be navigated." } + { "name": "frameId", "$ref": "FrameId", "experimental": true, "description": "Frame id that will be navigated." } ], - "description": "Navigates current page to the given URL.", - "handlers": ["browser", "renderer"] + "description": "Navigates current page to the given URL." + }, + { + "name": "stopLoading", + "description": "Force the page stop all navigations and pending resource fetches.", + "experimental": true }, { "name": "getNavigationHistory", - "parameters": [], "returns": [ { "name": "currentIndex", "type": "integer", "description": "Index of the current navigation history entry." }, { "name": "entries", "type": "array", "items": { "$ref": "NavigationEntry" }, "description": "Array of navigation history entries." } ], "description": "Returns navigation history for the current page.", - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "navigateToHistoryEntry", @@ -208,8 +289,7 @@ { "name": "entryId", "type": "integer", "description": "Unique id of the entry to navigate to." } ], "description": "Navigates current page to the given history entry.", - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "getCookies", @@ -217,9 +297,7 @@ { "name": "cookies", "type": "array", "items": { "$ref": "Network.Cookie" }, "description": "Array of cookie objects." } ], "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.", - "handlers": ["browser"], - "async": true, - "hidden": true, + "experimental": true, "redirect": "Network" }, { @@ -229,9 +307,7 @@ { "name": "url", "type": "string", "description": "URL to match cooke domain and path." } ], "description": "Deletes browser cookie with given name, domain and path.", - "handlers": ["browser"], - "async": true, - "hidden": true, + "experimental": true, "redirect": "Network" }, { @@ -240,11 +316,10 @@ "returns": [ { "name": "frameTree", "$ref": "FrameResourceTree", "description": "Present frame / resource tree structure." } ], - "hidden": true + "experimental": true }, { "name": "getResourceContent", - "async": true, "description": "Returns content of the given resource.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Frame id to get resource for." }, @@ -254,7 +329,7 @@ { "name": "content", "type": "string", "description": "Resource content." }, { "name": "base64Encoded", "type": "boolean", "description": "True, if content was served as base64." } ], - "hidden": true + "experimental": true }, { "name": "searchInResource", @@ -269,7 +344,7 @@ "returns": [ { "name": "result", "type": "array", "items": { "$ref": "Debugger.SearchMatch" }, "description": "List of search matches." } ], - "hidden": true + "experimental": true }, { "name": "setDocumentContent", @@ -278,7 +353,7 @@ { "name": "frameId", "$ref": "FrameId", "description": "Frame id to set HTML for." }, { "name": "html", "type": "string", "description": "HTML content to set." } ], - "hidden": true + "experimental": true }, { "name": "setDeviceMetricsOverride", @@ -291,18 +366,21 @@ { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }, { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." }, - { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." } + { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." }, + { "name": "screenWidth", "type": "integer", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenHeight", "type": "integer", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionX", "type": "integer", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionY", "type": "integer", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenOrientation", "$ref": "Emulation.ScreenOrientation", "optional": true, "description": "Screen orientation override." } ], - "handlers": ["browser"], "redirect": "Emulation", - "hidden": true + "experimental": true }, { "name": "clearDeviceMetricsOverride", "description": "Clears the overriden device metrics.", - "handlers": ["browser"], "redirect": "Emulation", - "hidden": true + "experimental": true }, { "name": "setGeolocationOverride", @@ -312,14 +390,12 @@ { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"}, { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} ], - "redirect": "Emulation", - "handlers": ["browser"] + "redirect": "Emulation" }, { "name": "clearGeolocationOverride", "description": "Clears the overriden Geolocation Position and Error.", - "redirect": "Emulation", - "handlers": ["browser"] + "redirect": "Emulation" }, { "name": "setDeviceOrientationOverride", @@ -330,13 +406,13 @@ { "name": "gamma", "type": "number", "description": "Mock gamma"} ], "redirect": "DeviceOrientation", - "hidden": true + "experimental": true }, { "name": "clearDeviceOrientationOverride", "description": "Clears the overridden Device Orientation.", "redirect": "DeviceOrientation", - "hidden": true + "experimental": true }, { "name": "setTouchEmulationEnabled", @@ -345,29 +421,42 @@ { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." } ], "description": "Toggles mouse event-based touch event emulation.", - "hidden": true, - "redirect": "Emulation", - "handlers": ["browser", "renderer"] + "experimental": true, + "redirect": "Emulation" }, { "name": "captureScreenshot", - "async": true, "description": "Capture page screenshot.", - "parameters": [], + "parameters": [ + { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format (defaults to png)." }, + { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100] (jpeg only)." }, + { "name": "fromSurface", "type": "boolean", "optional": true, "description": "Capture the screenshot from the surface, rather than the view. Defaults to true.", "experimental": true } + ], "returns": [ - { "name": "data", "type": "string", "description": "Base64-encoded image data (PNG)." } + { "name": "data", "type": "string", "description": "Base64-encoded image data." } ], - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { - "name": "canScreencast", - "description": "Tells whether screencast is supported.", + "name": "printToPDF", + "description": "Print page as PDF.", + "parameters": [ + {"name": "landscape", "type": "boolean", "optional": true, "description": "Paper orientation. Defaults to false."}, + {"name": "displayHeaderFooter", "type": "boolean", "optional": true, "description": "Display header and footer. Defaults to false."}, + {"name": "printBackground", "type": "boolean", "optional": true, "description": "Print background graphics. Defaults to false."}, + {"name": "scale", "type": "number", "optional": true, "description": "Scale of the webpage rendering. Defaults to 1."}, + {"name": "paperWidth", "type": "number", "optional": true, "description": "Paper width in inches. Defaults to 8.5 inches."}, + {"name": "paperHeight", "type": "number", "optional": true, "description": "Paper height in inches. Defaults to 11 inches."}, + {"name": "marginTop", "type": "number", "optional": true, "description": "Top margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "marginBottom", "type": "number", "optional": true, "description": "Bottom margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "marginLeft", "type": "number", "optional": true, "description": "Left margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "marginRight", "type": "number", "optional": true, "description": "Right margin in inches. Defaults to 1cm (~0.4 inches)."}, + {"name": "pageRanges", "type": "string", "optional": true, "description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages."} + ], "returns": [ - { "name": "result", "type": "boolean", "description": "True if screencast is supported." } + { "name": "data", "type": "string", "description": "Base64-encoded pdf data." } ], - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "startScreencast", @@ -376,25 +465,23 @@ { "name": "format", "type": "string", "optional": true, "enum": ["jpeg", "png"], "description": "Image compression format." }, { "name": "quality", "type": "integer", "optional": true, "description": "Compression quality from range [0..100]." }, { "name": "maxWidth", "type": "integer", "optional": true, "description": "Maximum screenshot width." }, - { "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." } + { "name": "maxHeight", "type": "integer", "optional": true, "description": "Maximum screenshot height." }, + { "name": "everyNthFrame", "type": "integer", "optional": true, "description": "Send every n-th frame." } ], - "hidden": true, - "handlers": ["browser", "renderer"] + "experimental": true }, { "name": "stopScreencast", "description": "Stops sending each frame in the <code>screencastFrame</code>.", - "hidden": true, - "handlers": ["browser", "renderer"] + "experimental": true }, { "name": "screencastFrameAck", "description": "Acknowledges that a screencast frame has been received by the frontend.", "parameters": [ - { "name": "frameNumber", "type": "integer", "description": "Frame number." } + { "name": "sessionId", "type": "integer", "description": "Frame number." } ], - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "handleJavaScriptDialog", @@ -402,35 +489,57 @@ "parameters": [ { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." }, { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." } - ], - "hidden": true, - "handlers": ["browser"] + ] }, { - "name": "setShowViewportSizeOnResize", - "description": "Paints viewport size upon main frame resize.", + "name": "getAppManifest", + "experimental": true, + "returns": [ + { "name": "url", "type": "string", "description": "Manifest location." }, + { "name": "errors", "type": "array", "items": { "$ref": "AppManifestError" } }, + { "name": "data", "type": "string", "optional": true, "description": "Manifest content." } + ] + }, + { + "name": "requestAppBanner", + "experimental": true + }, + { + "name": "setControlNavigations", "parameters": [ - { "name": "show", "type": "boolean", "description": "Whether to paint size or not." }, - { "name": "showGrid", "type": "boolean", "optional": true, "description": "Whether to paint grid as well." } + { "name": "enabled", "type": "boolean" } ], - "hidden": true + "description": "Toggles navigation throttling which allows programatic control over navigation and redirect response.", + "experimental": true }, { - "name": "setColorPickerEnabled", + "name": "processNavigation", "parameters": [ - { "name": "enabled", "type": "boolean", "description": "Shows / hides color picker" } + { "name": "response", "$ref": "NavigationResponse" }, + { "name": "navigationId", "type": "integer" } ], - "description": "Shows / hides color picker", - "hidden": true, - "handlers": ["browser"] + "description": "Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation.", + "experimental": true + }, + { + "name": "getLayoutMetrics", + "description": "Returns metrics relating to the layouting of the page, such as viewport bounds/scale.", + "experimental": true, + "returns": [ + { "name": "layoutViewport", "$ref": "LayoutViewport", "description": "Metrics relating to the layout viewport." }, + { "name": "visualViewport", "$ref": "VisualViewport", "description": "Metrics relating to the visual viewport." }, + { "name": "contentSize", "$ref": "DOM.Rect", "description": "Size of scrollable area."} + ] }, { - "name": "setOverlayMessage", + "name": "createIsolatedWorld", + "description": "Creates an isolated world for the given frame.", + "experimental": true, "parameters": [ - { "name": "message", "type": "string", "optional": true, "description": "Overlay message to display when paused in debugger." } - ], - "hidden": true, - "description": "Sets overlay message." + { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame in which the isolated world should be created." }, + { "name": "worldName", "type": "string", "optional": true, "description": "An optional name which is reported in the Execution Context." }, + { "name": "grantUniveralAccess", "type": "boolean", "optional": true, "description": "Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution." } + ] } ], "events": [ @@ -451,7 +560,8 @@ "description": "Fired when frame has been attached to its parent.", "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has been attached." }, - { "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." } + { "name": "parentFrameId", "$ref": "FrameId", "description": "Parent frame identifier." }, + { "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript stack trace of when frame was attached, only set if frame initiated from script.", "experimental": true } ] }, { @@ -474,7 +584,7 @@ "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has started loading." } ], - "hidden": true + "experimental": true }, { "name": "frameStoppedLoading", @@ -482,7 +592,7 @@ "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has stopped loading." } ], - "hidden": true + "experimental": true }, { "name": "frameScheduledNavigation", @@ -491,7 +601,7 @@ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has scheduled a navigation." }, { "name": "delay", "type": "number", "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start." } ], - "hidden": true + "experimental": true }, { "name": "frameClearedScheduledNavigation", @@ -499,24 +609,26 @@ "parameters": [ { "name": "frameId", "$ref": "FrameId", "description": "Id of the frame that has cleared its scheduled navigation." } ], - "hidden": true + "experimental": true }, { "name": "frameResized", - "hidden": true + "experimental": true }, { "name": "javascriptDialogOpening", "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.", "parameters": [ - { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." } - ], - "hidden": true + { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." }, + { "name": "type", "$ref": "DialogType", "description": "Dialog type." } + ] }, { "name": "javascriptDialogClosed", "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.", - "hidden": true + "parameters": [ + { "name": "result", "type": "boolean", "description": "Whether dialog was confirmed." } + ] }, { "name": "screencastFrame", @@ -524,10 +636,9 @@ "parameters": [ { "name": "data", "type": "string", "description": "Base64-encoded compressed image." }, { "name": "metadata", "$ref": "ScreencastFrameMetadata", "description": "Screencast frame metadata."}, - { "name": "frameNumber", "type": "integer", "optional": true, "description": "Frame number."} + { "name": "sessionId", "type": "integer", "description": "Frame number."} ], - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "screencastVisibilityChanged", @@ -535,37 +646,72 @@ "parameters": [ { "name": "visible", "type": "boolean", "description": "True if the page is visible." } ], - "hidden": true, - "handlers": ["browser"] - }, - { - "name": "colorPicked", - "description": "Fired when a color has been picked.", - "parameters": [ - { "name": "color", "$ref": "DOM.RGBA", "description": "RGBA of the picked color." } - ], - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "interstitialShown", - "description": "Fired when interstitial page was shown", - "hidden": true, - "handlers": ["browser"] + "description": "Fired when interstitial page was shown" }, { "name": "interstitialHidden", - "description": "Fired when interstitial page was hidden", - "hidden": true, - "handlers": ["browser"] + "description": "Fired when interstitial page was hidden" + }, + { + "name": "navigationRequested", + "description": "Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.", + "parameters": [ + { "name": "isInMainFrame", "type": "boolean", "description": "Whether the navigation is taking place in the main frame or in a subframe." }, + { "name": "isRedirect", "type": "boolean", "description": "Whether the navigation has encountered a server redirect or not." }, + { "name": "navigationId", "type": "integer" }, + { "name": "url", "type": "string", "description": "URL of requested navigation." } + ] } ] }, { - "domain": "Rendering", - "description": "This domain allows to control rendering of the page.", - "hidden": true, + "domain": "Overlay", + "description": "This domain provides various functionality related to drawing atop the inspected page.", + "dependencies": ["DOM", "Page", "Runtime"], + "experimental": true, + "types": [ + { + "id": "HighlightConfig", + "type": "object", + "properties": [ + { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." }, + { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." }, + { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." }, + { "name": "displayAsMaterial", "type": "boolean", "optional": true}, + { "name": "contentColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "paddingColor", "$ref": "DOM.RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." }, + { "name": "borderColor", "$ref": "DOM.RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." }, + { "name": "marginColor", "$ref": "DOM.RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." }, + { "name": "eventTargetColor", "$ref": "DOM.RGBA", "optional": true, "description": "The event target element highlight fill color (default: transparent)." }, + { "name": "shapeColor", "$ref": "DOM.RGBA", "optional": true, "description": "The shape outside fill color (default: transparent)." }, + { "name": "shapeMarginColor", "$ref": "DOM.RGBA", "optional": true, "description": "The shape margin fill color (default: transparent)." }, + { "name": "selectorList", "type": "string", "optional": true, "description": "Selectors to highlight relevant nodes."} + ], + "description": "Configuration data for the highlighting of page elements." + }, + { + "id": "InspectMode", + "type": "string", + "enum": [ + "searchForNode", + "searchForUAShadowDOM", + "none" + ] + } + ], "commands": [ + { + "name": "enable", + "description": "Enables domain notifications." + }, + { + "name": "disable", + "description": "Disables domain notifications." + }, { "name": "setShowPaintRects", "description": "Requests that backend shows paint rectangles", @@ -588,17 +734,107 @@ ] }, { - "name": "setContinuousPaintingEnabled", - "description": "Requests that backend enables continuous painting", + "name": "setShowScrollBottleneckRects", + "description": "Requests that backend shows scroll bottleneck rects", "parameters": [ - { "name": "enabled", "type": "boolean", "description": "True for enabling cointinuous painting" } + { "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" } ] }, { - "name": "setShowScrollBottleneckRects", - "description": "Requests that backend shows scroll bottleneck rects", + "name": "setShowViewportSizeOnResize", + "description": "Paints viewport size upon main frame resize.", "parameters": [ - { "name": "show", "type": "boolean", "description": "True for showing scroll bottleneck rects" } + { "name": "show", "type": "boolean", "description": "Whether to paint size or not." } + ] + }, + { + "name": "setPausedInDebuggerMessage", + "parameters": [ + { "name": "message", "type": "string", "optional": true, "description": "The message to display, also triggers resume and step over controls." } + ] + }, + { + "name": "setSuspended", + "parameters": [ + { "name": "suspended", "type": "boolean", "description": "Whether overlay should be suspended and not consume any resources until resumed." } + ] + }, + { + "name": "setInspectMode", + "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.", + "parameters": [ + { "name": "mode", "$ref": "InspectMode", "description": "Set an inspection mode." }, + { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." } + ] + }, + { + "name": "highlightRect", + "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.", + "parameters": [ + { "name": "x", "type": "integer", "description": "X coordinate" }, + { "name": "y", "type": "integer", "description": "Y coordinate" }, + { "name": "width", "type": "integer", "description": "Rectangle width" }, + { "name": "height", "type": "integer", "description": "Rectangle height" }, + { "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ] + }, + { + "name": "highlightQuad", + "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.", + "parameters": [ + { "name": "quad", "$ref": "DOM.Quad", "description": "Quad to highlight" }, + { "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, + { "name": "outlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } + ] + }, + { + "name": "highlightNode", + "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.", + "parameters": [ + { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." }, + { "name": "nodeId", "$ref": "DOM.NodeId", "optional": true, "description": "Identifier of the node to highlight." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." }, + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted." } + ] + }, + { + "name": "highlightFrame", + "description": "Highlights owner element of the frame with given id.", + "parameters": [ + { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." }, + { "name": "contentColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, + { "name": "contentOutlineColor", "$ref": "DOM.RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." } + ] + }, + { + "name": "hideHighlight", + "description": "Hides any highlight." + }, + { + "name": "getHighlightObjectForTest", + "description": "For testing.", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get highlight object for." } + ], + "returns": [ + { "name": "highlight", "type": "object", "description": "Highlight data for the node." } + ] + } + ], + "events": [ + { + "name": "nodeHighlightRequested", + "description": "Fired when the node should be highlighted. This happens after call to <code>setInspectMode</code>.", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId" } + ] + }, + { + "name": "inspectNodeRequested", + "description": "Fired when the node should be inspected. This happens after call to <code>setInspectMode</code> or when user manually inspects an element.", + "parameters": [ + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "Id of the node to inspect." } ] } ] @@ -606,21 +842,27 @@ { "domain": "Emulation", "description": "This domain emulates different environments for the page.", - "hidden": true, + "dependencies": ["DOM"], "types": [ { - "id": "Viewport", + "id": "ScreenOrientation", "type": "object", - "description": "Visible page viewport", + "description": "Screen orientation.", "properties": [ - { "name": "scrollX", "type": "number", "description": "X scroll offset in CSS pixels." }, - { "name": "scrollY", "type": "number", "description": "Y scroll offset in CSS pixels." }, - { "name": "contentsWidth", "type": "number", "description": "Contents width in CSS pixels." }, - { "name": "contentsHeight", "type": "number", "description": "Contents height in CSS pixels." }, - { "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." }, - { "name": "minimumPageScaleFactor", "type": "number", "description": "Minimum page scale factor." }, - { "name": "maximumPageScaleFactor", "type": "number", "description": "Maximum page scale factor." } + { "name": "type", "type": "string", "enum": ["portraitPrimary", "portraitSecondary", "landscapePrimary", "landscapeSecondary"], "description": "Orientation type." }, + { "name": "angle", "type": "integer", "description": "Orientation angle." } ] + }, + { + "id": "VirtualTimePolicy", + "type": "string", + "enum": [ + "advance", + "pause", + "pauseIfNetworkFetchesPending" + ], + "experimental": true, + "description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches." } ], "commands": [ @@ -633,31 +875,61 @@ { "name": "deviceScaleFactor", "type": "number", "description": "Overriding device scale factor value. 0 disables the override." }, { "name": "mobile", "type": "boolean", "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more." }, { "name": "fitWindow", "type": "boolean", "description": "Whether a view that exceeds the available browser window area should be scaled down to fit." }, - { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, - { "name": "offsetX", "type": "number", "optional": true, "description": "X offset to shift resulting view image by. Ignored in |fitWindow| mode." }, - { "name": "offsetY", "type": "number", "optional": true, "description": "Y offset to shift resulting view image by. Ignored in |fitWindow| mode." } - ], - "handlers": ["browser"] + { "name": "scale", "type": "number", "optional": true, "experimental": true, "description": "Scale to apply to resulting view image. Ignored in |fitWindow| mode." }, + { "name": "offsetX", "type": "number", "optional": true, "deprecated": true, "experimental": true, "description": "Not used." }, + { "name": "offsetY", "type": "number", "optional": true, "deprecated": true, "experimental": true, "description": "Not used." }, + { "name": "screenWidth", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenHeight", "type": "integer", "optional": true, "experimental": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionX", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "positionY", "type": "integer", "optional": true, "experimental": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|." }, + { "name": "screenOrientation", "$ref": "ScreenOrientation", "optional": true, "description": "Screen orientation override." } + ] }, { "name": "clearDeviceMetricsOverride", - "description": "Clears the overriden device metrics.", - "handlers": ["browser"] + "description": "Clears the overriden device metrics." + }, + { + "name": "forceViewport", + "description": "Overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame.", + "experimental": true, + "parameters": [ + { "name": "x", "type": "number", "description": "X coordinate of top-left corner of the area (CSS pixels)." }, + { "name": "y", "type": "number", "description": "Y coordinate of top-left corner of the area (CSS pixels)." }, + { "name": "scale", "type": "number", "description": "Scale to apply to the area (relative to a page scale of 1.0)." } + ] + }, + { + "name": "resetViewport", + "description": "Resets the visible area of the page to the original viewport, undoing any effects of the <code>forceViewport</code> command.", + "experimental": true }, { - "name": "resetScrollAndPageScaleFactor", - "description": "Requests that scroll offsets and page scale factor are reset to initial values." + "name": "resetPageScaleFactor", + "experimental": true, + "description": "Requests that page scale factor is reset to initial values." }, { "name": "setPageScaleFactor", "description": "Sets a specified page scale factor.", + "experimental": true, "parameters": [ { "name": "pageScaleFactor", "type": "number", "description": "Page scale factor." } ] }, + { + "name": "setVisibleSize", + "description": "Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.", + "experimental": true, + "parameters": [ + { "name": "width", "type": "integer", "description": "Frame width (DIP)." }, + { "name": "height", "type": "integer", "description": "Frame height (DIP)." } + ] + }, { "name": "setScriptExecutionDisabled", "description": "Switches script execution in the page.", + "experimental": true, "parameters": [ { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." } ] @@ -665,17 +937,17 @@ { "name": "setGeolocationOverride", "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.", + "experimental": true, "parameters": [ { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"}, { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"}, { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"} - ], - "handlers": ["browser"] + ] }, { "name": "clearGeolocationOverride", "description": "Clears the overriden Geolocation Position and Error.", - "handlers": ["browser"] + "experimental": true }, { "name": "setTouchEmulationEnabled", @@ -683,8 +955,7 @@ { "name": "enabled", "type": "boolean", "description": "Whether the touch event emulation should be enabled." }, { "name": "configuration", "type": "string", "enum": ["mobile", "desktop"], "optional": true, "description": "Touch/gesture events configuration. Default: current platform." } ], - "description": "Toggles mouse event-based touch event emulation.", - "handlers": ["browser", "renderer"] + "description": "Toggles mouse event-based touch event emulation." }, { "name": "setEmulatedMedia", @@ -693,392 +964,152 @@ ], "description": "Emulates the given media for CSS media queries." }, + { + "name": "setCPUThrottlingRate", + "parameters": [ + { "name": "rate", "type": "number", "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc)." } + ], + "experimental": true, + "description": "Enables CPU throttling to emulate slow CPUs." + }, { "name": "canEmulate", "description": "Tells whether emulation is supported.", "returns": [ { "name": "result", "type": "boolean", "description": "True if emulation is supported." } ], - "handlers": ["browser"] + "experimental": true + }, + { + "name": "setVirtualTimePolicy", + "description": "Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.", + "parameters": [ + { "name": "policy", "$ref": "VirtualTimePolicy" }, + { "name": "budget", "type": "integer", "optional": true, "description": "If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent." } + ], + "experimental": true + }, + { + "name": "setDefaultBackgroundColorOverride", + "description": "Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.", + "parameters": [ + { "name": "color", "$ref": "DOM.RGBA", "optional": true, "description": "RGBA of the default background color. If not specified, any existing override will be cleared." } + ], + "experimental": true } ], "events": [ { - "name": "viewportChanged", - "description": "Fired when a visible page viewport has changed. Only fired when device metrics are overridden.", - "parameters": [ - { "name": "viewport", "$ref": "Viewport", "description": "Viewport description." } - ] + "name": "virtualTimeBudgetExpired", + "experimental": true, + "description": "Notification sent after the virual time budget for the current VirtualTimePolicy has run out." } ] }, { - "domain": "Runtime", - "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.", + "domain": "Security", + "description": "Security", + "experimental": true, "types": [ { - "id": "RemoteObjectId", + "id": "CertificateId", + "type": "integer", + "description": "An internal certificate ID value." + }, + { + "id": "SecurityState", "type": "string", - "description": "Unique object identifier." + "enum": ["unknown", "neutral", "insecure", "warning", "secure", "info"], + "description": "The security level of a page or resource." }, { - "id": "RemoteObject", + "id": "SecurityStateExplanation", "type": "object", - "description": "Mirror object referencing original JavaScript object.", "properties": [ - { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, - { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, - { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." }, - { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested), or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." }, - { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, - { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }, - { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "hidden": true }, - { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "hidden": true} - ] + { "name": "securityState", "$ref": "SecurityState", "description": "Security state representing the severity of the factor being explained." }, + { "name": "summary", "type": "string", "description": "Short phrase describing the type of factor." }, + { "name": "description", "type": "string", "description": "Full text explanation of the factor." }, + { "name": "hasCertificate", "type": "boolean", "description": "True if the page has a certificate." } + ], + "description": "An explanation of an factor contributing to the security state." }, - { "id": "CustomPreview", + { + "id": "InsecureContentStatus", "type": "object", - "hidden": true, "properties": [ - { "name": "header", "type": "string"}, - { "name": "hasBody", "type": "boolean"}, - {"name": "formatterObjectId", "$ref": "RemoteObjectId"}, - {"name": "configObjectId", "$ref": "RemoteObjectId", "optional": true} - ] + { "name": "ranMixedContent", "type": "boolean", "description": "True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts." }, + { "name": "displayedMixedContent", "type": "boolean", "description": "True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images." }, + { "name": "containedMixedForm", "type": "boolean", "description": "True if the page was loaded over HTTPS and contained a form targeting an insecure url." }, + { "name": "ranContentWithCertErrors", "type": "boolean", "description": "True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors." }, + { "name": "displayedContentWithCertErrors", "type": "boolean", "description": "True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors." }, + { "name": "ranInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that ran insecure content." }, + { "name": "displayedInsecureContentStyle", "$ref": "SecurityState", "description": "Security state representing a page that displayed insecure content." } + ], + "description": "Information about insecure content on the page." }, { - "id": "ObjectPreview", - "type": "object", - "hidden": true, - "description": "Object containing abbreviated remote object value.", - "properties": [ - { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, - { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, - { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, - { "name": "lossless", "type": "boolean", "description": "Determines whether preview is lossless (contains all information of the original object)." }, - { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." }, - { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }, - { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." } - ] + "id": "CertificateErrorAction", + "type": "string", + "enum": ["continue", "cancel"], + "description": "The action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request." + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables tracking security state changes." }, { - "id": "PropertyPreview", - "type": "object", - "hidden": true, - "properties": [ - { "name": "name", "type": "string", "description": "Property name." }, - { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." }, - { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." }, - { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." }, - { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." } - ] + "name": "disable", + "description": "Disables tracking security state changes." }, { - "id": "EntryPreview", - "type": "object", - "hidden": true, - "properties": [ - { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." }, - { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." } - ] + "name": "showCertificateViewer", + "description": "Displays native dialog with the certificate details." }, { - "id": "PropertyDescriptor", - "type": "object", - "description": "Object property descriptor.", - "properties": [ - { "name": "name", "type": "string", "description": "Property name or symbol description." }, - { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }, - { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." }, - { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." }, - { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." }, - { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." }, - { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." }, - { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, - { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object.", "hidden": true }, - { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type.", "hidden": true } + "name": "handleCertificateError", + "description": "Handles a certificate error that fired a certificateError event.", + "parameters": [ + { "name": "eventId", "type": "integer", "description": "The ID of the event."}, + { "name": "action", "$ref": "CertificateErrorAction", "description": "The action to take on the certificate error." } ] }, { - "id": "EventListener", - "type": "object", - "description": "Object event listener.", - "properties": [ - { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." }, - { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." }, - { "name": "location", "$ref": "Debugger.Location", "description": "Handler code location." }, - { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." } - ], - "hidden": true - }, - { - "id": "InternalPropertyDescriptor", - "type": "object", - "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.", - "properties": [ - { "name": "name", "type": "string", "description": "Conventional property name." }, - { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." } - ], - "hidden": true - }, - { - "id": "CallArgument", - "type": "object", - "description": "Represents function call argument. Either remote object id <code>objectId</code> or primitive <code>value</code> or neither of (for undefined) them should be specified.", - "properties": [ - { "name": "value", "type": "any", "optional": true, "description": "Primitive value, or description string if the value can not be JSON-stringified (like NaN, Infinity, -Infinity, -0)." }, - { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }, - { "name": "type", "optional": true, "hidden": true, "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." } - ] - }, - { - "id": "ExecutionContextId", - "type": "integer", - "description": "Id of an execution context." - }, - { - "id": "ExecutionContextDescription", - "type": "object", - "description": "Description of an isolated world.", - "properties": [ - { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." }, - { "name": "isPageContext", "type": "boolean", "optional": true, "description": "True if this is a context where inpspected web page scripts run. False if it is a content script isolated context.", "hidden": true }, - { "name": "origin", "type": "string", "description": "Execution context origin.", "hidden": true}, - { "name": "name", "type": "string", "description": "Human readable name describing given context.", "hidden": true}, - { "name": "frameId", "type": "string", "description": "Id of the owning frame. May be an empty string if the context is not associated with a frame." } - ] - } - ], - "commands": [ - { - "name": "evaluate", - "parameters": [ - { "name": "expression", "type": "string", "description": "Expression to evaluate." }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, - { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "hidden": true }, - { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, - { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, - { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, - { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } - ], - "returns": [ - { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." }, - { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, - { "name": "exceptionDetails", "$ref": "Debugger.ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."} - ], - "description": "Evaluates expression on global object." - }, - { - "name": "callFunctionOn", - "parameters": [ - { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." }, - { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." }, - { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." }, - { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, - { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }, - { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } - ], - "returns": [ - { "name": "result", "$ref": "RemoteObject", "description": "Call result." }, - { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } - ], - "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object." - }, - { - "name": "getProperties", - "parameters": [ - { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." }, - { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." }, - { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "hidden": true }, - { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the results." } - ], - "returns": [ - { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." }, - { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself).", "hidden": true } - ], - "description": "Returns properties of a given object. Object group of the result is inherited from the target object." - }, - { - "name": "getEventListeners", - "hidden": true, - "parameters": [ - { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return listeners for." }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name for handler value. Handler value is not returned without this parameter specified." } - ], - "returns": [ - { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." } - ], - "description": "Returns event listeners of the given object." - }, - { - "name": "releaseObject", - "parameters": [ - { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." } - ], - "description": "Releases remote object with given id." - }, - { - "name": "releaseObjectGroup", - "parameters": [ - { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." } - ], - "description": "Releases all remote objects that belong to a given group." - }, - { - "name": "run", - "hidden": true, - "description": "Tells inspected instance(worker or page) that it can run in case it was started paused." - }, - { - "name": "enable", - "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context." - }, - { - "name": "disable", - "hidden": true, - "description": "Disables reporting of execution contexts creation." - }, - { - "name": "isRunRequired", - "returns": [ - { "name": "result", "type": "boolean", "description": "True if the Runtime is in paused on start state." } - ], - "hidden": true - }, - { - "name": "setCustomObjectFormatterEnabled", - "parameters": [ - { - "name": "enabled", - "type": "boolean" - } - ], - "hidden": true - } - ], - "events": [ - { - "name": "executionContextCreated", - "parameters": [ - { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." } - ], - "description": "Issued when new execution context is created." - }, - { - "name": "executionContextDestroyed", + "name": "setOverrideCertificateErrors", + "description": "Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands.", "parameters": [ - { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" } - ], - "description": "Issued when execution context is destroyed." - }, - { - "name": "executionContextsCleared", - "description": "Issued when all executionContexts were cleared in browser" - } - ] - }, - { - "domain": "Console", - "description": "Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the <a href='http://getfirebug.com/wiki/index.php/Console_API'>JavaScript Console API</a>. One needs to enable this domain using <code>enable</code> command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using <code>messageAdded</code> notification upon enabling.", - "types": [ - { - "id": "Timestamp", - "type": "number", - "description": "Number of seconds since epoch.", - "hidden": true - }, - { - "id": "ConsoleMessage", - "type": "object", - "description": "Console message.", - "properties": [ - { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "other", "deprecation"], "description": "Message source." }, - { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info"], "description": "Message severity." }, - { "name": "text", "type": "string", "description": "Message text." }, - { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd"], "description": "Console message type." }, - { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." }, - { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, - { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." }, - { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." }, - { "name": "repeatCount", "type": "integer", "optional": true, "description": "Repeat count for repeated messages." }, - { "name": "parameters", "type": "array", "items": { "$ref": "Runtime.RemoteObject" }, "optional": true, "description": "Message parameters in case of the formatted message." }, - { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." }, - { "name": "asyncStackTrace", "$ref": "AsyncStackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this message, if available.", "hidden": true }, - { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this message." }, - { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp, when this message was fired.", "hidden": true }, - { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Identifier of the context where this message was created", "hidden": true } - ] - }, - { - "id": "CallFrame", - "type": "object", - "description": "Stack entry for console errors and assertions.", - "properties": [ - { "name": "functionName", "type": "string", "description": "JavaScript function name." }, - { "name": "scriptId", "type": "string", "description": "JavaScript script id." }, - { "name": "url", "type": "string", "description": "JavaScript script name or url." }, - { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number." }, - { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number." } + { "name": "override", "type": "boolean", "description": "If true, certificate errors will be overridden."} ] - }, - { - "id": "StackTrace", - "type": "array", - "items": { "$ref": "CallFrame" }, - "description": "Call frames for assertions or error messages." - }, - { - "id": "AsyncStackTrace", - "type": "object", - "properties": [ - { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call frames of the stack trace." }, - { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." }, - { "name": "asyncStackTrace", "$ref": "AsyncStackTrace", "optional": true, "description": "Next asynchronous stack trace, if any." } - ], - "description": "Asynchronous JavaScript call stack.", - "hidden": true - } - ], - "commands": [ - { - "name": "enable", - "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification." - }, - { - "name": "disable", - "description": "Disables console domain, prevents further console messages from being reported to the client." - }, - { - "name": "clearMessages", - "description": "Clears console messages collected in the browser." } ], "events": [ { - "name": "messageAdded", + "name": "securityStateChanged", + "description": "The security state of the page changed.", "parameters": [ - { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." } - ], - "description": "Issued when new console message is added." + { "name": "securityState", "$ref": "SecurityState", "description": "Security state." }, + { "name": "schemeIsCryptographic", "type": "boolean", "description": "True if the page was loaded over cryptographic transport such as HTTPS." }, + { "name": "explanations", "type": "array", "items": { "$ref": "SecurityStateExplanation" }, "description": "List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included." }, + { "name": "insecureContentStatus", "$ref": "InsecureContentStatus", "description": "Information about insecure content on the page." }, + { "name": "summary", "type": "string", "description": "Overrides user-visible description of the state.", "optional": true } + ] }, { - "name": "messageRepeatCountUpdated", + "name": "certificateError", + "description": "There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally.", "parameters": [ - { "name": "count", "type": "integer", "description": "New repeat count value." }, - { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of most recent message in batch.", "hidden": true } - ], - "description": "Is not issued. Will be gone in the future versions of the protocol.", - "deprecated": true - }, - { - "name": "messagesCleared", - "description": "Issued when console is cleared. This happens either upon <code>clearMessages</code> command or after page navigation." + { "name": "eventId", "type": "integer", "description": "The ID of the event."}, + { "name": "errorType", "type": "string", "description": "The type of the error."}, + { "name": "requestURL", "type": "string", "description": "The url that was requested."} + ] } ] }, { "domain": "Network", "description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.", + "dependencies": ["Runtime", "Security"], "types": [ { "id": "LoaderId", @@ -1100,6 +1131,18 @@ "type": "object", "description": "Request / response headers as keys / values of JSON object." }, + { + "id": "ConnectionType", + "type": "string", + "enum": ["none", "cellular2g", "cellular3g", "cellular4g", "bluetooth", "ethernet", "wifi", "wimax", "other"], + "description": "Loading priority of a resource request." + }, + { + "id": "CookieSameSite", + "type": "string", + "enum": ["Strict", "Lax"], + "description": "Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies" + }, { "id": "ResourceTiming", "type": "object", @@ -1114,14 +1157,21 @@ { "name": "connectEnd", "type": "number", "description": "Connected to the remote host." }, { "name": "sslStart", "type": "number", "description": "Started SSL handshake." }, { "name": "sslEnd", "type": "number", "description": "Finished SSL handshake." }, - { "name": "serviceWorkerFetchStart", "type": "number", "description": "Started fetching via ServiceWorker.", "hidden": true }, - { "name": "serviceWorkerFetchReady", "type": "number", "description": "Prepared a ServiceWorker.", "hidden": true }, - { "name": "serviceWorkerFetchEnd", "type": "number", "description": "Finished fetching via ServiceWorker.", "hidden": true }, + { "name": "workerStart", "type": "number", "description": "Started running ServiceWorker.", "experimental": true }, + { "name": "workerReady", "type": "number", "description": "Finished Starting ServiceWorker.", "experimental": true }, { "name": "sendStart", "type": "number", "description": "Started sending request." }, { "name": "sendEnd", "type": "number", "description": "Finished sending request." }, + { "name": "pushStart", "type": "number", "description": "Time the server started pushing request.", "experimental": true }, + { "name": "pushEnd", "type": "number", "description": "Time the server finished pushing request.", "experimental": true }, { "name": "receiveHeadersEnd", "type": "number", "description": "Finished receiving response headers." } ] }, + { + "id": "ResourcePriority", + "type": "string", + "enum": ["VeryLow", "Low", "Medium", "High", "VeryHigh"], + "description": "Loading priority of a resource request." + }, { "id": "Request", "type": "object", @@ -1130,9 +1180,54 @@ { "name": "url", "type": "string", "description": "Request URL." }, { "name": "method", "type": "string", "description": "HTTP request method." }, { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." }, - { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." } + { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }, + { "name": "mixedContentType", "optional": true, "type": "string", "enum": ["blockable", "optionally-blockable", "none"], "description": "The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/" }, + { "name": "initialPriority", "$ref": "ResourcePriority", "description": "Priority of the resource request at the time request is sent."}, + { "name": "referrerPolicy", "type": "string", "enum": [ "unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "no-referrer-when-downgrade-origin-when-cross-origin" ], "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/" }, + { "name": "isLinkPreload", "type": "boolean", "optional": true, "description": "Whether is loaded via link preload." } + ] + }, + { + "id": "SignedCertificateTimestamp", + "type" : "object", + "description": "Details of a signed certificate timestamp (SCT).", + "properties": [ + { "name": "status", "type": "string", "description": "Validation status." }, + { "name": "origin", "type": "string", "description": "Origin." }, + { "name": "logDescription", "type": "string", "description": "Log name / description." }, + { "name": "logId", "type": "string", "description": "Log ID." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Issuance date." }, + { "name": "hashAlgorithm", "type": "string", "description": "Hash algorithm." }, + { "name": "signatureAlgorithm", "type": "string", "description": "Signature algorithm." }, + { "name": "signatureData", "type": "string", "description": "Signature data." } + ] + }, + { + "id": "SecurityDetails", + "type": "object", + "description": "Security details about a request.", + "properties": [ + { "name": "protocol", "type": "string", "description": "Protocol name (e.g. \"TLS 1.2\" or \"QUIC\")." }, + { "name": "keyExchange", "type": "string", "description": "Key Exchange used by the connection, or the empty string if not applicable." }, + { "name": "keyExchangeGroup", "type": "string", "optional": true, "description": "(EC)DH group used by the connection, if applicable." }, + { "name": "cipher", "type": "string", "description": "Cipher name." }, + { "name": "mac", "type": "string", "optional": true, "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs." }, + { "name": "certificateId", "$ref": "Security.CertificateId", "description": "Certificate ID value." }, + { "name": "subjectName", "type": "string", "description": "Certificate subject name." }, + { "name": "sanList", "type": "array", "items": { "type": "string" }, "description": "Subject Alternative Name (SAN) DNS names and IP addresses." }, + { "name": "issuer", "type": "string", "description": "Name of the issuing CA." }, + { "name": "validFrom", "$ref": "Timestamp", "description": "Certificate valid from date." }, + { "name": "validTo", "$ref": "Timestamp", "description": "Certificate valid to (expiration) date" }, + { "name": "signedCertificateTimestampList", "type": "array", "items": { "$ref": "SignedCertificateTimestamp" }, "description": "List of signed certificate timestamps (SCTs)." } ] }, + { + "id": "BlockedReason", + "type": "string", + "description": "The reason why request was blocked.", + "enum": ["csp", "mixed-content", "origin", "inspector", "subresource-filter", "other"], + "experimental": true + }, { "id": "Response", "type": "object", @@ -1148,20 +1243,22 @@ { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." }, { "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." }, { "name": "connectionId", "type": "number", "description": "Physical connection id that was actually used for this request." }, - { "name": "remoteIPAddress", "type": "string", "optional": true, "hidden": true, "description": "Remote IP address." }, - { "name": "remotePort", "type": "integer", "optional": true, "hidden": true, "description": "Remote port."}, + { "name": "remoteIPAddress", "type": "string", "optional": true, "experimental": true, "description": "Remote IP address." }, + { "name": "remotePort", "type": "integer", "optional": true, "experimental": true, "description": "Remote port."}, { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache." }, { "name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker." }, { "name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far." }, { "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." }, - { "name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this resquest." } + { "name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this request." }, + { "name": "securityState", "$ref": "Security.SecurityState", "description": "Security state of the request resource." }, + { "name": "securityDetails", "$ref": "SecurityDetails", "optional": true, "description": "Security details for the request." } ] }, { "id": "WebSocketRequest", "type": "object", "description": "WebSocket request data.", - "hidden": true, + "experimental": true, "properties": [ { "name": "headers", "$ref": "Headers", "description": "HTTP request headers." } ] @@ -1170,7 +1267,7 @@ "id": "WebSocketResponse", "type": "object", "description": "WebSocket response data.", - "hidden": true, + "experimental": true, "properties": [ { "name": "status", "type": "number", "description": "HTTP response status code." }, { "name": "statusText", "type": "string", "description": "HTTP response status text." }, @@ -1184,7 +1281,7 @@ "id": "WebSocketFrame", "type": "object", "description": "WebSocket frame data.", - "hidden": true, + "experimental": true, "properties": [ { "name": "opcode", "type": "number", "description": "WebSocket frame opcode." }, { "name": "mask", "type": "boolean", "description": "WebSocke frame mask." }, @@ -1207,11 +1304,10 @@ "type": "object", "description": "Information about the request initiator.", "properties": [ - { "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." }, - { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." }, + { "name": "type", "type": "string", "enum": ["parser", "script", "preload", "other"], "description": "Type of this initiator." }, + { "name": "stack", "$ref": "Runtime.StackTrace", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." }, { "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." }, - { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." }, - { "name": "asyncStackTrace", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "Initiator asynchronous JavaScript stack trace, if available.", "hidden": true } + { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only (0-based)." } ] }, { @@ -1223,19 +1319,24 @@ { "name": "value", "type": "string", "description": "Cookie value." }, { "name": "domain", "type": "string", "description": "Cookie domain." }, { "name": "path", "type": "string", "description": "Cookie path." }, - { "name": "expires", "type": "number", "description": "Cookie expires." }, + { "name": "expires", "type": "number", "description": "Cookie expiration date as the number of seconds since the UNIX epoch." }, { "name": "size", "type": "integer", "description": "Cookie size." }, { "name": "httpOnly", "type": "boolean", "description": "True if cookie is http-only." }, { "name": "secure", "type": "boolean", "description": "True if cookie is secure." }, - { "name": "session", "type": "boolean", "description": "True in case of session cookie." } + { "name": "session", "type": "boolean", "description": "True in case of session cookie." }, + { "name": "sameSite", "$ref": "CookieSameSite", "optional": true, "description": "Cookie SameSite type." } ], - "hidden": true + "experimental": true } ], "commands": [ { "name": "enable", - "description": "Enables network tracking, network events will now be delivered to the client." + "description": "Enables network tracking, network events will now be delivered to the client.", + "parameters": [ + { "name": "maxTotalBufferSize", "type": "integer", "optional": true, "experimental": true, "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc)." }, + { "name": "maxResourceBufferSize", "type": "integer", "optional": true, "experimental": true, "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc)." } + ] }, { "name": "disable", @@ -1257,7 +1358,6 @@ }, { "name": "getResponseBody", - "async": true, "description": "Returns content served for the given request.", "parameters": [ { "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." } @@ -1268,20 +1368,20 @@ ] }, { - "name": "replayXHR", - "description": "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.", + "name": "setBlockedURLs", + "description": "Blocks URLs from loading.", "parameters": [ - { "name": "requestId", "$ref": "RequestId", "description": "Identifier of XHR to replay." } + { "name": "urls", "type": "array", "items": { "type": "string" }, "description": "URL patterns to block. Wildcards ('*') are allowed." } ], - "hidden": true + "experimental": true }, { - "name": "setMonitoringXHREnabled", + "name": "replayXHR", + "description": "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.", "parameters": [ - { "name": "enabled", "type": "boolean", "description": "Monitoring enabled state." } + { "name": "requestId", "$ref": "RequestId", "description": "Identifier of XHR to replay." } ], - "description": "Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.", - "hidden": true + "experimental": true }, { "name": "canClearBrowserCache", @@ -1292,8 +1392,7 @@ }, { "name": "clearBrowserCache", - "description": "Clears browser cache.", - "handlers": ["browser"] + "description": "Clears browser cache." }, { "name": "canClearBrowserCookies", @@ -1304,18 +1403,26 @@ }, { "name": "clearBrowserCookies", - "description": "Clears browser cookies.", - "handlers": ["browser"] + "description": "Clears browser cookies." }, { "name": "getCookies", + "parameters": [ + { "name": "urls", "type": "array", "items": { "type": "string" }, "optional": true, "description": "The list of URLs for which applicable cookies will be fetched" } + ], + "returns": [ + { "name": "cookies", "type": "array", "items": { "$ref": "Cookie" }, "description": "Array of cookie objects." } + ], + "description": "Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.", + "experimental": true + }, + { + "name": "getAllCookies", "returns": [ { "name": "cookies", "type": "array", "items": { "$ref": "Cookie" }, "description": "Array of cookie objects." } ], "description": "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the <code>cookies</code> field.", - "handlers": ["browser"], - "async": true, - "hidden": true + "experimental": true }, { "name": "deleteCookie", @@ -1324,9 +1431,26 @@ { "name": "url", "type": "string", "description": "URL to match cooke domain and path." } ], "description": "Deletes browser cookie with given name, domain and path.", - "handlers": ["browser"], - "async": true, - "hidden": true + "experimental": true + }, + { + "name": "setCookie", + "parameters": [ + { "name": "url", "type": "string", "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie." }, + { "name": "name", "type": "string", "description": "The name of the cookie." }, + { "name": "value", "type": "string", "description": "The value of the cookie." }, + { "name": "domain", "type": "string", "optional": true, "description": "If omitted, the cookie becomes a host-only cookie." }, + { "name": "path", "type": "string", "optional": true, "description": "Defaults to the path portion of the url parameter." }, + { "name": "secure", "type": "boolean", "optional": true, "description": "Defaults ot false." }, + { "name": "httpOnly", "type": "boolean", "optional": true, "description": "Defaults to false." }, + { "name": "sameSite", "$ref": "CookieSameSite", "optional": true, "description": "Defaults to browser default behavior." }, + { "name": "expirationDate", "$ref": "Timestamp", "optional": true, "description": "If omitted, the cookie becomes a session cookie." } + ], + "returns": [ + { "name": "success", "type": "boolean", "description": "True if successfully set cookie." } + ], + "description": "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.", + "experimental": true }, { "name": "canEmulateNetworkConditions", @@ -1334,8 +1458,7 @@ "returns": [ { "name": "result", "type": "boolean", "description": "True if emulation of network conditions is supported." } ], - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "emulateNetworkConditions", @@ -1344,10 +1467,9 @@ { "name": "offline", "type": "boolean", "description": "True to emulate internet disconnection." }, { "name": "latency", "type": "number", "description": "Additional latency (ms)." }, { "name": "downloadThroughput", "type": "number", "description": "Maximal aggregated download throughput." }, - { "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput." } - ], - "hidden": true, - "handlers": ["browser", "renderer"] + { "name": "uploadThroughput", "type": "number", "description": "Maximal aggregated upload throughput." }, + { "name": "connectionType", "$ref": "ConnectionType", "optional": true, "description": "Connection type if known."} + ] }, { "name": "setCacheDisabled", @@ -1356,6 +1478,14 @@ ], "description": "Toggles ignoring cache for each request. If <code>true</code>, cache will not be used." }, + { + "name": "setBypassServiceWorker", + "parameters": [ + { "name": "bypass", "type": "boolean", "description": "Bypass service worker and load from network." } + ], + "experimental": true, + "description": "Toggles ignoring of service worker for each request." + }, { "name": "setDataSizeLimitsForTest", "parameters": [ @@ -1363,24 +1493,45 @@ { "name": "maxResourceSize", "type": "integer", "description": "Maximum per-resource size." } ], "description": "For testing.", - "hidden": true + "experimental": true + }, + { + "name": "getCertificate", + "description": "Returns the DER-encoded certificate.", + "parameters": [ + { "name": "origin", "type": "string", "description": "Origin to get certificate for." } + ], + "returns": [ + { "name": "tableNames", "type": "array", "items": { "type": "string" } } + ], + "experimental": true } ], "events": [ + { + "name": "resourceChangedPriority", + "description": "Fired when resource loading priority is changed", + "parameters": [ + { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, + { "name": "newPriority", "$ref": "ResourcePriority", "description": "New priority" }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." } + ], + "experimental": true + }, { "name": "requestWillBeSent", "description": "Fired when page is about to send HTTP request.", "parameters": [ { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, - { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true }, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "experimental": true }, { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." }, { "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." }, { "name": "request", "$ref": "Request", "description": "Request data." }, { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, - { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." }, + { "name": "wallTime", "$ref": "Timestamp", "experimental": true, "description": "UTC Timestamp." }, { "name": "initiator", "$ref": "Initiator", "description": "Request initiator." }, { "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." }, - { "name": "type", "$ref": "Page.ResourceType", "optional": true, "hidden": true, "description": "Type of this resource." } + { "name": "type", "$ref": "Page.ResourceType", "optional": true, "experimental": true, "description": "Type of this resource." } ] }, { @@ -1395,7 +1546,7 @@ "description": "Fired when HTTP response is available.", "parameters": [ { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, - { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "hidden": true }, + { "name": "frameId", "$ref": "Page.FrameId", "description": "Frame identifier.", "experimental": true }, { "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." }, { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, @@ -1429,7 +1580,8 @@ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, { "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." }, { "name": "errorText", "type": "string", "description": "User friendly error message." }, - { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." } + { "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }, + { "name": "blockedReason", "$ref": "BlockedReason", "optional": true, "description": "The reason why loading was blocked, if any.", "experimental": true } ] }, { @@ -1438,10 +1590,10 @@ "parameters": [ { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, - { "name": "wallTime", "$ref": "Timestamp", "hidden": true, "description": "UTC Timestamp." }, + { "name": "wallTime", "$ref": "Timestamp", "experimental": true, "description": "UTC Timestamp." }, { "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." } ], - "hidden": true + "experimental": true }, { "name": "webSocketHandshakeResponseReceived", @@ -1451,16 +1603,17 @@ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, { "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." } ], - "hidden": true + "experimental": true }, { "name": "webSocketCreated", "description": "Fired upon WebSocket creation.", "parameters": [ { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, - { "name": "url", "type": "string", "description": "WebSocket request URL." } + { "name": "url", "type": "string", "description": "WebSocket request URL." }, + { "name": "initiator", "$ref": "Initiator", "optional": true, "description": "Request initiator." } ], - "hidden": true + "experimental": true }, { "name": "webSocketClosed", @@ -1469,7 +1622,7 @@ { "name": "requestId", "$ref": "RequestId", "description": "Request identifier." }, { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." } ], - "hidden": true + "experimental": true }, { "name": "webSocketFrameReceived", @@ -1479,7 +1632,7 @@ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } ], - "hidden": true + "experimental": true }, { "name": "webSocketFrameError", @@ -1489,7 +1642,7 @@ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, { "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." } ], - "hidden": true + "experimental": true }, { "name": "webSocketFrameSent", @@ -1499,7 +1652,7 @@ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }, { "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." } ], - "hidden": true + "experimental": true }, { "name": "eventSourceMessageReceived", @@ -1511,25 +1664,25 @@ { "name": "eventId", "type": "string", "description": "Message identifier." }, { "name": "data", "type": "string", "description": "Message content." } ], - "hidden": true + "experimental": true } ] }, { "domain": "Database", - "hidden": true, + "experimental": true, "types": [ { "id": "DatabaseId", "type": "string", "description": "Unique identifier of Database object.", - "hidden": true + "experimental": true }, { "id": "Database", "type": "object", "description": "Database object.", - "hidden": true, + "experimental": true, "properties": [ { "name": "id", "$ref": "DatabaseId", "description": "Database ID." }, { "name": "domain", "type": "string", "description": "Database domain." }, @@ -1567,7 +1720,6 @@ }, { "name": "executeSQL", - "async": true, "parameters": [ { "name": "databaseId", "$ref": "DatabaseId" }, { "name": "query", "type": "string" } @@ -1590,7 +1742,8 @@ }, { "domain": "IndexedDB", - "hidden": true, + "dependencies": ["Runtime"], + "experimental": true, "types": [ { "id": "DatabaseWithObjectStores", @@ -1598,8 +1751,7 @@ "description": "Database with an array of object stores.", "properties": [ { "name": "name", "type": "string", "description": "Database name." }, - { "name": "version", "type": "string", "description": "Deprecated string database version." }, - { "name": "intVersion", "type": "integer", "description": "Integer database version." }, + { "name": "version", "type": "integer", "description": "Database version." }, { "name": "objectStores", "type": "array", "items": { "$ref": "ObjectStore" }, "description": "Object stores in this database." } ] }, @@ -1653,9 +1805,9 @@ "type": "object", "description": "Data entry.", "properties": [ - { "name": "key", "type": "string", "description": "JSON-stringified key object." }, - { "name": "primaryKey", "type": "string", "description": "JSON-stringified primary key object." }, - { "name": "value", "type": "string", "description": "JSON-stringified value object." } + { "name": "key", "$ref": "Runtime.RemoteObject", "description": "Key object." }, + { "name": "primaryKey", "$ref": "Runtime.RemoteObject", "description": "Primary key object." }, + { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Value object." } ] }, { @@ -1680,7 +1832,6 @@ }, { "name": "requestDatabaseNames", - "async": true, "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." } ], @@ -1691,7 +1842,6 @@ }, { "name": "requestDatabase", - "async": true, "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." }, { "name": "databaseName", "type": "string", "description": "Database name." } @@ -1703,7 +1853,6 @@ }, { "name": "requestData", - "async": true, "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." }, { "name": "databaseName", "type": "string", "description": "Database name." }, @@ -1721,7 +1870,6 @@ }, { "name": "clearObjectStore", - "async": true, "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." }, { "name": "databaseName", "type": "string", "description": "Database name." }, @@ -1730,12 +1878,22 @@ "returns": [ ], "description": "Clears all entries from an object store." + }, + { + "name": "deleteDatabase", + "parameters": [ + { "name": "securityOrigin", "type": "string", "description": "Security origin." }, + { "name": "databaseName", "type": "string", "description": "Database name." } + ], + "returns": [ + ], + "description": "Deletes a database." } ] }, { "domain": "CacheStorage", - "hidden": true, + "experimental": true, "types": [ { "id": "CacheId", @@ -1747,8 +1905,8 @@ "type": "object", "description": "Data entry.", "properties": [ - { "name": "request", "type": "string", "description": "JSON-stringified request object." }, - { "name": "response", "type": "string", "description": "JSON-stringified response object." } + { "name": "request", "type": "string", "description": "Request url spec." }, + { "name": "response", "type": "string", "description": "Response stataus text." } ] }, { @@ -1765,7 +1923,6 @@ "commands": [ { "name": "requestCacheNames", - "async": true, "parameters": [ { "name": "securityOrigin", "type": "string", "description": "Security origin." } ], @@ -1776,7 +1933,6 @@ }, { "name": "requestEntries", - "async": true, "parameters": [ { "name": "cacheId", "$ref": "CacheId", "description": "ID of cache to get entries from." }, { "name": "skipCount", "type": "integer", "description": "Number of records to skip." }, @@ -1790,24 +1946,31 @@ }, { "name": "deleteCache", - "async": true, "parameters": [ { "name": "cacheId", "$ref": "CacheId", "description": "Id of cache for deletion." } ], "description": "Deletes a cache." + }, + { + "name": "deleteEntry", + "parameters": [ + { "name": "cacheId", "$ref": "CacheId", "description": "Id of cache where the entry will be deleted." }, + { "name": "request", "type": "string", "description": "URL spec of the request." } + ], + "description": "Deletes a cache entry." } ] }, { "domain": "DOMStorage", - "hidden": true, + "experimental": true, "description": "Query and modify DOM storage.", "types": [ { "id": "StorageId", "type": "object", "description": "DOM Storage identifier.", - "hidden": true, + "experimental": true, "properties": [ { "name": "securityOrigin", "type": "string", "description": "Security origin for the storage." }, { "name": "isLocalStorage", "type": "boolean", "description": "Whether the storage is local storage (not session storage)." } @@ -1817,7 +1980,7 @@ "id": "Item", "type": "array", "description": "DOM Storage item.", - "hidden": true, + "experimental": true, "items": { "type": "string" } } ], @@ -1830,6 +1993,12 @@ "name": "disable", "description": "Disables storage tracking, prevents storage events from being sent to the client." }, + { + "name": "clear", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" } + ] + }, { "name": "getDOMStorageItems", "parameters": [ @@ -1890,7 +2059,7 @@ }, { "domain": "ApplicationCache", - "hidden": true, + "experimental": true, "types": [ { "id": "ApplicationCacheResource", @@ -1976,160 +2145,58 @@ ] }, { - "domain": "FileSystem", - "hidden": true, + "domain": "DOM", + "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>", + "dependencies": ["Runtime"], "types": [ { - "id": "Entry", - "type": "object", - "properties": [ - { "name": "url", "type": "string", "description": "filesystem: URL for the entry." }, - { "name": "name", "type": "string", "description": "The name of the file or directory." }, - { "name": "isDirectory", "type": "boolean", "description": "True if the entry is a directory." }, - { "name": "mimeType", "type": "string", "optional": true, "description": "MIME type of the entry, available for a file only." }, - { "name": "resourceType", "$ref": "Page.ResourceType", "optional": true, "description": "ResourceType of the entry, available for a file only." }, - { "name": "isTextFile", "type": "boolean", "optional": true, "description": "True if the entry is a text file." } - ], - "description": "Represents a browser side file or directory." + "id": "NodeId", + "type": "integer", + "description": "Unique DOM node identifier." + }, + { + "id": "BackendNodeId", + "type": "integer", + "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.", + "experimental": true }, { - "id": "Metadata", + "id": "BackendNode", "type": "object", "properties": [ - { "name": "modificationTime", "type": "number", "description": "Modification time." }, - { "name": "size", "type": "number", "description": "File size. This field is always zero for directories." } + { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." }, + { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." }, + { "name": "backendNodeId", "$ref": "BackendNodeId" } ], - "description": "Represents metadata of a file or entry." - } - ], - "commands": [ - { - "name": "enable", - "description": "Enables events from backend." - }, - { - "name": "disable", - "description": "Disables events from backend." + "experimental": true, + "description": "Backend node with a friendly name." }, { - "name": "requestFileSystemRoot", - "async": true, - "parameters": [ - { "name": "origin", "type": "string", "description": "Security origin of requesting FileSystem. One of frames in current page needs to have this security origin." }, - { "name": "type", "type": "string", "enum": ["temporary", "persistent"], "description": "FileSystem type of requesting FileSystem." } - ], - "returns": [ - { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, - { "name": "root", "$ref": "Entry", "optional": true, "description": "Contains root of the requested FileSystem if the command completed successfully." } + "id": "PseudoType", + "type": "string", + "enum": [ + "first-line", + "first-letter", + "before", + "after", + "backdrop", + "selection", + "first-line-inherited", + "scrollbar", + "scrollbar-thumb", + "scrollbar-button", + "scrollbar-track", + "scrollbar-track-piece", + "scrollbar-corner", + "resizer", + "input-list-button" ], - "description": "Returns root directory of the FileSystem, if exists." - }, - { - "name": "requestDirectoryContent", - "async": true, - "parameters": [ - { "name": "url", "type": "string", "description": "URL of the directory that the frontend is requesting to read from." } - ], - "returns": [ - { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, - { "name": "entries", "type": "array", "items": { "$ref": "Entry" }, "optional": true, "description": "Contains all entries on directory if the command completed successfully." } - ], - "description": "Returns content of the directory." - }, - { - "name": "requestMetadata", - "async": true, - "parameters": [ - { "name": "url", "type": "string", "description": "URL of the entry that the frontend is requesting to get metadata from." } - ], - "returns": [ - { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, - { "name": "metadata", "$ref": "Metadata", "optional": true, "description": "Contains metadata of the entry if the command completed successfully." } - ], - "description": "Returns metadata of the entry." - }, - { - "name": "requestFileContent", - "async": true, - "parameters": [ - { "name": "url", "type": "string", "description": "URL of the file that the frontend is requesting to read from." }, - { "name": "readAsText", "type": "boolean", "description": "True if the content should be read as text, otherwise the result will be returned as base64 encoded text." }, - { "name": "start", "type": "integer", "optional": true, "description": "Specifies the start of range to read." }, - { "name": "end", "type": "integer", "optional": true, "description": "Specifies the end of range to read exclusively." }, - { "name": "charset", "type": "string", "optional": true, "description": "Overrides charset of the content when content is served as text." } - ], - "returns": [ - { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise, errorCode is set to FileError::ErrorCode value." }, - { "name": "content", "type": "string", "optional": true, "description": "Content of the file." }, - { "name": "charset", "type": "string", "optional": true, "description": "Charset of the content if it is served as text." } - ], - "description": "Returns content of the file. Result should be sliced into [start, end)." - }, - { - "name": "deleteEntry", - "async": true, - "parameters": [ - { "name": "url", "type": "string", "description": "URL of the entry to delete." } - ], - "returns": [ - { "name": "errorCode", "type": "integer", "description": "0, if no error. Otherwise errorCode is set to FileError::ErrorCode value." } - ], - "description": "Deletes specified entry. If the entry is a directory, the agent deletes children recursively." - } - ] - }, - { - "domain": "DOM", - "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, resolve it into the JavaScript object wrapper, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.<p>Note that <code>iframe</code> owner elements will return corresponding document elements as their child nodes.</p>", - "types": [ - { - "id": "NodeId", - "type": "integer", - "description": "Unique DOM node identifier." - }, - { - "id": "BackendNodeId", - "type": "integer", - "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the front-end.", - "hidden": true - }, - { - "id": "BackendNode", - "type": "object", - "properties": [ - { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." }, - { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." }, - { "name": "backendNodeId", "$ref": "BackendNodeId" } - ], - "hidden": true, - "description": "Backend node with a friendly name." - }, - { - "id": "PseudoType", - "type": "string", - "enum": [ - "first-line", - "first-letter", - "before", - "after", - "backdrop", - "selection", - "first-line-inherited", - "scrollbar", - "scrollbar-thumb", - "scrollbar-button", - "scrollbar-track", - "scrollbar-track-piece", - "scrollbar-corner", - "resizer", - "input-list-button" - ], - "description": "Pseudo element type." + "description": "Pseudo element type." }, { "id": "ShadowRootType", "type": "string", - "enum": ["user-agent", "author"], + "enum": ["user-agent", "open", "closed"], "description": "Shadow root type." }, { @@ -2137,6 +2204,8 @@ "type": "object", "properties": [ { "name": "nodeId", "$ref": "NodeId", "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client." }, + { "name": "parentId", "$ref": "NodeId", "optional": true, "description": "The id of the parent node if any.", "experimental": true }, + { "name": "backendNodeId", "$ref": "BackendNodeId", "description": "The BackendNodeId for this node.", "experimental": true }, { "name": "nodeType", "type": "integer", "description": "<code>Node</code>'s nodeType." }, { "name": "nodeName", "type": "string", "description": "<code>Node</code>'s nodeName." }, { "name": "localName", "type": "string", "description": "<code>Node</code>'s localName." }, @@ -2145,7 +2214,7 @@ { "name": "children", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Child nodes of this node when requested with children." }, { "name": "attributes", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>." }, { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that <code>Document</code> or <code>FrameOwner</code> node points to." }, - { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion.", "hidden": true }, + { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that <code>Document</code> or <code>FrameOwner</code> node uses for URL completion.", "experimental": true }, { "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId." }, { "name": "systemId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s systemId." }, { "name": "internalSubset", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s internalSubset." }, @@ -2154,27 +2223,14 @@ { "name": "value", "type": "string", "optional": true, "description": "<code>Attr</code>'s value." }, { "name": "pseudoType", "$ref": "PseudoType", "optional": true, "description": "Pseudo element type for this node." }, { "name": "shadowRootType", "$ref": "ShadowRootType", "optional": true, "description": "Shadow root type." }, - { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Frame ID for frame owner elements.", "hidden": true }, + { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Frame ID for frame owner elements.", "experimental": true }, { "name": "contentDocument", "$ref": "Node", "optional": true, "description": "Content document for frame owner elements." }, - { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host.", "hidden": true }, - { "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements.", "hidden": true }, - { "name": "pseudoElements", "type": "array", "items": { "$ref": "Node" }, "optional": true, "description": "Pseudo elements associated with this node.", "hidden": true }, + { "name": "shadowRoots", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Shadow root list for given element host.", "experimental": true }, + { "name": "templateContent", "$ref": "Node", "optional": true, "description": "Content document fragment for template elements.", "experimental": true }, + { "name": "pseudoElements", "type": "array", "items": { "$ref": "Node" }, "optional": true, "description": "Pseudo elements associated with this node.", "experimental": true }, { "name": "importedDocument", "$ref": "Node", "optional": true, "description": "Import document for the HTMLImport links." }, - { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "optional": true, "description": "Distributed nodes for given insertion point.", "hidden": true } - ], - "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type." - }, - { - "id": "EventListener", - "type": "object", - "hidden": true, - "properties": [ - { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." }, - { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." }, - { "name": "isAttribute", "type": "boolean", "description": "<code>EventListener</code>'s isAttribute." }, - { "name": "nodeId", "$ref": "NodeId", "description": "Target <code>DOMNode</code> id." }, - { "name": "location", "$ref": "Debugger.Location", "description": "Handler code location." }, - { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." } + { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "optional": true, "description": "Distributed nodes for given insertion point.", "experimental": true }, + { "name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "experimental": true } ], "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type." }, @@ -2196,12 +2252,12 @@ "minItems": 8, "maxItems": 8, "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.", - "hidden": true + "experimental": true }, { "id": "BoxModel", "type": "object", - "hidden": true, + "experimental": true, "properties": [ { "name": "content", "$ref": "Quad", "description": "Content box" }, { "name": "padding", "$ref": "Quad", "description": "Padding box" }, @@ -2216,7 +2272,7 @@ { "id": "ShapeOutsideInfo", "type": "object", - "hidden": true, + "experimental": true, "properties": [ { "name": "bounds", "$ref": "Quad", "description": "Shape bounds" }, { "name": "shape", "type": "array", "items": { "type": "any"}, "description": "Shape coordinate details" }, @@ -2227,7 +2283,7 @@ { "id": "Rect", "type": "object", - "hidden": true, + "experimental": true, "properties": [ { "name": "x", "type": "number", "description": "X coordinate" }, { "name": "y", "type": "number", "description": "Y coordinate" }, @@ -2235,23 +2291,6 @@ { "name": "height", "type": "number", "description": "Rectangle height" } ], "description": "Rectangle." - }, - { - "id": "HighlightConfig", - "type": "object", - "properties": [ - { "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false)." }, - { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false)." }, - { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false)." }, - { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, - { "name": "paddingColor", "$ref": "RGBA", "optional": true, "description": "The padding highlight fill color (default: transparent)." }, - { "name": "borderColor", "$ref": "RGBA", "optional": true, "description": "The border highlight fill color (default: transparent)." }, - { "name": "marginColor", "$ref": "RGBA", "optional": true, "description": "The margin highlight fill color (default: transparent)." }, - { "name": "eventTargetColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The event target element highlight fill color (default: transparent)." }, - { "name": "shapeColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape outside fill color (default: transparent)." }, - { "name": "shapeMarginColor", "$ref": "RGBA", "optional": true, "hidden": true, "description": "The shape margin fill color (default: transparent)." } - ], - "description": "Configuration data for the highlighting of page elements." } ], "commands": [ @@ -2265,16 +2304,43 @@ }, { "name": "getDocument", + "parameters": [ + { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "experimental": true }, + { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).", "experimental": true } + ], "returns": [ { "name": "root", "$ref": "Node", "description": "Resulting node." } ], - "description": "Returns the root DOM node to the caller." + "description": "Returns the root DOM node (and optionally the subtree) to the caller." + }, + { + "name": "getFlattenedDocument", + "parameters": [ + { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "experimental": true }, + { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).", "experimental": true } + ], + "returns": [ + { "name": "nodes", "type": "array", "items": { "$ref": "Node" }, "description": "Resulting node." } + ], + "description": "Returns the root DOM node (and optionally the subtree) to the caller." + }, + { + "name": "collectClassNamesFromSubtree", + "parameters": [ + { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to collect class names." } + ], + "returns": [ + {"name": "classNames", "type": "array", "items": { "type": "string" }, "description": "Class name list." } + ], + "description": "Collects class names for the node with given id and all of it's child nodes.", + "experimental": true }, { "name": "requestChildNodes", "parameters": [ { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get children for." }, - { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "hidden": true } + { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "experimental": true }, + { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).", "experimental": true } ], "description": "Requests that children of the node with given id are returned to the caller in form of <code>setChildNodes</code> events where not only immediate children are retrieved, but all children down to the specified depth." }, @@ -2352,18 +2418,6 @@ ], "description": "Removes attribute with given name from an element with given id." }, - { - "name": "getEventListenersForNode", - "parameters": [ - { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get listeners for." }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name for handler value. Handler value is not returned without this parameter specified." } - ], - "returns": [ - { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." } - ], - "description": "Returns event listeners relevant to the node.", - "hidden": true - }, { "name": "getOuterHTML", "parameters": [ @@ -2386,14 +2440,14 @@ "name": "performSearch", "parameters": [ { "name": "query", "type": "string", "description": "Plain text or query selector or XPath search query." }, - { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "True to search in user agent shadow DOM.", "hidden": true } + { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "True to search in user agent shadow DOM.", "experimental": true } ], "returns": [ { "name": "searchId", "type": "string", "description": "Unique search session identifier." }, { "name": "resultCount", "type": "integer", "description": "Number of search results." } ], "description": "Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.", - "hidden": true + "experimental": true }, { "name": "getSearchResults", @@ -2406,7 +2460,7 @@ { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the search result nodes." } ], "description": "Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the sarch with the given identifier.", - "hidden": true + "experimental": true }, { "name": "discardSearchResults", @@ -2414,7 +2468,7 @@ { "name": "searchId", "type": "string", "description": "Unique search session identifier." } ], "description": "Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.", - "hidden": true + "experimental": true }, { "name": "requestNode", @@ -2426,61 +2480,20 @@ ], "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of <code>setChildNodes</code> notifications." }, - { - "name": "setInspectModeEnabled", - "hidden": true, - "parameters": [ - { "name": "enabled", "type": "boolean", "description": "True to enable inspection mode, false to disable it." }, - { "name": "inspectUAShadowDOM", "type": "boolean", "optional": true, "description": "True to enable inspection mode for user agent shadow DOM." }, - { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." } - ], - "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection." - }, { "name": "highlightRect", - "parameters": [ - { "name": "x", "type": "integer", "description": "X coordinate" }, - { "name": "y", "type": "integer", "description": "Y coordinate" }, - { "name": "width", "type": "integer", "description": "Rectangle width" }, - { "name": "height", "type": "integer", "description": "Rectangle height" }, - { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, - { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } - ], - "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport." - }, - { - "name": "highlightQuad", - "parameters": [ - { "name": "quad", "$ref": "Quad", "description": "Quad to highlight" }, - { "name": "color", "$ref": "RGBA", "optional": true, "description": "The highlight fill color (default: transparent)." }, - { "name": "outlineColor", "$ref": "RGBA", "optional": true, "description": "The highlight outline color (default: transparent)." } - ], - "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.", - "hidden": true + "description": "Highlights given rectangle.", + "redirect": "Overlay" }, { "name": "highlightNode", - "parameters": [ - { "name": "highlightConfig", "$ref": "HighlightConfig", "description": "A descriptor for the highlight appearance." }, - { "name": "nodeId", "$ref": "NodeId", "optional": true, "description": "Identifier of the node to highlight." }, - { "name": "backendNodeId", "$ref": "BackendNodeId", "optional": true, "description": "Identifier of the backend node to highlight." }, - { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "hidden": true } - ], - "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified." + "description": "Highlights DOM node.", + "redirect": "Overlay" }, { "name": "hideHighlight", - "description": "Hides DOM node highlight." - }, - { - "name": "highlightFrame", - "parameters": [ - { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame to highlight." }, - { "name": "contentColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight fill color (default: transparent)." }, - { "name": "contentOutlineColor", "$ref": "RGBA", "optional": true, "description": "The content box highlight outline color (default: transparent)." } - ], - "description": "Highlights owner element of the frame with given id.", - "hidden": true + "description": "Hides any highlight.", + "redirect": "Overlay" }, { "name": "pushNodeByPathToFrontend", @@ -2491,7 +2504,7 @@ { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node for given path." } ], "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath", - "hidden": true + "experimental": true }, { "name": "pushNodesByBackendIdsToFrontend", @@ -2502,7 +2515,7 @@ { "name": "nodeIds", "type": "array", "items": {"$ref": "NodeId"}, "description": "The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds." } ], "description": "Requests that a batch of nodes is sent to the caller given their backend node ids.", - "hidden": true + "experimental": true }, { "name": "setInspectedNode", @@ -2510,7 +2523,7 @@ { "name": "nodeId", "$ref": "NodeId", "description": "DOM node id to be accessible by means of $x command line API." } ], "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).", - "hidden": true + "experimental": true }, { "name": "resolveNode", @@ -2544,7 +2557,7 @@ { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node clone." } ], "description": "Creates a deep copy of the specified node and places it into the target container before the given anchor.", - "hidden": true + "experimental": true }, { "name": "moveTo", @@ -2561,17 +2574,17 @@ { "name": "undo", "description": "Undoes the last performed action.", - "hidden": true + "experimental": true }, { "name": "redo", "description": "Re-does the last undone action.", - "hidden": true + "experimental": true }, { "name": "markUndoableState", "description": "Marks last undoable state.", - "hidden": true + "experimental": true }, { "name": "focus", @@ -2579,7 +2592,7 @@ { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to focus." } ], "description": "Focuses the given element.", - "hidden": true + "experimental": true }, { "name": "setFileInputFiles", @@ -2588,8 +2601,7 @@ { "name": "files", "type": "array", "items": { "type": "string" }, "description": "Array of file paths to set." } ], "description": "Sets files for the given file input element.", - "hidden": true, - "handlers": ["browser", "renderer"] + "experimental": true }, { "name": "getBoxModel", @@ -2600,19 +2612,20 @@ { "name": "model", "$ref": "BoxModel", "description": "Box model for the node." } ], "description": "Returns boxes for the currently selected nodes.", - "hidden": true + "experimental": true }, { "name": "getNodeForLocation", "parameters": [ { "name": "x", "type": "integer", "description": "X coordinate." }, - { "name": "y", "type": "integer", "description": "Y coordinate." } + { "name": "y", "type": "integer", "description": "Y coordinate." }, + { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "False to skip to the nearest non-UA shadow root ancestor (default: false)." } ], "returns": [ { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node at given coordinates." } ], "description": "Returns node id at given location.", - "hidden": true + "experimental": true }, { "name": "getRelayoutBoundary", @@ -2623,18 +2636,7 @@ { "name": "nodeId", "$ref": "NodeId", "description": "Relayout boundary node id for the given node." } ], "description": "Returns the id of the nearest ancestor that is a relayout boundary.", - "hidden": true - }, - { - "name": "getHighlightObjectForTest", - "parameters": [ - { "name": "nodeId", "$ref": "NodeId", "description": "Id of the node to get highlight object for." } - ], - "returns": [ - { "name": "highlight", "type": "object", "description": "Highlight data for the node." } - ], - "description": "For testing.", - "hidden": true + "experimental": true } ], "events": [ @@ -2642,14 +2644,6 @@ "name": "documentUpdated", "description": "Fired when <code>Document</code> has been totally updated. Node ids are no longer valid." }, - { - "name": "inspectNodeRequested", - "parameters": [ - { "name": "backendNodeId", "$ref": "BackendNodeId", "description": "Id of the node to inspect." } - ], - "description": "Fired when the node should be inspected. This happens after call to <code>setInspectModeEnabled</code>.", - "hidden" : true - }, { "name": "setChildNodes", "parameters": [ @@ -2681,7 +2675,7 @@ { "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the nodes for which the inline styles have been invalidated." } ], "description": "Fired when <code>Element</code>'s inline style is modified via a CSS property modification.", - "hidden": true + "experimental": true }, { "name": "characterDataModified", @@ -2723,7 +2717,7 @@ { "name": "root", "$ref": "Node", "description": "Shadow root." } ], "description": "Called when shadow root is pushed into the element.", - "hidden": true + "experimental": true }, { "name": "shadowRootPopped", @@ -2732,7 +2726,7 @@ { "name": "rootId", "$ref": "NodeId", "description": "Shadow root id." } ], "description": "Called when shadow root is popped from the element.", - "hidden": true + "experimental": true }, { "name": "pseudoElementAdded", @@ -2741,7 +2735,7 @@ { "name": "pseudoElement", "$ref": "Node", "description": "The added pseudo element." } ], "description": "Called when a pseudo element is added to an element.", - "hidden": true + "experimental": true }, { "name": "pseudoElementRemoved", @@ -2750,7 +2744,7 @@ { "name": "pseudoElementId", "$ref": "NodeId", "description": "The removed pseudo element id." } ], "description": "Called when a pseudo element is removed from an element.", - "hidden": true + "experimental": true }, { "name": "distributedNodesUpdated", @@ -2759,14 +2753,15 @@ { "name": "distributedNodes", "type": "array", "items": { "$ref": "BackendNode" }, "description": "Distributed nodes for given insertion point." } ], "description": "Called when distrubution is changed.", - "hidden": true + "experimental": true } ] }, { "domain": "CSS", - "hidden": true, + "experimental": true, "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated <code>id</code> used in subsequent operations on the related object. Each object type has a specific <code>id</code> structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the <code>get*ForNode()</code> calls (which accept a DOM node id). A client can also discover all the existing stylesheets with the <code>getAllStyleSheets()</code> method (or keeping track of the <code>styleSheetAdded</code>/<code>styleSheetRemoved</code> events) and subsequently load the required stylesheet contents using the <code>getStyleSheet[Text]()</code> methods.", + "dependencies": ["DOM"], "types": [ { "id": "StyleSheetId", @@ -2779,10 +2774,10 @@ "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent stylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via inspector\" rules), \"regular\" for regular stylesheets." }, { - "id": "PseudoIdMatches", + "id": "PseudoElementMatches", "type": "object", "properties": [ - { "name": "pseudoId", "type": "integer", "description": "Pseudo style identifier (see <code>enum PseudoId</code> in <code>ComputedStyleConstants.h</code>)."}, + { "name": "pseudoType", "$ref": "DOM.PseudoType", "description": "Pseudo element type."}, { "name": "matches", "type": "array", "items": { "$ref": "RuleMatch" }, "description": "Matches of CSS rules applicable to the pseudo style."} ], "description": "CSS rule collection for a single pseudo style." @@ -2806,11 +2801,11 @@ "description": "Match data for a CSS rule." }, { - "id": "Selector", + "id": "Value", "type": "object", "properties": [ - { "name": "value", "type": "string", "description": "Selector text." }, - { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Selector range in the underlying resource (if available)." } + { "name": "text", "type": "string", "description": "Value text." }, + { "name": "range", "$ref": "SourceRange", "optional": true, "description": "Value range in the underlying resource (if available)." } ], "description": "Data for a simple selector (these are delimited by commas in a selector list)." }, @@ -2818,7 +2813,7 @@ "id": "SelectorList", "type": "object", "properties": [ - { "name": "selectors", "type": "array", "items": { "$ref": "Selector" }, "description": "Selectors in the list." }, + { "name": "selectors", "type": "array", "items": { "$ref": "Value" }, "description": "Selectors in the list." }, { "name": "text", "type": "string", "description": "Rule selector text." } ], "description": "Selector list data." @@ -2838,7 +2833,8 @@ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment." }, { "name": "isInline", "type": "boolean", "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags." }, { "name": "startLine", "type": "number", "description": "Line offset of the stylesheet within the resource (zero based)." }, - { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." } + { "name": "startColumn", "type": "number", "description": "Column offset of the stylesheet within the resource (zero based)." }, + { "name": "length", "type": "number", "description": "Size of the content (in characters).", "experimental": true } ], "description": "CSS stylesheet metainformation." }, @@ -2854,6 +2850,18 @@ ], "description": "CSS rule representation." }, + { + "id": "RuleUsage", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, + { "name": "startOffset", "type": "number", "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet." }, + { "name": "endOffset", "type": "number", "description": "Offset of the end of the rule body from the beginning of the stylesheet." }, + { "name": "used", "type": "boolean", "description": "Indicates whether the rule was actually used by some element in the page." } + ], + "description": "CSS coverage information.", + "experimental": true + }, { "id": "SourceRange", "type": "object", @@ -2870,7 +2878,8 @@ "type": "object", "properties": [ { "name": "name", "type": "string", "description": "Shorthand name." }, - { "name": "value", "type": "string", "description": "Shorthand value." } + { "name": "value", "type": "string", "description": "Shorthand value." }, + { "name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \"!important\" annotation (implies <code>false</code> if absent)." } ] }, { @@ -2916,8 +2925,8 @@ { "name": "source", "type": "string", "enum": ["mediaRule", "importRule", "linkedSheet", "inlineSheet"], "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if specified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked stylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline stylesheet's STYLE tag." }, { "name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description." }, { "name": "range", "$ref": "SourceRange", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available)." }, - { "name": "parentStyleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists)." }, - { "name": "mediaList", "type": "array", "items": { "$ref": "MediaQuery" }, "optional": true, "hidden": true, "description": "Array of media queries." } + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists)." }, + { "name": "mediaList", "type": "array", "items": { "$ref": "MediaQuery" }, "optional": true, "experimental": true, "description": "Array of media queries." } ], "description": "CSS media rule descriptor." }, @@ -2929,7 +2938,7 @@ { "name": "active", "type": "boolean", "description": "Whether the media query condition is satisfied." } ], "description": "Media query descriptor.", - "hidden": true + "experimental": true }, { "id": "MediaQueryExpression", @@ -2942,23 +2951,86 @@ { "name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable)."} ], "description": "Media query expression descriptor.", - "hidden": true + "experimental": true }, { "id": "PlatformFontUsage", "type": "object", "properties": [ { "name": "familyName", "type": "string", "description": "Font's family name reported by platform."}, + { "name": "isCustomFont", "type": "boolean", "description": "Indicates if the font was downloaded or resolved locally."}, { "name": "glyphCount", "type": "number", "description": "Amount of glyphs that were rendered with this font."} ], "description": "Information about amount of glyphs that were rendered with given font.", - "hidden": true + "experimental": true + }, + { + "id": "CSSKeyframesRule", + "type": "object", + "properties": [ + { "name": "animationName", "$ref": "Value", "description": "Animation name." }, + { "name": "keyframes", "type": "array", "items": { "$ref": "CSSKeyframeRule" }, "description": "List of keyframes." } + ], + "description": "CSS keyframes rule representation." + }, + { + "id": "CSSKeyframeRule", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from." }, + { "name": "origin", "$ref": "StyleSheetOrigin", "description": "Parent stylesheet's origin."}, + { "name": "keyText", "$ref": "Value", "description": "Associated key text." }, + { "name": "style", "$ref": "CSSStyle", "description": "Associated style declaration." } + ], + "description": "CSS keyframe rule representation." + }, + { + "id": "StyleDeclarationEdit", + "type": "object", + "properties": [ + { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier." }, + { "name": "range", "$ref": "SourceRange", "description": "The range of the style text in the enclosing stylesheet." }, + { "name": "text", "type": "string", "description": "New style text."} + ], + "description": "A descriptor of operation to mutate style declaration text." + }, + { + "id": "InlineTextBox", + "type": "object", + "properties": [ + { "name": "boundingBox", "$ref": "DOM.Rect", "description": "The absolute position bounding box." }, + { "name": "startCharacterIndex", "type": "integer", "description": "The starting index in characters, for this post layout textbox substring." }, + { "name": "numCharacters", "type": "integer", "description": "The number of characters in this post layout textbox substring." } + ], + "description": "Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.", + "experimental": true + }, + { + "id": "LayoutTreeNode", + "type": "object", + "properties": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The id of the related DOM node matching one from DOM.GetDocument." }, + { "name": "boundingBox", "$ref": "DOM.Rect", "description": "The absolute position bounding box." }, + { "name": "layoutText", "type": "string", "optional": true, "description": "Contents of the LayoutText if any" }, + { "name": "inlineTextNodes", "type": "array", "optional": true, "items": { "$ref": "InlineTextBox" }, "description": "The post layout inline text nodes, if any." }, + { "name": "styleIndex", "type": "integer", "optional": true, "description": "Index into the computedStyles array returned by getLayoutTreeAndStyles." } + ], + "description": "Details of an element in the DOM tree with a LayoutObject.", + "experimental": true + }, + { + "id": "ComputedStyle", + "type": "object", + "properties": [ + { "name": "properties", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" } } + ], + "description": "A subset of the full ComputedStyle as defined by the request whitelist.", + "experimental": true } ], "commands": [ { "name": "enable", - "async": true, "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received." }, { @@ -2968,14 +3040,15 @@ { "name": "getMatchedStylesForNode", "parameters": [ - { "name": "nodeId", "$ref": "DOM.NodeId" }, - { "name": "excludePseudo", "type": "boolean", "optional": true, "description": "Whether to exclude pseudo styles (default: false)." }, - { "name": "excludeInherited", "type": "boolean", "optional": true, "description": "Whether to exclude inherited styles (default: false)." } + { "name": "nodeId", "$ref": "DOM.NodeId" } ], "returns": [ + { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." }, + { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."}, { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "optional": true, "description": "CSS rules matching this node, from all applicable stylesheets." }, - { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoIdMatches" }, "optional": true, "description": "Pseudo style matches for this node." }, - { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "optional": true, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." } + { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoElementMatches" }, "optional": true, "description": "Pseudo style matches for this node." }, + { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "optional": true, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." }, + { "name": "cssKeyframesRules", "type": "array", "items": { "$ref": "CSSKeyframesRule" }, "optional": true, "description": "A list of CSS keyframed animations matching this node." } ], "description": "Returns requested styles for a DOM node identified by <code>nodeId</code>." }, @@ -3006,11 +3079,10 @@ { "name": "nodeId", "$ref": "DOM.NodeId" } ], "returns": [ - { "name": "cssFamilyName", "type": "string", "description": "Font family name which is determined by computed style." }, { "name": "fonts", "type": "array", "items": { "$ref": "PlatformFontUsage" }, "description": "Usage statistics for every employed platform font." } ], "description": "Requests information about platform fonts which we used to render child TextNodes in the given node.", - "hidden": true + "experimental": true }, { "name": "getStyleSheetText", @@ -3023,24 +3095,26 @@ "description": "Returns the current textual content and the URL for a stylesheet." }, { - "name": "setStyleSheetText", + "name": "collectClassNames", "parameters": [ - { "name": "styleSheetId", "$ref": "StyleSheetId" }, - { "name": "text", "type": "string" } + { "name": "styleSheetId", "$ref": "StyleSheetId" } ], - "description": "Sets the new stylesheet text." + "returns": [ + {"name": "classNames", "type": "array", "items": { "type": "string" }, "description": "Class name list." } + ], + "description": "Returns all class names from specified stylesheet.", + "experimental": true }, { - "name": "setPropertyText", + "name": "setStyleSheetText", "parameters": [ { "name": "styleSheetId", "$ref": "StyleSheetId" }, - { "name": "range", "$ref": "SourceRange", "description": "Either a source range of the property to be edited or an empty range representing a position for the property insertion." }, { "name": "text", "type": "string" } ], "returns": [ - { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the property text modification." } + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." } ], - "description": "Either replaces a property identified by <code>styleSheetId</code> and <code>range</code> with <code>text</code> or inserts a new property <code>text</code> at the position identified by an empty <code>range</code>." + "description": "Sets the new stylesheet text." }, { "name": "setRuleSelector", @@ -3050,10 +3124,32 @@ { "name": "selector", "type": "string" } ], "returns": [ - { "name": "rule", "$ref": "CSSRule", "description": "The resulting rule after the selector modification." } + { "name": "selectorList", "$ref": "SelectorList", "description": "The resulting selector list after modification." } ], "description": "Modifies the rule selector." }, + { + "name": "setKeyframeKey", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "keyText", "type": "string" } + ], + "returns": [ + { "name": "keyText", "$ref": "Value", "description": "The resulting key text after modification." } + ], + "description": "Modifies the keyframe rule key text." + }, + { + "name": "setStyleTexts", + "parameters": [ + { "name": "edits", "type": "array", "items": { "$ref": "StyleDeclarationEdit" }} + ], + "returns": [ + { "name": "styles", "type": "array", "items": { "$ref": "CSSStyle" }, "description": "The resulting styles after modification." } + ], + "description": "Applies specified style edits one after another in the given order." + }, { "name": "setMediaText", "parameters": [ @@ -3102,7 +3198,60 @@ { "name": "medias", "type": "array", "items": { "$ref": "CSSMedia" } } ], "description": "Returns all media queries parsed by the rendering engine.", - "hidden": true + "experimental": true + }, + { + "name": "setEffectivePropertyValueForNode", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to set property." }, + { "name": "propertyName", "type": "string"}, + { "name": "value", "type": "string"} + ], + "description": "Find a rule with the given active property for the given node and set the new value for this property", + "experimental": true + }, + { + "name": "getBackgroundColors", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get background colors for." } + ], + "returns": [ + { "name": "backgroundColors", "type": "array", "items": { "type": "string" }, "description": "The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).", "optional": true } + ], + "experimental": true + }, + { + "name": "getLayoutTreeAndStyles", + "parameters": [ + { "name": "computedStyleWhitelist", "type": "array", "items": { "type": "string" }, "description": "Whitelist of computed styles to return." } + ], + "returns": [ + { "name": "layoutTreeNodes", "type": "array", "items": { "$ref": "LayoutTreeNode" } }, + { "name": "computedStyles", "type": "array", "items": { "$ref": "ComputedStyle" } } + ], + "description": "For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1.", + "experimental": true + }, + { + "name": "startRuleUsageTracking", + "description": "Enables the selector recording.", + "experimental": true + }, + { + "name": "takeCoverageDelta", + "description": "Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)", + "returns": [ + { "name": "coverage", "type": "array", "items": { "$ref": "RuleUsage" } } + ], + "experimental": true + }, + { + "name": "stopRuleUsageTracking", + "returns": [ + { "name": "ruleUsage", "type": "array", "items": { "$ref": "RuleUsage" } } + ], + "description": "The list of rules with an indication of whether these were used", + "experimental": true } ], "events": [ @@ -3110,6 +3259,10 @@ "name": "mediaQueryResultChanged", "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features." }, + { + "name": "fontsUpdated", + "description": "Fires whenever a web font gets loaded." + }, { "name": "styleSheetChanged", "parameters": [ @@ -3134,665 +3287,66 @@ ] }, { - "domain": "Timeline", - "description": "Timeline domain is deprecated. Please use Tracing instead.", + "domain": "IO", + "description": "Input/Output operations for streams produced by DevTools.", + "experimental": true, "types": [ { - "id": "TimelineEvent", - "type": "object", - "properties": [ - { "name": "type", "type": "string", "description": "Event type." }, - { "name": "data", "type": "object", "description": "Event data." }, - { "name": "startTime", "type": "number", "description": "Start time." }, - { "name": "endTime", "type": "number", "optional": true, "description": "End time." }, - { "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." }, - { "name": "thread", "type": "string", "optional": true, "hidden": true, "description": "If present, identifies the thread that produced the event." }, - { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "hidden": true, "description": "Stack trace." }, - { "name": "frameId", "type": "string", "optional": true, "hidden": true, "description": "Unique identifier of the frame within the page that the event relates to." } - ], - "description": "Timeline record contains information about the recorded activity." + "id": "StreamHandle", + "type": "string" } ], "commands": [ { - "name": "enable", - "description": "Deprecated." - }, - { - "name": "disable", - "description": "Deprecated." - }, - { - "name": "start", + "name": "read", + "description": "Read a chunk of the stream", "parameters": [ - { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." }, - { "name": "bufferEvents", "optional": true, "type": "boolean", "hidden": true, "description": "Whether instrumentation events should be buffered and returned upon <code>stop</code> call." }, - { "name": "liveEvents", "optional": true, "type": "string", "hidden": true, "description": "Coma separated event types to issue although bufferEvents is set."}, - { "name": "includeCounters", "optional": true, "type": "boolean", "hidden": true, "description": "Whether counters data should be included into timeline events." }, - { "name": "includeGPUEvents", "optional": true, "type": "boolean", "hidden": true, "description": "Whether events from GPU process should be collected." } + { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to read." }, + { "name": "offset", "type": "integer", "optional": true, "description": "Seek to the specified offset before reading (if not specificed, proceed with offset following the last read)." }, + { "name": "size", "type": "integer", "optional": true, "description": "Maximum number of bytes to read (left upon the agent discretion if not specified)." } ], - "description": "Deprecated." + "returns": [ + { "name": "data", "type": "string", "description": "Data that were read." }, + { "name": "eof", "type": "boolean", "description": "Set if the end-of-file condition occured while reading." } + ] }, { - "name": "stop", - "description": "Deprecated." - } - ], - "events": [ - { - "name": "eventRecorded", - "parameters": [ - { "name": "record", "$ref": "TimelineEvent", "description": "Timeline event record data." } - ], - "description": "Deprecated." - } - ] - }, - { - "domain": "Debugger", - "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.", - "types": [ - { - "id": "BreakpointId", - "type": "string", - "description": "Breakpoint identifier." - }, - { - "id": "ScriptId", - "type": "string", - "description": "Unique script identifier." - }, - { - "id": "CallFrameId", - "type": "string", - "description": "Call frame identifier." - }, - { - "id": "Location", - "type": "object", - "properties": [ - { "name": "scriptId", "$ref": "ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." }, - { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." }, - { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." } - ], - "description": "Location in the source code." - }, - { - "id": "FunctionDetails", - "hidden": true, - "type": "object", - "properties": [ - { "name": "location", "$ref": "Location", "optional": true, "description": "Location of the function, none for native functions." }, - { "name": "functionName", "type": "string", "description": "Name of the function." }, - { "name": "isGenerator", "type": "boolean", "description": "Whether this is a generator function." }, - { "name": "scopeChain", "type": "array", "optional": true, "items": { "$ref": "Scope" }, "description": "Scope chain for this closure." } - ], - "description": "Information about the function." - }, - { - "id": "GeneratorObjectDetails", - "hidden": true, - "type": "object", - "properties": [ - { "name": "function", "$ref": "Runtime.RemoteObject", "description": "Generator function." }, - { "name": "functionName", "type": "string", "description": "Name of the generator function." }, - { "name": "status", "type": "string", "enum": ["running", "suspended", "closed"], "description": "Current generator object status." }, - { "name": "location", "$ref": "Location", "optional": true, "description": "If suspended, location where generator function was suspended (e.g. location of the last 'yield'). Otherwise, location of the generator function." } - ], - "description": "Information about the generator object." - }, - { - "id": "CollectionEntry", - "hidden": true, - "type": "object", - "properties": [ - { "name": "key", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Entry key of a map-like collection, otherwise not provided." }, - { "name": "value", "$ref": "Runtime.RemoteObject", "description": "Entry value." } - ], - "description": "Collection entry." - }, - { - "id": "CallFrame", - "type": "object", - "properties": [ - { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." }, - { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." }, - { "name": "functionLocation", "$ref": "Location", "optional": true, "hidden": true, "description": "Location in the source code." }, - { "name": "location", "$ref": "Location", "description": "Location in the source code." }, - { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." }, - { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }, - { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "hidden": true, "description": "The value being returned, if the function is at return point." } - ], - "description": "JavaScript call frame. Array of call frames form the call stack." - }, - { - "id": "StackTrace", - "type": "object", - "properties": [ - { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call frames of the stack trace." }, - { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." }, - { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any." } - ], - "description": "JavaScript call stack, including async stack traces.", - "hidden": true - }, - { - "id": "Scope", - "type": "object", - "properties": [ - { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script"], "description": "Scope type." }, - { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." } - ], - "description": "Scope description." - }, - { - "id": "ExceptionDetails", - "type": "object", - "description": "Detailed information on exception (or error) that was thrown during script compilation or execution.", - "properties": [ - { "name": "text", "type": "string", "description": "Exception text." }, - { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, - { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the message origin." }, - { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message." }, - { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message." }, - { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace for assertions and error messages." } - ] - }, - { - "id": "SetScriptSourceError", - "type": "object", - "properties": [ - { "name": "compileError", "optional": true, "type": "object", "properties": - [ - { "name": "message", "type": "string", "description": "Compiler error message" }, - { "name": "lineNumber", "type": "integer", "description": "Compile error line number (1-based)" }, - { "name": "columnNumber", "type": "integer", "description": "Compile error column number (1-based)" } - ] - } - ], - "description": "Error data for setScriptSource command. compileError is a case type for uncompilable script source error.", - "hidden": true - }, - { - "id": "PromiseDetails", - "type": "object", - "description": "Information about the promise.", - "properties": [ - { "name": "id", "type": "integer", "description": "Unique id of the promise." }, - { "name": "status", "type": "string", "enum": ["pending", "resolved", "rejected"], "description": "Status of the promise." }, - { "name": "parentId", "type": "integer", "optional": true, "description": "Id of the parent promise." }, - { "name": "callFrame", "$ref": "Console.CallFrame", "optional": true, "description": "Top call frame on promise creation."}, - { "name": "creationTime", "type": "number", "optional": true, "description": "Creation time of the promise." }, - { "name": "settlementTime", "type": "number", "optional": true, "description": "Settlement time of the promise." }, - { "name": "creationStack", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace on promise creation." }, - { "name": "asyncCreationStack", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "JavaScript asynchronous stack trace on promise creation, if available." }, - { "name": "settlementStack", "$ref": "Console.StackTrace", "optional": true, "description": "JavaScript stack trace on promise settlement." }, - { "name": "asyncSettlementStack", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "JavaScript asynchronous stack trace on promise settlement, if available." } - ], - "hidden": true - }, - { - "id": "AsyncOperation", - "type": "object", - "description": "Information about the async operation.", - "properties": [ - { "name": "id", "type": "integer", "description": "Unique id of the async operation." }, - { "name": "description", "type": "string", "description": "String description of the async operation." }, - { "name": "stackTrace", "$ref": "Console.StackTrace", "optional": true, "description": "Stack trace where async operation was scheduled." }, - { "name": "asyncStackTrace", "$ref": "Console.AsyncStackTrace", "optional": true, "description": "Asynchronous stack trace where async operation was scheduled, if available." } - ], - "hidden": true - }, - { - "id": "SearchMatch", - "type": "object", - "description": "Search match for resource.", - "properties": [ - { "name": "lineNumber", "type": "number", "description": "Line number in resource content." }, - { "name": "lineContent", "type": "string", "description": "Line with match content." } - ], - "hidden": true - } - ], - "commands": [ - { - "name": "enable", - "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received." - }, - { - "name": "disable", - "description": "Disables debugger for given page." - }, - { - "name": "setBreakpointsActive", - "parameters": [ - { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." } - ], - "description": "Activates / deactivates all breakpoints on the page." - }, - { - "name": "setSkipAllPauses", - "hidden": true, - "parameters": [ - { "name": "skipped", "type": "boolean", "description": "New value for skip pauses state." } - ], - "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)." - }, - { - "name": "setBreakpointByUrl", - "parameters": [ - { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." }, - { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." }, - { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." }, - { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." }, - { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } - ], - "returns": [ - { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, - { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." } - ], - "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads." - }, - { - "name": "setBreakpoint", - "parameters": [ - { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." }, - { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } - ], - "returns": [ - { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, - { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." } - ], - "description": "Sets JavaScript breakpoint at a given location." - }, - { - "name": "removeBreakpoint", - "parameters": [ - { "name": "breakpointId", "$ref": "BreakpointId" } - ], - "description": "Removes JavaScript breakpoint." - }, - { - "name": "continueToLocation", - "parameters": [ - { "name": "location", "$ref": "Location", "description": "Location to continue to." }, - { "name": "interstatementLocation", "type": "boolean", "optional": true, "hidden": true, "description": "Allows breakpoints at the intemediate positions inside statements." } - ], - "description": "Continues execution until specific location is reached." - }, - { - "name": "stepOver", - "description": "Steps over the statement." - }, - { - "name": "stepInto", - "description": "Steps into the function call." - }, - { - "name": "stepOut", - "description": "Steps out of the function call." - }, - { - "name": "pause", - "description": "Stops on the next JavaScript statement." - }, - { - "name": "resume", - "description": "Resumes JavaScript execution." - }, - { - "name": "stepIntoAsync", - "description": "Steps into the first async operation handler that was scheduled by or after the current statement.", - "hidden": true - }, - { - "name": "searchInContent", - "parameters": [ - { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to search in." }, - { "name": "query", "type": "string", "description": "String to search for." }, - { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, - { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } - ], - "returns": [ - { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." } - ], - "description": "Searches for given string in script content." - }, - { - "name": "canSetScriptSource", - "returns": [ - { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." } - ], - "description": "Always returns true." - }, - { - "name": "setScriptSource", - "parameters": [ - { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." }, - { "name": "scriptSource", "type": "string", "description": "New content of the script." }, - { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true } - ], - "returns": [ - { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." }, - { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied.", "hidden": true }, - { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true } - ], - "error": { - "$ref": "SetScriptSourceError" - }, - "description": "Edits JavaScript source live." - }, - { - "name": "restartFrame", - "parameters": [ - { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." } - ], - "returns": [ - { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." }, - { "name": "result", "type": "object", "description": "VM-specific description." }, - { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any." } - ], - "hidden": true, - "description": "Restarts particular call frame from the beginning." - }, - { - "name": "getScriptSource", - "parameters": [ - { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to get source for." } - ], - "returns": [ - { "name": "scriptSource", "type": "string", "description": "Script source." } - ], - "description": "Returns source for the script with given id." - }, - { - "name": "getFunctionDetails", - "hidden": true, - "parameters": [ - { "name": "functionId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the function to get details for." } - ], - "returns": [ - { "name": "details", "$ref": "FunctionDetails", "description": "Information about the function." } - ], - "description": "Returns detailed information on given function." - }, - { - "name": "getGeneratorObjectDetails", - "hidden": true, - "parameters": [ - { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the generator object to get details for." } - ], - "returns": [ - { "name": "details", "$ref": "GeneratorObjectDetails", "description": "Information about the generator object." } - ], - "description": "Returns detailed information on given generator object." - }, - { - "name": "getCollectionEntries", - "hidden": true, - "parameters": [ - { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the collection to get entries for." } - ], - "returns": [ - { "name": "entries", "type": "array", "items": { "$ref": "CollectionEntry" }, "description": "Array of collection entries." } - ], - "description": "Returns entries of given collection." - }, - { - "name": "setPauseOnExceptions", - "parameters": [ - { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." } - ], - "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>." - }, - { - "name": "evaluateOnCallFrame", - "parameters": [ - { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }, - { "name": "expression", "type": "string", "description": "Expression to evaluate." }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." }, - { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "hidden": true }, - { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.", "hidden": true }, - { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, - { "name": "generatePreview", "type": "boolean", "optional": true, "hidden": true, "description": "Whether preview should be generated for the result." } - ], - "returns": [ - { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." }, - { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, - { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "hidden": true, "description": "Exception details."} - ], - "description": "Evaluates expression on a given call frame." - }, - { - "name": "compileScript", - "hidden": true, - "parameters": [ - { "name": "expression", "type": "string", "description": "Expression to compile." }, - { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }, - { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." }, - { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." } - ], - "returns": [ - { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." }, - { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} - ], - "description": "Compiles expression." - }, - { - "name": "runScript", - "hidden": true, - "parameters": [ - { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." }, - { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, - { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." } - ], - "returns": [ - { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." }, - { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} - ], - "description": "Runs script with given id in a given context." - }, - { - "name": "setVariableValue", - "parameters": [ - { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." }, - { "name": "variableName", "type": "string", "description": "Variable name." }, - { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." }, - { "name": "callFrameId", "$ref": "CallFrameId", "optional": true, "description": "Id of callframe that holds variable." }, - { "name": "functionObjectId", "$ref": "Runtime.RemoteObjectId", "optional": true, "description": "Object id of closure (function) that holds variable." } - ], - "hidden": true, - "description": "Changes value of variable in a callframe or a closure. Either callframe or function must be specified. Object-based scopes are not supported and must be mutated manually." - }, - { - "name": "getStepInPositions", - "parameters": [ - { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of a call frame where the current statement should be analized" } - ], - "returns": [ - { "name": "stepInPositions", "type": "array", "items": { "$ref": "Location" }, "optional": true, "description": "experimental" } - ], - "hidden": true, - "description": "Lists all positions where step-in is possible for a current statement in a specified call frame" - }, - { - "name": "getBacktrace", - "returns": [ - { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }, - { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any." } - ], - "hidden": true, - "description": "Returns call stack including variables changed since VM was paused. VM must be paused." - }, - { - "name": "skipStackFrames", - "parameters": [ - { "name": "script", "type": "string", "optional": true, "description": "Regular expression defining the scripts to ignore while stepping." }, - { "name": "skipContentScripts", "type": "boolean", "optional": true, "description": "True, if all content scripts should be ignored." } - ], - "hidden": true, - "description": "Makes backend skip steps in the sources with names matching given pattern. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful." - }, - { - "name": "setAsyncCallStackDepth", - "parameters": [ - { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." } - ], - "hidden": true, - "description": "Enables or disables async call stacks tracking." - }, - { - "name": "enablePromiseTracker", - "parameters": [ - { "name": "captureStacks", "type": "boolean", "optional": true, "description": "Whether to capture stack traces for promise creation and settlement events (default: false)." } - ], - "hidden": true, - "description": "Enables promise tracking, information about <code>Promise</code>s created or updated will now be stored on the backend." - }, - { - "name": "disablePromiseTracker", - "hidden": true, - "description": "Disables promise tracking." - }, - { - "name": "getPromises", - "returns": [ - { "name": "promises", "type": "array", "items": { "$ref": "PromiseDetails" }, "description": "Information about stored promises." } - ], - "hidden": true, - "description": "Returns detailed information about all <code>Promise</code>s that were created or updated after the <code>enablePromiseTracker</code> command, and have not been garbage collected yet." - }, - { - "name": "getPromiseById", - "parameters": [ - { "name": "promiseId", "type": "integer" }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } - ], - "returns": [ - { "name": "promise", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for <code>Promise</code> with specified ID, if any." } - ], - "hidden": true, - "description": "Returns <code>Promise</code> with specified ID." - }, - { - "name": "flushAsyncOperationEvents", - "hidden": true, - "description": "Fires pending <code>asyncOperationStarted</code> events (if any), as if a debugger stepping session has just been started." - }, - { - "name": "setAsyncOperationBreakpoint", - "parameters": [ - { "name": "operationId", "type": "integer", "description": "ID of the async operation to set breakpoint for." } - ], - "hidden": true, - "description": "Sets breakpoint on AsyncOperation callback handler." - }, - { - "name": "removeAsyncOperationBreakpoint", - "parameters": [ - { "name": "operationId", "type": "integer", "description": "ID of the async operation to remove breakpoint for." } - ], - "hidden": true, - "description": "Removes AsyncOperation breakpoint." - } - ], - "events": [ - { - "name": "globalObjectCleared", - "description": "Called when global has been cleared and debugger client should reset its state. Happens upon navigation or reload." - }, - { - "name": "scriptParsed", - "parameters": [ - { "name": "scriptId", "$ref": "ScriptId", "description": "Identifier of the script parsed." }, - { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, - { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, - { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, - { "name": "endLine", "type": "integer", "description": "Last line of the script." }, - { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, - { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }, - { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true }, - { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, - { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true } - ], - "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger." - }, - { - "name": "scriptFailedToParse", - "parameters": [ - { "name": "scriptId", "$ref": "ScriptId", "description": "Identifier of the script parsed." }, - { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, - { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, - { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, - { "name": "endLine", "type": "integer", "description": "Last line of the script." }, - { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, - { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }, - { "name": "isInternalScript", "type": "boolean", "optional": true, "description": "Determines whether this script is an internal script.", "hidden": true }, - { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, - { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "hidden": true } - ], - "description": "Fired when virtual machine fails to parse the script." - }, - { - "name": "breakpointResolved", - "parameters": [ - { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." }, - { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." } - ], - "description": "Fired when breakpoint is resolved to an actual script and location." - }, - { - "name": "paused", - "parameters": [ - { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }, - { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "CSPViolation", "debugCommand", "promiseRejection", "AsyncOperation", "other" ], "description": "Pause reason." }, - { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." }, - { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs", "hidden": true }, - { "name": "asyncStackTrace", "$ref": "StackTrace", "optional": true, "description": "Async stack trace, if any.", "hidden": true } - ], - "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria." - }, - { - "name": "resumed", - "description": "Fired when the virtual machine resumed execution." - }, - { - "name": "promiseUpdated", - "parameters": [ - { "name": "eventType", "type": "string", "enum": ["new", "update", "gc"], "description": "Type of the event." }, - { "name": "promise", "$ref": "PromiseDetails", "description": "Information about the updated <code>Promise</code>." } - ], - "description": "Fired when a <code>Promise</code> is created, updated or garbage collected.", - "hidden": true - }, - { - "name": "asyncOperationStarted", + "name": "close", + "description": "Close the stream, discard any temporary backing storage.", "parameters": [ - { "name": "operation", "$ref": "AsyncOperation", "description": "Information about the async operation." } - ], - "description": "Fired when an async operation is scheduled (while in a debugger stepping session).", - "hidden": true - }, - { - "name": "asyncOperationCompleted", - "parameters": [ - { "name": "id", "type": "integer", "description": "ID of the async operation that was completed." } - ], - "description": "Fired when an async operation is completed (while in a debugger stepping session).", - "hidden": true + { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to close." } + ] } ] }, { "domain": "DOMDebugger", "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.", + "dependencies": ["DOM", "Debugger"], "types": [ { "id": "DOMBreakpointType", "type": "string", "enum": ["subtree-modified", "attribute-modified", "node-removed"], "description": "DOM breakpoint type." + }, + { + "id": "EventListener", + "type": "object", + "description": "Object event listener.", + "properties": [ + { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." }, + { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." }, + { "name": "passive", "type": "boolean", "description": "<code>EventListener</code>'s passive flag." }, + { "name": "once", "type": "boolean", "description": "<code>EventListener</code>'s once flag." }, + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script id of the handler code." }, + { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." }, + { "name": "columnNumber", "type": "integer", "description": "Column number in the script (0-based)." }, + { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." }, + { "name": "originalHandler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event original handler function value." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "Node the listener is added to (if any)." } + ], + "experimental": true } ], "commands": [ @@ -3816,7 +3370,7 @@ "name": "setEventListenerBreakpoint", "parameters": [ { "name": "eventName", "type": "string", "description": "DOM Event name to stop on (any DOM event will do)." }, - { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name to stop on. If equal to <code>\"*\"</code> or not provided, will stop on any EventTarget.", "hidden": true } + { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name to stop on. If equal to <code>\"*\"</code> or not provided, will stop on any EventTarget.", "experimental": true } ], "description": "Sets breakpoint on particular DOM event." }, @@ -3824,7 +3378,7 @@ "name": "removeEventListenerBreakpoint", "parameters": [ { "name": "eventName", "type": "string", "description": "Event name." }, - { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name.", "hidden": true } + { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name.", "experimental": true } ], "description": "Removes breakpoint on particular DOM event." }, @@ -3834,7 +3388,7 @@ { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." } ], "description": "Sets breakpoint on particular native event.", - "hidden": true + "experimental": true }, { "name": "removeInstrumentationBreakpoint", @@ -3842,7 +3396,7 @@ { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." } ], "description": "Removes breakpoint on particular native event.", - "hidden": true + "experimental": true }, { "name": "setXHRBreakpoint", @@ -3857,256 +3411,208 @@ { "name": "url", "type": "string", "description": "Resource URL substring." } ], "description": "Removes breakpoint from XMLHttpRequest." + }, + { + "name": "getEventListeners", + "experimental": true, + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to return listeners for." }, + { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "experimental": true }, + { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.", "experimental": true } + ], + "returns": [ + { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." } + ], + "description": "Returns event listeners of the given object." } ] }, { - "domain": "Profiler", - "hidden": true, + "domain": "Target", + "description": "Supports additional targets discovery and allows to attach to them.", + "experimental": true, "types": [ { - "id": "CPUProfileNode", - "type": "object", - "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.", - "properties": [ - { "name": "functionName", "type": "string", "description": "Function name." }, - { "name": "scriptId", "$ref": "Debugger.ScriptId", "description": "Script identifier." }, - { "name": "url", "type": "string", "description": "URL." }, - { "name": "lineNumber", "type": "integer", "description": "1-based line number of the function start position." }, - { "name": "columnNumber", "type": "integer", "description": "1-based column number of the function start position." }, - { "name": "hitCount", "type": "integer", "description": "Number of samples where this node was on top of the call stack." }, - { "name": "callUID", "type": "number", "description": "Call UID." }, - { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." }, - { "name": "deoptReason", "type": "string", "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."}, - { "name": "id", "type": "integer", "description": "Unique id of the node." }, - { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "description": "An array of source position ticks." } - ] + "id": "TargetID", + "type": "string" + }, + { + "id": "BrowserContextID", + "type": "string" }, { - "id": "CPUProfile", + "id": "TargetInfo", "type": "object", - "description": "Profile.", "properties": [ - { "name": "head", "$ref": "CPUProfileNode" }, - { "name": "startTime", "type": "number", "description": "Profiling start time in seconds." }, - { "name": "endTime", "type": "number", "description": "Profiling end time in seconds." }, - { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." }, - { "name": "timestamps", "optional": true, "type": "array", "items": { "type": "number" }, "description": "Timestamps of the samples in microseconds." } + { "name": "targetId", "$ref": "TargetID" }, + { "name": "type", "type": "string" }, + { "name": "title", "type": "string" }, + { "name": "url", "type": "string" } ] }, { - "id": "PositionTickInfo", + "id": "RemoteLocation", "type": "object", - "description": "Specifies a number of samples attributed to a certain source position.", "properties": [ - { "name": "line", "type": "integer", "description": "Source line number (1-based)." }, - { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." } + { "name": "host", "type": "string" }, + { "name": "port", "type": "integer" } ] } ], "commands": [ { - "name": "enable" - }, - { - "name": "disable" - }, - { - "name": "setSamplingInterval", + "name": "setDiscoverTargets", + "description": "Controls whether to discover available targets and notify via <code>targetCreated/targetDestroyed</code> events.", "parameters": [ - { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." } - ], - "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started." - }, - { - "name": "start" - }, - { - "name": "stop", - "returns": [ - { "name": "profile", "$ref": "CPUProfile", "description": "Recorded profile." } + { "name": "discover", "type": "boolean", "description": "Whether to discover available targets." } ] - } - ], - "events": [ - { - "name": "consoleProfileStarted", - "parameters": [ - { "name": "id", "type": "string" }, - { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." }, - { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argument to console.profile()." } - - ], - "description": "Sent when new profile recodring is started using console.profile() call." }, { - "name": "consoleProfileFinished", + "name": "setAutoAttach", + "description": "Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets.", "parameters": [ - { "name": "id", "type": "string" }, - { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." }, - { "name": "profile", "$ref": "CPUProfile" }, - { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as argunet to console.profile()." } + { "name": "autoAttach", "type": "boolean", "description": "Whether to auto-attach to related targets." }, + { "name": "waitForDebuggerOnStart", "type": "boolean", "description": "Whether to pause new targets when attaching to them. Use <code>Runtime.runIfWaitingForDebugger</code> to run paused targets." } ] - } - ] - }, - { - "domain": "HeapProfiler", - "hidden": true, - "types": [ - { - "id": "HeapSnapshotObjectId", - "type": "string", - "description": "Heap snapshot object id." - } - ], - "commands": [ - { - "name": "enable" - }, - { - "name": "disable" }, { - "name": "startTrackingHeapObjects", + "name": "setAttachToFrames", "parameters": [ - { "name": "trackAllocations", "type": "boolean", "optional": true } + { "name": "value", "type": "boolean", "description": "Whether to attach to frames." } ] }, { - "name": "stopTrackingHeapObjects", + "name": "setRemoteLocations", + "description": "Enables target discovery for the specified locations, when <code>setDiscoverTargets</code> was set to <code>true</code>.", "parameters": [ - { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." } + { "name": "locations", "type": "array", "items": { "$ref": "RemoteLocation" }, "description": "List of remote locations." } ] - }, { - "name": "takeHeapSnapshot", + "name": "sendMessageToTarget", + "description": "Sends protocol message to the target with given id.", "parameters": [ - { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." } + { "name": "targetId", "$ref": "TargetID" }, + { "name": "message", "type": "string" } ] }, { - "name": "collectGarbage" - }, - { - "name": "getObjectByHeapObjectId", + "name": "getTargetInfo", + "description": "Returns information about a target.", "parameters": [ - { "name": "objectId", "$ref": "HeapSnapshotObjectId" }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } + { "name": "targetId", "$ref": "TargetID" } ], "returns": [ - { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." } + { "name": "targetInfo","$ref": "TargetInfo" } ] }, { - "name": "addInspectedHeapObject", + "name": "activateTarget", + "description": "Activates (focuses) the target.", "parameters": [ - { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." } - ], - "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)." + { "name": "targetId", "$ref": "TargetID" } + ] }, { - "name": "getHeapObjectId", + "name": "closeTarget", + "description": "Closes the target. If the target is a page that gets closed too.", "parameters": [ - { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." } + { "name": "targetId", "$ref": "TargetID" } ], "returns": [ - { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." } + { "name": "success", "type": "boolean" } ] - } - ], - "events": [ + }, { - "name": "addHeapSnapshotChunk", + "name": "attachToTarget", + "description": "Attaches to the target with given id.", "parameters": [ - { "name": "chunk", "type": "string" } + { "name": "targetId", "$ref": "TargetID" } + ], + "returns": [ + { "name": "success", "type": "boolean", "description": "Whether attach succeeded." } ] }, { - "name": "resetProfiles" - }, - { - "name": "reportHeapSnapshotProgress", + "name": "detachFromTarget", + "description": "Detaches from the target with given id.", "parameters": [ - { "name": "done", "type": "integer" }, - { "name": "total", "type": "integer" }, - { "name": "finished", "type": "boolean", "optional": true } + { "name": "targetId", "$ref": "TargetID" } ] }, { - "name": "lastSeenObjectId", - "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.", - "parameters": [ - { "name": "lastSeenObjectId", "type": "integer" }, - { "name": "timestamp", "type": "number" } + "name": "createBrowserContext", + "description": "Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.", + "returns": [ + { "name": "browserContextId", "$ref": "BrowserContextID", "description": "The id of the context created." } ] }, { - "name": "heapStatsUpdate", - "description": "If heap objects tracking has been started then backend may send update for one or more fragments", + "name": "disposeBrowserContext", + "description": "Deletes a BrowserContext, will fail of any open page uses it.", "parameters": [ - { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."} + { "name": "browserContextId", "$ref": "BrowserContextID" } + ], + "returns": [ + { "name": "success", "type": "boolean" } ] - } - ] - }, - { - "domain": "Worker", - "hidden": true, - "types": [], - "commands": [ - { - "name": "enable" - }, - { - "name": "disable" }, { - "name": "sendMessageToWorker", + "name": "createTarget", + "description": "Creates a new page.", "parameters": [ - { "name": "workerId", "type": "string" }, - { "name": "message", "type": "string" } + { "name": "url", "type": "string", "description": "The initial URL the page will be navigated to." }, + { "name": "width", "type": "integer", "description": "Frame width in DIP (headless chrome only).", "optional": true }, + { "name": "height", "type": "integer", "description": "Frame height in DIP (headless chrome only).", "optional": true }, + { "name": "browserContextId", "$ref": "BrowserContextID", "description": "The browser context to create the page in (headless chrome only).", "optional": true } + ], + "returns": [ + { "name": "targetId", "$ref": "TargetID", "description": "The id of the page opened." } ] }, { - "name": "connectToWorker", - "parameters": [ - { "name": "workerId", "type": "string" } + "name": "getTargets", + "description": "Retrieves a list of available targets.", + "returns": [ + { "name": "targetInfos", "type": "array", "items": { "$ref": "TargetInfo" }, "description": "The list of targets." } ] - }, + } + ], + "events": [ { - "name": "disconnectFromWorker", + "name": "targetCreated", + "description": "Issued when a possible inspection target is created.", "parameters": [ - { "name": "workerId", "type": "string" } + { "name": "targetInfo", "$ref": "TargetInfo" } ] }, { - "name": "setAutoconnectToWorkers", + "name": "targetDestroyed", + "description": "Issued when a target is destroyed.", "parameters": [ - { "name": "value", "type": "boolean" } + { "name": "targetId", "$ref": "TargetID" } ] - } - ], - "events": [ + }, { - "name": "workerCreated", + "name": "attachedToTarget", + "description": "Issued when attached to target because of auto-attach or <code>attachToTarget</code> command.", "parameters": [ - { "name": "workerId", "type": "string" }, - { "name": "url", "type": "string" }, - { "name": "inspectorConnected", "type": "boolean" } + { "name": "targetInfo", "$ref": "TargetInfo" }, + { "name": "waitingForDebugger", "type": "boolean" } ] }, { - "name": "workerTerminated", + "name": "detachedFromTarget", + "description": "Issued when detached from target for any reason (including <code>detachFromTarget</code> command).", "parameters": [ - { "name": "workerId", "type": "string" } + { "name": "targetId", "$ref": "TargetID" } ] }, { - "name": "dispatchMessageFromWorker", + "name": "receivedMessageFromTarget", + "description": "Notifies about new protocol message from attached target.", "parameters": [ - { "name": "workerId", "type": "string" }, + { "name": "targetId", "$ref": "TargetID" }, { "name": "message", "type": "string" } ] } @@ -4114,7 +3620,7 @@ }, { "domain": "ServiceWorker", - "hidden": true, + "experimental": true, "types": [ { "id": "ServiceWorkerRegistration", @@ -4123,7 +3629,7 @@ "properties": [ { "name": "registrationId", "type": "string" }, { "name": "scopeURL", "type": "string" }, - { "name": "isDeleted", "type": "boolean", "optional": true } + { "name": "isDeleted", "type": "boolean" } ] }, { @@ -4147,7 +3653,9 @@ { "name": "runningStatus", "$ref": "ServiceWorkerVersionRunningStatus" }, { "name": "status", "$ref": "ServiceWorkerVersionStatus" }, { "name": "scriptLastModified", "type": "number", "optional": true, "description": "The Last-Modified header value of the main script." }, - { "name": "scriptResponseTime", "type": "number", "optional": true, "description": "The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated." } + { "name": "scriptResponseTime", "type": "number", "optional": true, "description": "The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated." }, + { "name": "controlledClients", "type": "array", "optional": true, "items": { "$ref": "Target.TargetID" } }, + { "name": "targetId", "$ref": "Target.TargetID", "optional": true } ] }, { @@ -4166,323 +3674,89 @@ ], "commands": [ { - "name": "enable", - "handlers": ["browser"] - }, - { - "name": "disable", - "handlers": ["browser"] - }, - { - "name": "sendMessage", - "parameters": [ - { "name": "workerId", "type": "string" }, - { "name": "message", "type": "string" } - ], - "handlers": ["browser"] + "name": "enable" }, { - "name": "stop", - "parameters": [ - { "name": "workerId", "type": "string" } - ], - "handlers": ["browser"] + "name": "disable" }, { "name": "unregister", "parameters": [ { "name": "scopeURL", "type": "string" } - ], - "handlers": ["browser"] + ] }, { "name": "updateRegistration", "parameters": [ { "name": "scopeURL", "type": "string" } - ], - "handlers": ["browser"] - }, - { - "name": "startWorker", - "parameters": [ - { "name": "scopeURL", "type": "string" } - ], - "handlers": ["browser"] - }, - { - "name": "stopWorker", - "parameters": [ - { "name": "versionId", "type": "string" } - ], - "handlers": ["browser"] - }, - { - "name": "inspectWorker", - "parameters": [ - { "name": "versionId", "type": "string" } - ], - "handlers": ["browser"] - }, - { - "name": "setDebugOnStart", - "parameters": [ - { "name": "debugOnStart", "type": "boolean" } - ], - "handlers": ["browser"] - }, - { - "name": "deliverPushMessage", - "parameters": [ - { "name": "origin", "type": "string" }, - { "name": "registrationId", "type": "string" }, - { "name": "data", "type": "string" } - ], - "handlers": ["browser"] - } - ], - "events": [ - { - "name": "workerCreated", - "parameters": [ - { "name": "workerId", "type": "string" }, - { "name": "url", "type": "string" } - ], - "handlers": ["browser"] - }, - { - "name": "workerTerminated", - "parameters": [ - { "name": "workerId", "type": "string" } - ], - "handlers": ["browser"] - }, - { - "name": "dispatchMessage", - "parameters": [ - { "name": "workerId", "type": "string" }, - { "name": "message", "type": "string" } - ], - "handlers": ["browser"] - }, - { - "name": "workerRegistrationUpdated", - "parameters": [ - { "name": "registrations", "type": "array", "items": { "$ref": "ServiceWorkerRegistration" } } - ], - "handlers": ["browser"] - }, - { - "name": "workerVersionUpdated", - "parameters": [ - { "name": "versions", "type": "array", "items": { "$ref": "ServiceWorkerVersion" } } - ], - "handlers": ["browser"] - }, - { - "name": "workerErrorReported", - "parameters": [ - { "name": "errorMessage", "$ref": "ServiceWorkerErrorMessage" } - ], - "handlers": ["browser"] - }, - { - "name": "debugOnStartUpdated", - "parameters": [ - { "name": "debugOnStart", "type": "boolean" } - ], - "handlers": ["browser"] - } - ] - }, - { - "domain": "Canvas", - "hidden": true, - "types": [ - { - "id": "ResourceId", - "type": "string", - "description": "Unique resource identifier." - }, - { - "id": "ResourceStateDescriptor", - "type": "object", - "description": "Resource state descriptor.", - "properties": [ - { "name": "name", "type": "string", "description": "State name." }, - { "name": "enumValueForName", "type": "string", "optional": true, "description": "String representation of the enum value, if <code>name</code> stands for an enum." }, - { "name": "value", "$ref": "CallArgument", "optional": true, "description": "The value associated with the particular state." }, - { "name": "values", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified." }, - { "name": "isArray", "type": "boolean", "optional": true, "description": "True iff the given <code>values</code> items stand for an array rather than a list of grouped states." } - ] - }, - { - "id": "ResourceState", - "type": "object", - "description": "Resource state.", - "properties": [ - { "name": "id", "$ref": "ResourceId" }, - { "name": "traceLogId", "$ref": "TraceLogId" }, - { "name": "descriptors", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Describes current <code>Resource</code> state." }, - { "name": "imageURL", "type": "string", "optional": true, "description": "Screenshot image data URL." } - ] - }, - { - "id": "CallArgument", - "type": "object", - "properties": [ - { "name": "description", "type": "string", "description": "String representation of the object." }, - { "name": "enumName", "type": "string", "optional": true, "description": "Enum name, if any, that stands for the value (for example, a WebGL enum name)." }, - { "name": "resourceId", "$ref": "ResourceId", "optional": true, "description": "Resource identifier. Specified for <code>Resource</code> objects only." }, - { "name": "type", "type": "string", "optional": true, "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type. Specified for non <code>Resource</code> objects only." }, - { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, - { "name": "remoteObject", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The <code>RemoteObject</code>, if requested." } - ] - }, - { - "id": "Call", - "type": "object", - "properties": [ - { "name": "contextId", "$ref": "ResourceId" }, - { "name": "functionName", "type": "string", "optional": true }, - { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument" }, "optional": true }, - { "name": "result", "$ref": "CallArgument", "optional": true }, - { "name": "isDrawingCall", "type": "boolean", "optional": true }, - { "name": "isFrameEndCall", "type": "boolean", "optional": true }, - { "name": "property", "type": "string", "optional": true }, - { "name": "value", "$ref": "CallArgument", "optional": true }, - { "name": "sourceURL", "type": "string", "optional": true }, - { "name": "lineNumber", "type": "integer", "optional": true }, - { "name": "columnNumber", "type": "integer", "optional": true } - ] - }, - { - "id": "TraceLogId", - "type": "string", - "description": "Unique trace log identifier." - }, - { - "id": "TraceLog", - "type": "object", - "properties": [ - { "name": "id", "$ref": "TraceLogId" }, - { "name": "calls", "type": "array", "items": { "$ref": "Call" } }, - { "name": "contexts", "type": "array", "items": { "$ref": "CallArgument" } }, - { "name": "startOffset", "type": "integer" }, - { "name": "alive", "type": "boolean" }, - { "name": "totalAvailableCalls", "type": "number" } - ] - } - ], - "commands": [ - { - "name": "enable", - "description": "Enables Canvas inspection." - }, - { - "name": "disable", - "description": "Disables Canvas inspection." - }, - { - "name": "dropTraceLog", - "parameters": [ - { "name": "traceLogId", "$ref": "TraceLogId" } ] }, { - "name": "hasUninstrumentedCanvases", - "returns": [ - { "name": "result", "type": "boolean" } - ], - "description": "Checks if there is any uninstrumented canvas in the inspected page." - }, - { - "name": "captureFrame", - "parameters": [ - { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." } - ], - "returns": [ - { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." } - ], - "description": "Starts (or continues) a canvas frame capturing which will be stopped automatically after the next frame is prepared." + "name": "startWorker", + "parameters": [ + { "name": "scopeURL", "type": "string" } + ] }, { - "name": "startCapturing", + "name": "skipWaiting", "parameters": [ - { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "Identifier of the frame containing document whose canvases are to be captured. If omitted, main frame is assumed." } - ], - "returns": [ - { "name": "traceLogId", "$ref": "TraceLogId", "description": "Identifier of the trace log containing captured canvas calls." } - ], - "description": "Starts (or continues) consecutive canvas frames capturing. The capturing is stopped by the corresponding stopCapturing command." + { "name": "scopeURL", "type": "string" } + ] }, { - "name": "stopCapturing", + "name": "stopWorker", "parameters": [ - { "name": "traceLogId", "$ref": "TraceLogId" } + { "name": "versionId", "type": "string" } ] }, { - "name": "getTraceLog", + "name": "inspectWorker", "parameters": [ - { "name": "traceLogId", "$ref": "TraceLogId" }, - { "name": "startOffset", "type": "integer", "optional": true }, - { "name": "maxLength", "type": "integer", "optional": true } - ], - "returns": [ - { "name": "traceLog", "$ref": "TraceLog" } + { "name": "versionId", "type": "string" } ] }, { - "name": "replayTraceLog", + "name": "setForceUpdateOnPageLoad", "parameters": [ - { "name": "traceLogId", "$ref": "TraceLogId" }, - { "name": "stepNo", "type": "integer", "description": "Last call index in the trace log to replay (zero based)." } - ], - "returns": [ - { "name": "resourceState", "$ref": "ResourceState" }, - { "name": "replayTime", "type": "number", "description": "Replay time (in milliseconds)." } + { "name": "forceUpdateOnPageLoad", "type": "boolean" } ] }, { - "name": "getResourceState", + "name": "deliverPushMessage", "parameters": [ - { "name": "traceLogId", "$ref": "TraceLogId" }, - { "name": "resourceId", "$ref": "ResourceId" } - ], - "returns": [ - { "name": "resourceState", "$ref": "ResourceState" } + { "name": "origin", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "data", "type": "string" } ] }, { - "name": "evaluateTraceLogCallArgument", + "name": "dispatchSyncEvent", "parameters": [ - { "name": "traceLogId", "$ref": "TraceLogId" }, - { "name": "callIndex", "type": "integer", "description": "Index of the call to evaluate on (zero based)." }, - { "name": "argumentIndex", "type": "integer", "description": "Index of the argument to evaluate (zero based). Provide <code>-1</code> to evaluate call result." }, - { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>Runtime.releaseObjectGroup</code>)." } - ], - "returns": [ - { "name": "result", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Object wrapper for the evaluation result." }, - { "name": "resourceState", "$ref": "ResourceState", "optional": true, "description": "State of the <code>Resource</code> object." } - ], - "description": "Evaluates a given trace call argument or its result." + { "name": "origin", "type": "string" }, + { "name": "registrationId", "type": "string" }, + { "name": "tag", "type": "string" }, + { "name": "lastChance", "type": "boolean" } + ] } ], "events": [ { - "name": "contextCreated", + "name": "workerRegistrationUpdated", "parameters": [ - { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame containing a canvas with a context." } - ], - "description": "Fired when a canvas context has been created in the given frame. The context may not be instrumented (see hasUninstrumentedCanvases command)." + { "name": "registrations", "type": "array", "items": { "$ref": "ServiceWorkerRegistration" } } + ] }, { - "name": "traceLogsRemoved", + "name": "workerVersionUpdated", "parameters": [ - { "name": "frameId", "$ref": "Page.FrameId", "optional": true, "description": "If given, trace logs from the given frame were removed." }, - { "name": "traceLogId", "$ref": "TraceLogId", "optional": true, "description": "If given, trace log with the given ID was removed." } - ], - "description": "Fired when a set of trace logs were removed from the backend. If no parameters are given, all trace logs were removed." + { "name": "versions", "type": "array", "items": { "$ref": "ServiceWorkerVersion" } } + ] + }, + { + "name": "workerErrorReported", + "parameters": [ + { "name": "errorMessage", "$ref": "ServiceWorkerErrorMessage" } + ] } ] }, @@ -4492,7 +3766,7 @@ { "id": "TouchPoint", "type": "object", - "hidden": true, + "experimental": true, "properties": [ { "name": "state", "type": "string", "enum": ["touchPressed", "touchReleased", "touchMoved", "touchStationary", "touchCancelled"], "description": "State of the touch point." }, { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."}, @@ -4507,11 +3781,18 @@ { "id": "GestureSourceType", "type": "string", - "hidden": true, + "experimental": true, "enum": ["default", "touch", "mouse"] } ], "commands": [ + { + "name": "setIgnoreInputEvents", + "parameters": [ + { "name": "ignore", "type": "boolean", "description": "Ignores input events processing when set to true." } + ], + "description": "Ignores input events (useful while auditing page)." + }, { "name": "dispatchKeyEvent", "parameters": [ @@ -4522,14 +3803,14 @@ { "name": "unmodifiedText", "type": "string", "optional": true, "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \"\")." }, { "name": "keyIdentifier", "type": "string", "optional": true, "description": "Unique key identifier (e.g., 'U+0041') (default: \"\")." }, { "name": "code", "type": "string", "optional": true, "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\")." }, + { "name": "key", "type": "string", "optional": true, "description": "Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: \"\")." }, { "name": "windowsVirtualKeyCode", "type": "integer", "optional": true, "description": "Windows virtual key code (default: 0)." }, { "name": "nativeVirtualKeyCode", "type": "integer", "optional": true, "description": "Native virtual key code (default: 0)." }, { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false)." }, { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false)." }, { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false)." } ], - "description": "Dispatches a key event to the page.", - "handlers": ["browser"] + "description": "Dispatches a key event to the page." }, { "name": "dispatchMouseEvent", @@ -4542,12 +3823,11 @@ { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." }, { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." } ], - "description": "Dispatches a mouse event to the page.", - "handlers": ["browser"] + "description": "Dispatches a mouse event to the page." }, { "name": "dispatchTouchEvent", - "hidden": true, + "experimental": true, "parameters": [ { "name": "type", "type": "string", "enum": ["touchStart", "touchEnd", "touchMove"], "description": "Type of the touch event." }, { "name": "touchPoints", "type": "array", "items": { "$ref": "TouchPoint" }, "description": "Touch points." }, @@ -4558,7 +3838,7 @@ }, { "name": "emulateTouchFromMouseEvent", - "hidden": true, + "experimental": true, "parameters": [ { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"], "description": "Type of the mouse event." }, { "name": "x", "type": "integer", "description": "X coordinate of the mouse pointer in DIP."}, @@ -4570,12 +3850,10 @@ { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." }, { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." } ], - "description": "Emulates touch event from the mouse event parameters.", - "handlers": ["browser"] + "description": "Emulates touch event from the mouse event parameters." }, { "name": "synthesizePinchGesture", - "async": true, "parameters": [ { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, @@ -4584,12 +3862,10 @@ { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } ], "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.", - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "synthesizeScrollGesture", - "async": true, "parameters": [ { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, @@ -4599,15 +3875,16 @@ { "name": "yOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given distance." }, { "name": "preventFling", "type": "boolean", "optional": true, "description": "Prevent fling (default: true)." }, { "name": "speed", "type": "integer", "optional": true, "description": "Swipe speed in pixels per second (default: 800)." }, - { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } + { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." }, + { "name": "repeatCount", "type": "integer", "optional": true, "description": "The number of times to repeat the gesture (default: 0)." }, + { "name": "repeatDelayMs", "type": "integer", "optional": true, "description": "The number of milliseconds delay between each repeat. (default: 250)." }, + { "name": "interactionMarkerName", "type": "string", "optional": true, "description": "The name of the interaction markers to generate, if not empty (default: \"\")." } ], "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.", - "hidden": true, - "handlers": ["browser"] + "experimental": true }, { "name": "synthesizeTapGesture", - "async": true, "parameters": [ { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." }, { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." }, @@ -4616,15 +3893,15 @@ { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." } ], "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.", - "hidden": true, - "handlers": ["browser"] + "experimental": true } ], "events": [] }, { "domain": "LayerTree", - "hidden": true, + "experimental": true, + "dependencies": ["DOM"], "types": [ { "id": "LayerId", @@ -4787,7 +4064,7 @@ }, { "domain": "DeviceOrientation", - "hidden": true, + "experimental": true, "commands": [ { "name": "setDeviceOrientationOverride", @@ -4806,32 +4083,66 @@ }, { "domain": "Tracing", + "dependencies": ["IO"], + "experimental": true, + "types": [ + { + "id": "MemoryDumpConfig", + "type": "object", + "description": "Configuration for memory dump. Used only when \"memory-infra\" category is enabled." + }, + { + "id": "TraceConfig", + "type": "object", + "properties": [ + { "name": "recordMode", "type": "string", "optional": true, "enum": ["recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole"], "description": "Controls how the trace buffer stores data." }, + { "name": "enableSampling", "type": "boolean", "optional": true, "description": "Turns on JavaScript stack sampling." }, + { "name": "enableSystrace", "type": "boolean", "optional": true, "description": "Turns on system tracing." }, + { "name": "enableArgumentFilter", "type": "boolean", "optional": true, "description": "Turns on argument filter." }, + { "name": "includedCategories", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Included category filters." }, + { "name": "excludedCategories", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Excluded category filters." }, + { "name": "syntheticDelays", "type": "array", "items": { "type": "string" }, "optional": true, "description": "Configuration to synthesize the delays in tracing." }, + { "name": "memoryDumpConfig", "$ref": "MemoryDumpConfig", "optional": true, "description": "Configuration for memory dump triggers. Used only when \"memory-infra\" category is enabled." } + ] + } + ], "commands": [ { "name": "start", - "async": true, "description": "Start trace events collection.", "parameters": [ - { "name": "categories", "type": "string", "optional": true, "description": "Category/tag filter" }, - { "name": "options", "type": "string", "optional": true, "description": "Tracing options" }, - { "name": "bufferUsageReportingInterval", "type": "number", "optional": true, "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds" } - ], - "handlers": ["browser", "renderer"] + { "name": "categories", "type": "string", "optional": true, "deprecated": true, "description": "Category/tag filter" }, + { "name": "options", "type": "string", "optional": true, "deprecated": true, "description": "Tracing options" }, + { "name": "bufferUsageReportingInterval", "type": "number", "optional": true, "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds" }, + { "name": "transferMode", "type": "string", "enum": ["ReportEvents", "ReturnAsStream"], "optional": true, "description": "Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to <code>ReportEvents</code>)." }, + { "name": "traceConfig", "$ref": "TraceConfig", "optional": true, "description": "" } + ] }, { "name": "end", - "async": true, - "description": "Stop trace events collection.", - "handlers": ["browser", "renderer"] + "description": "Stop trace events collection." }, { "name": "getCategories", - "async": true, "description": "Gets supported tracing categories.", "returns": [ { "name": "categories", "type": "array", "items": { "type": "string" }, "description": "A list of supported tracing categories." } - ], - "handlers": ["browser"] + ] + }, + { + "name": "requestMemoryDump", + "description": "Request a global memory dump.", + "returns": [ + { "name": "dumpGuid", "type": "string", "description": "GUID of the resulting global memory dump." }, + { "name": "success", "type": "boolean", "description": "True iff the global memory dump succeeded." } + ] + }, + { + "name": "recordClockSyncMarker", + "description": "Record a clock sync marker in the trace.", + "parameters": [ + { "name": "syncId", "type": "string", "description": "The ID of this clock sync marker" } + ] } ], "events": [ @@ -4840,13 +4151,14 @@ "parameters": [ { "name": "value", "type": "array", "items": { "type": "object" } } ], - "description": "Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event.", - "handlers": ["browser"] + "description": "Contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event." }, { "name": "tracingComplete", "description": "Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.", - "handlers": ["browser"] + "parameters": [ + { "name": "stream", "$ref": "IO.StreamHandle", "optional": true, "description": "A handle of the stream that holds resulting trace data." } + ] }, { "name": "bufferUsage", @@ -4854,106 +4166,50 @@ { "name": "percentFull", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." }, { "name": "eventCount", "type": "number", "optional": true, "description": "An approximate number of events in the trace log." }, { "name": "value", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." } - ], - "handlers": ["browser"] - } - ] - }, - { - "domain": "Power", - "hidden": true, - "types": [ - { - "id": "PowerEvent", - "type": "object", - "properties": [ - { "name": "type", "type": "string", "description": "Power Event Type." }, - { "name": "timestamp", "type": "number", "description": "Power Event Time, in milliseconds." }, - { "name": "value", "type": "number", "description": "Power Event Value." } - ], - "description": "PowerEvent item" - } - ], - "commands": [ - { - "name": "start", - "description": "Start power events collection.", - "parameters": [], - "handlers": ["browser", "frontend"] - }, - { - "name": "end", - "description": "Stop power events collection.", - "parameters": [], - "handlers": ["browser", "frontend"] - }, - { - "name": "canProfilePower", - "description": "Tells whether power profiling is supported.", - "returns": [ - { "name": "result", "type": "boolean", "description": "True if power profiling is supported." } - ], - "hidden": true, - "handlers": ["browser", "frontend"] - }, - { - "name": "getAccuracyLevel", - "description": "Describes the accuracy level of the data provider.", - "returns": [ - { "name": "result", "type": "string", "enum": ["high", "moderate", "low"] } - ], - "handlers": ["browser", "frontend"] - } - ], - "events": [ - { - "name": "dataAvailable", - "parameters": [ - {"name": "value", "type": "array", "items": { "$ref": "PowerEvent" }, "description": "List of power events." } - ], - "handlers": ["browser", "frontend"] + ] } ] }, { "domain": "Animation", - "hidden": true, + "experimental": true, + "dependencies": ["Runtime", "DOM"], "types": [ { - "id": "AnimationPlayer", + "id": "Animation", "type": "object", - "hidden": true, + "experimental": true, "properties": [ - { "name": "id", "type": "string", "description": "<code>AnimationPlayer</code>'s id." }, - { "name": "pausedState", "type": "boolean", "hidden": "true", "description": "<code>AnimationPlayer</code>'s internal paused state." }, - { "name": "playState", "type": "string", "description": "<code>AnimationPlayer</code>'s play state." }, - { "name": "playbackRate", "type": "number", "description": "<code>AnimationPlayer</code>'s playback rate." }, - { "name": "startTime", "type": "number", "description": "<code>AnimationPlayer</code>'s start time." }, - { "name": "currentTime", "type": "number", "description": "<code>AnimationPlayer</code>'s current time." }, - { "name": "source", "$ref": "AnimationNode", "description": "<code>AnimationPlayer</code>'s source animation node." }, - { "name": "type", "type": "string", "enum": ["CSSTransition", "CSSAnimation", "WebAnimation"], "description": "Animation type of <code>AnimationPlayer</code>." } + { "name": "id", "type": "string", "description": "<code>Animation</code>'s id." }, + { "name": "name", "type": "string", "description": "<code>Animation</code>'s name." }, + { "name": "pausedState", "type": "boolean", "experimental": true, "description": "<code>Animation</code>'s internal paused state." }, + { "name": "playState", "type": "string", "description": "<code>Animation</code>'s play state." }, + { "name": "playbackRate", "type": "number", "description": "<code>Animation</code>'s playback rate." }, + { "name": "startTime", "type": "number", "description": "<code>Animation</code>'s start time." }, + { "name": "currentTime", "type": "number", "description": "<code>Animation</code>'s current time." }, + { "name": "source", "$ref": "AnimationEffect", "description": "<code>Animation</code>'s source animation node." }, + { "name": "type", "type": "string", "enum": ["CSSTransition", "CSSAnimation", "WebAnimation"], "description": "Animation type of <code>Animation</code>." }, + { "name": "cssId", "type": "string", "optional": true, "description": "A unique ID for <code>Animation</code> representing the sources that triggered this CSS animation/transition."} ], - "description": "AnimationPlayer instance." + "description": "Animation instance." }, { - "id": "AnimationNode", + "id": "AnimationEffect", "type": "object", - "hidden": true, + "experimental": true, "properties": [ - { "name": "delay", "type": "number", "description": "<code>AnimationNode</code>'s delay." }, - { "name": "endDelay", "type": "number", "description": "<code>AnimationNode</code>'s end delay." }, - { "name": "playbackRate", "type": "number", "description": "<code>AnimationNode</code>'s playbackRate." }, - { "name": "iterationStart", "type": "number", "description": "<code>AnimationNode</code>'s iteration start." }, - { "name": "iterations", "type": "number", "description": "<code>AnimationNode</code>'s iterations." }, - { "name": "duration", "type": "number", "description": "<code>AnimationNode</code>'s iteration duration." }, - { "name": "direction", "type": "string", "description": "<code>AnimationNode</code>'s playback direction." }, - { "name": "fill", "type": "string", "description": "<code>AnimationNode</code>'s fill mode." }, - { "name": "name", "type": "string", "description": "<code>AnimationNode</code>'s name." }, - { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "<code>AnimationNode</code>'s target node." }, - { "name": "keyframesRule", "$ref": "KeyframesRule", "optional": true, "description": "<code>AnimationNode</code>'s keyframes." }, - { "name": "easing", "type": "string", "description": "<code>AnimationNode</code>'s timing function." } - ], - "description": "AnimationNode instance" + { "name": "delay", "type": "number", "description": "<code>AnimationEffect</code>'s delay." }, + { "name": "endDelay", "type": "number", "description": "<code>AnimationEffect</code>'s end delay." }, + { "name": "iterationStart", "type": "number", "description": "<code>AnimationEffect</code>'s iteration start." }, + { "name": "iterations", "type": "number", "description": "<code>AnimationEffect</code>'s iterations." }, + { "name": "duration", "type": "number", "description": "<code>AnimationEffect</code>'s iteration duration." }, + { "name": "direction", "type": "string", "description": "<code>AnimationEffect</code>'s playback direction." }, + { "name": "fill", "type": "string", "description": "<code>AnimationEffect</code>'s fill mode." }, + { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "<code>AnimationEffect</code>'s target node." }, + { "name": "keyframesRule", "$ref": "KeyframesRule", "optional": true, "description": "<code>AnimationEffect</code>'s keyframes." }, + { "name": "easing", "type": "string", "description": "<code>AnimationEffect</code>'s timing function." } + ], + "description": "AnimationEffect instance" }, { "id": "KeyframesRule", @@ -4969,7 +4225,7 @@ "type": "object", "properties": [ { "name": "offset", "type": "string", "description": "Keyframe's time offset." }, - { "name": "easing", "type": "string", "description": "<code>AnimationNode</code>'s timing function." } + { "name": "easing", "type": "string", "description": "<code>AnimationEffect</code>'s timing function." } ], "description": "Keyframe Style" } @@ -4980,16 +4236,8 @@ "description": "Enables animation domain notifications." }, { - "name": "getAnimationPlayersForNode", - "parameters": [ - { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get animation players for." }, - { "name": "includeSubtreeAnimations", "type": "boolean", "description": "Include animations from elements subtree." } - ], - "returns": [ - { "name": "animationPlayers", "type": "array", "items": { "$ref": "AnimationPlayer" }, "description": "Array of animation players." } - ], - "description": "Returns animation players relevant to the node.", - "hidden": true + "name": "disable", + "description": "Disables animation domain notifications." }, { "name": "getPlaybackRate", @@ -5006,43 +4254,86 @@ "description": "Sets the playback rate of the document timeline." }, { - "name": "setCurrentTime", + "name": "getCurrentTime", + "parameters": [ + { "name": "id", "type": "string", "description": "Id of animation." } + ], + "returns": [ + { "name": "currentTime", "type": "number", "description": "Current time of the page." } + ], + "description": "Returns the current time of the an animation." + }, + { + "name": "setPaused", "parameters": [ - { "name": "currentTime", "type": "number", "description": "Current time for the page animation timeline" } + { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "Animations to set the pause state of." }, + { "name": "paused", "type": "boolean", "description": "Paused state to set to." } ], - "description": "Sets the current time of the document timeline." + "description": "Sets the paused state of a set of animations." }, { "name": "setTiming", "parameters": [ - { "name": "playerId", "type": "string", "description": "AnimationPlayer id." }, + { "name": "animationId", "type": "string", "description": "Animation id." }, { "name": "duration", "type": "number", "description": "Duration of the animation." }, { "name": "delay", "type": "number", "description": "Delay of the animation." } ], "description": "Sets the timing of an animation node." + }, + { + "name": "seekAnimations", + "parameters": [ + { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "List of animation ids to seek." }, + { "name": "currentTime", "type": "number", "description": "Set the current time of each animation." } + ], + "description": "Seek a set of animations to a particular time within each animation." + }, + { + "name": "releaseAnimations", + "parameters": [ + { "name": "animations", "type": "array", "items": { "type": "string" }, "description": "List of animation ids to seek." } + ], + "description": "Releases a set of animations to no longer be manipulated." + }, + { + "name": "resolveAnimation", + "parameters": [ + { "name": "animationId", "type": "string", "description": "Animation id." } + ], + "returns": [ + { "name": "remoteObject", "$ref": "Runtime.RemoteObject", "description": "Corresponding remote object." } + ], + "description": "Gets the remote object of the Animation." } ], "events": [ { - "name": "animationPlayerCreated", + "name": "animationCreated", + "parameters": [ + { "name": "id", "type": "string", "description": "Id of the animation that was created." } + ], + "description": "Event for each animation that has been created." + }, + { + "name": "animationStarted", "parameters": [ - { "name": "player", "$ref": "AnimationPlayer", "description": "AnimationPlayer that was created." }, - { "name": "resetTimeline", "type": "boolean", "description": "Whether the timeline should be reset." } + { "name": "animation", "$ref": "Animation", "description": "Animation that was started." } ], - "description": "Event for each animation player that has been created." + "description": "Event for animation that has been started." }, { - "name": "animationPlayerCanceled", + "name": "animationCanceled", "parameters": [ - { "name": "playerId", "type": "string", "description": "Id of the AnimationPlayer that was cancelled." } + { "name": "id", "type": "string", "description": "Id of the animation that was cancelled."} ], - "description": "Event for AnimationPlayers in the frontend that have been cancelled." + "description": "Event for when an animation has been cancelled." } ] }, { "domain": "Accessibility", - "hidden": true, + "experimental": true, + "dependencies": ["DOM"], "types": [ { "id": "AXNodeId", @@ -5052,23 +4343,31 @@ { "id": "AXValueType", "type": "string", - "enum": [ "boolean", "tristate", "booleanOrUndefined", "idref", "idrefList", "integer", "number", "string", "token", "tokenList", "domRelation", "role", "internalRole" ], + "enum": [ "boolean", "tristate", "booleanOrUndefined", "idref", "idrefList", "integer", "node", "nodeList", "number", "string", "computedString", "token", "tokenList", "domRelation", "role", "internalRole", "valueUndefined" ], "description": "Enum of possible property types." }, { - "id": "AXPropertySourceType", + "id": "AXValueSourceType", "type": "string", - "enum": [ "attribute", "implicit", "style" ], + "enum": [ "attribute", "implicit", "style", "contents", "placeholder", "relatedElement" ], "description": "Enum of possible property sources." }, + { "id": "AXValueNativeSourceType", + "type": "string", + "enum": [ "figcaption", "label", "labelfor", "labelwrapped", "legend", "tablecaption", "title", "other" ], + "description": "Enum of possible native property sources (as a subtype of a particular AXValueSourceType)." + }, { - "id": "AXPropertySource", + "id": "AXValueSource", "type": "object", "properties": [ - { "name": "name", "type": "string", "description": "The name/label of this source." }, - { "name": "sourceType", "$ref": "AXPropertySourceType", "description": "What type of source this is." }, - { "name": "value", "type": "any", "description": "The value of this property source." }, - { "name": "type", "$ref": "AXValueType", "description": "What type the value should be interpreted as." }, + { "name": "type", "$ref": "AXValueSourceType", "description": "What type of source this is." }, + { "name": "value", "$ref": "AXValue", "description": "The value of this property source.", "optional": true }, + { "name": "attribute", "type": "string", "description": "The name of the relevant attribute, if any.", "optional": true }, + { "name": "attributeValue", "$ref": "AXValue", "description": "The value of the relevant attribute, if any.", "optional": true }, + { "name": "superseded", "type": "boolean", "description": "Whether this source is superseded by a higher priority source.", "optional": true }, + { "name": "nativeSource", "$ref": "AXValueNativeSourceType", "description": "The native markup source for this value, e.g. a <label> element.", "optional": true }, + { "name": "nativeSourceValue", "$ref": "AXValue", "description": "The value, such as a node or node list, of the native source.", "optional": true }, { "name": "invalid", "type": "boolean", "description": "Whether the value for this property is invalid.", "optional": true }, { "name": "invalidReason", "type": "string", "description": "Reason for the value being invalid, if it is.", "optional": true } ], @@ -5078,8 +4377,9 @@ "id": "AXRelatedNode", "type": "object", "properties": [ + { "name": "backendDOMNodeId", "$ref": "DOM.BackendNodeId", "description": "The BackendNodeId of the related DOM node." }, { "name": "idref", "type": "string", "description": "The IDRef value provided, if any.", "optional": true }, - { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "The BackendNodeId of the related node." } + { "name": "text", "type": "string", "description": "The text alternative of this node in the current context.", "optional": true } ] }, { @@ -5095,18 +4395,16 @@ "type": "object", "properties": [ { "name": "type", "$ref": "AXValueType", "description": "The type of this value." }, - { "name": "value", "type": "any", "description": "The computed value of this property.", "optional": true }, - { "name": "relatedNodeValue", "$ref": "AXRelatedNode", "description": "The related node value, if any.", "optional": true }, - { "name": "relatedNodeArrayValue", "type": "array", "items": { "$ref": "AXRelatedNode" }, "description": "Multiple relted nodes, if applicable.", "optional": true }, - { "name": "sources", "type": "array", "items": { "$ref": "AXPropertySource" }, "description": "The sources which contributed to the computation of this property.", "optional": true } + { "name": "relatedNodes", "type": "array", "items": { "$ref": "AXRelatedNode" }, "description": "One or more related nodes, if applicable.", "optional": true }, + { "name": "sources", "type": "array", "items": { "$ref": "AXValueSource" }, "description": "The sources which contributed to the computation of this property.", "optional": true } ], "description": "A single computed AX property." }, { "id": "AXGlobalStates", "type": "string", - "enum": [ "disabled", "hidden", "hiddenRoot", "invalid" ], + "enum": [ "disabled", "hidden", "hiddenRoot", "invalid", "keyshortcuts", "roledescription" ], "description": "States which apply to every AX node." }, { @@ -5119,18 +4417,18 @@ "id": "AXWidgetAttributes", "type": "string", "enum": [ "autocomplete", "haspopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext" ], - "Description": "Attributes which apply to widgets." + "description": "Attributes which apply to widgets." }, { "id": "AXWidgetStates", "type": "string", - "enum": [ "checked", "expanded", "pressed", "selected" ], + "enum": [ "checked", "expanded", "modal", "pressed", "selected" ], "description": "States which apply to widgets." }, { "id": "AXRelationshipAttributes", "type": "string", - "enum": [ "activedescendant", "flowto", "controls", "describedby", "labelledby", "owns" ], + "enum": [ "activedescendant", "controls", "describedby", "details", "errormessage", "flowto", "labelledby", "owns" ], "description": "Relationships between elements other than parent/child/sibling." }, { @@ -5138,28 +4436,264 @@ "type": "object", "properties": [ { "name": "nodeId", "$ref": "AXNodeId", "description": "Unique identifier for this node." }, - { "name": "role", "$ref": "AXValue", "description": "This <code>Node</code>'s role, whether explicit or implicit." }, + { "name": "ignored", "type": "boolean", "description": "Whether this node is ignored for accessibility" }, + { "name": "ignoredReasons", "type": "array", "items": { "$ref": "AXProperty" }, "description": "Collection of reasons why this node is hidden.", "optional": true }, + { "name": "role", "$ref": "AXValue", "description": "This <code>Node</code>'s role, whether explicit or implicit.", "optional": true}, { "name": "name", "$ref": "AXValue", "description": "The accessible name for this <code>Node</code>.", "optional": true }, { "name": "description", "$ref": "AXValue", "description": "The accessible description for this <code>Node</code>.", "optional": true }, { "name": "value", "$ref": "AXValue", "description": "The value for this <code>Node</code>.", "optional": true }, - { "name": "help", "$ref": "AXValue", "description": "Help.", "optional": true }, - { "name": "properties", "type": "array", "items": { "$ref": "AXProperty" }, "description": "All other properties" } + { "name": "properties", "type": "array", "items": { "$ref": "AXProperty" }, "description": "All other properties", "optional": true }, + { "name": "childIds", "type": "array", "items": { "$ref": "AXNodeId" }, "description": "IDs for each of this node's child nodes.", "optional": true }, + { "name": "backendDOMNodeId", "$ref": "DOM.BackendNodeId", "description": "The backend ID for the associated DOM node, if any.", "optional": true } ], "description": "A node in the accessibility tree." } ], "commands": [ { - "name": "getAXNode", + "name": "getPartialAXTree", + "parameters": [ + { "name": "nodeId", "$ref": "DOM.NodeId", "description": "ID of node to get the partial accessibility tree for." }, + { "name": "fetchRelatives", "type": "boolean", "description": "Whether to fetch this nodes ancestors, siblings and children. Defaults to true.", "optional": true } + ], + "returns": [ + { "name": "nodes", "type": "array", "items": { "$ref": "AXNode" }, "description": "The <code>Accessibility.AXNode</code> for this DOM node, if it exists, plus its ancestors, siblings and children, if requested." } + ], + "description": "Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.", + "experimental": true + } + ] + }, + { + "domain": "Storage", + "experimental": true, + "types": [ + { + "id": "StorageType", + "type": "string", + "enum": [ + "appcache", + "cookies", + "file_systems", + "indexeddb", + "local_storage", + "shader_cache", + "websql", + "service_workers", + "cache_storage", + "all" + ], + "description": "Enum of possible storage types." + } + ], + "commands": [ + { + "name": "clearDataForOrigin", + "parameters": [ + { "name": "origin", "type": "string", "description": "Security origin." }, + { "name": "storageTypes", "type": "string", "description": "Comma separated origin names." } + ], + "description": "Clears storage for origin." + } + ] + }, + { + "domain": "Log", + "description": "Provides access to log entries.", + "dependencies": ["Runtime", "Network"], + "experimental": true, + "types": [ + { + "id": "LogEntry", + "type": "object", + "description": "Log entry.", + "properties": [ + { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "storage", "appcache", "rendering", "security", "deprecation", "worker", "violation", "intervention", "other"], "description": "Log entry source." }, + { "name": "level", "type": "string", "enum": ["verbose", "info", "warning", "error"], "description": "Log entry severity." }, + { "name": "text", "type": "string", "description": "Logged text." }, + { "name": "timestamp", "$ref": "Runtime.Timestamp", "description": "Timestamp when this entry was added." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the resource if known." }, + { "name": "lineNumber", "type": "integer", "optional": true, "description": "Line number in the resource." }, + { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript stack trace." }, + { "name": "networkRequestId", "$ref": "Network.RequestId", "optional": true, "description": "Identifier of the network request associated with this entry." }, + { "name": "workerId", "type": "string", "optional": true, "description": "Identifier of the worker associated with this entry." } + ] + }, + { + "id": "ViolationSetting", + "type": "object", + "description": "Violation configuration setting.", + "properties": [ + { "name": "name", "type": "string", "enum": ["longTask", "longLayout", "blockedEvent", "blockedParser", "discouragedAPIUse", "handler", "recurringHandler"], "description": "Violation type." }, + { "name": "threshold", "type": "number", "description": "Time threshold to trigger upon." } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables log domain, sends the entries collected so far to the client by means of the <code>entryAdded</code> notification." + }, + { + "name": "disable", + "description": "Disables log domain, prevents further log entries from being reported to the client." + }, + { + "name": "clear", + "description": "Clears the log." + }, + { + "name": "startViolationsReport", + "parameters": [ + { "name": "config", "type": "array", "items": { "$ref": "ViolationSetting" }, "description": "Configuration for violations." } + ], + "description": "start violation reporting." + }, + { + "name": "stopViolationsReport", + "description": "Stop violation reporting." + } + ], + "events": [ + { + "name": "entryAdded", + "parameters": [ + { "name": "entry", "$ref": "LogEntry", "description": "The entry." } + ], + "description": "Issued when new message was logged." + } + ] + }, + { + "domain": "SystemInfo", + "description": "The SystemInfo domain defines methods and events for querying low-level system information.", + "experimental": true, + "types": [ + { + "id": "GPUDevice", + "type": "object", + "properties": [ + { "name": "vendorId", "type": "number", "description": "PCI ID of the GPU vendor, if available; 0 otherwise." }, + { "name": "deviceId", "type": "number", "description": "PCI ID of the GPU device, if available; 0 otherwise." }, + { "name": "vendorString", "type": "string", "description": "String description of the GPU vendor, if the PCI ID is not available." }, + { "name": "deviceString", "type": "string", "description": "String description of the GPU device, if the PCI ID is not available." } + ], + "description": "Describes a single graphics processor (GPU)." + }, + { + "id": "GPUInfo", + "type": "object", + "properties": [ + { "name": "devices", "type": "array", "items": { "$ref": "GPUDevice" }, "description": "The graphics devices on the system. Element 0 is the primary GPU." }, + { "name": "auxAttributes", "type": "object", "optional": true, "description": "An optional dictionary of additional GPU related attributes." }, + { "name": "featureStatus", "type": "object", "optional": true, "description": "An optional dictionary of graphics features and their status." }, + { "name": "driverBugWorkarounds", "type": "array", "items": { "type": "string" }, "description": "An optional array of GPU driver bug workarounds." } + ], + "description": "Provides information about the GPU(s) on the system." + } + ], + "commands": [ + { + "name": "getInfo", + "description": "Returns information about the system.", + "returns": [ + { "name": "gpu", "$ref": "GPUInfo", "description": "Information about the GPUs on the system." }, + { "name": "modelName", "type": "string", "description": "A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported." }, + { "name": "modelVersion", "type": "string", "description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported." }, + { "name": "commandLine", "type": "string", "description": "The command line string used to launch the browser. Will be the empty string if not supported." } + ] + } + ] + }, + { + "domain": "Tethering", + "description": "The Tethering domain defines methods and events for browser port binding.", + "experimental": true, + "commands": [ + { + "name": "bind", + "description": "Request browser port binding.", + "parameters": [ + { "name": "port", "type": "integer", "description": "Port number to bind." } + ] + }, + { + "name": "unbind", + "description": "Request browser port unbinding.", + "parameters": [ + { "name": "port", "type": "integer", "description": "Port number to unbind." } + ] + } + ], + "events": [ + { + "name": "accepted", + "description": "Informs that port was successfully bound and got a specified connection id.", + "parameters": [ + {"name": "port", "type": "integer", "description": "Port number that was successfully bound." }, + {"name": "connectionId", "type": "string", "description": "Connection id to be used." } + ] + } + ] + }, + { + "domain": "Browser", + "description": "The Browser domain defines methods and events for browser managing.", + "experimental": true, + "types": [ + { + "id": "WindowID", + "type": "integer" + }, + { + "id": "WindowState", + "type": "string", + "enum": ["normal", "minimized", "maximized", "fullscreen"], + "description": "The state of the browser window." + }, + { + "id": "Bounds", + "type": "object", + "description": "Browser window bounds information", + "properties": [ + { "name": "left", "type": "integer", "optional": true, "description": "The offset from the left edge of the screen to the window in pixels."}, + { "name": "top", "type": "integer", "optional": true, "description": "The offset from the top edge of the screen to the window in pixels."}, + { "name": "width", "type": "integer", "optional": true, "description": "The window width in pixels."}, + { "name": "height", "type": "integer", "optional": true, "description": "The window height in pixels."}, + { "name": "windowState", "$ref": "WindowState", "optional": true, "description": "The window state. Default to normal."} + ] + } + ], + "commands": [ + { + "name": "getWindowForTarget", + "description": "Get the browser window that contains the devtools target.", "parameters": [ - { "name": "nodeId", "$ref": "DOM.NodeId", "description": "ID of node to get accessibility node for." } + { "name": "targetId", "$ref": "Target.TargetID", "description": "Devtools agent host id." } ], "returns": [ - { "name": "accessibilityNode", "$ref": "AXNode", "description": "The <code>Accessibility.AXNode</code> for this DOM node, if it exists.", "optional": true } + { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." }, + { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored window position and size are returned." } + ] + }, + { + "name": "setWindowBounds", + "description": "Set position and/or size of the browser window.", + "parameters": [ + { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." }, + { "name": "bounds", "$ref": "Bounds", "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged." } + ] + }, + { + "name": "getWindowBounds", + "description": "Get position and size of the browser window.", + "parameters": [ + { "name": "windowId", "$ref": "WindowID", "description": "Browser window id." } ], - "description": "Fetches the accessibility node for this DOM node, if it exists.", - "hidden": true + "returns": [ + { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored window position and size are returned." } + ] } ] }] -} \ No newline at end of file +} diff --git a/source/ProtocolGenerator/js_protocol.json b/source/ProtocolGenerator/js_protocol.json new file mode 100644 index 0000000000000000000000000000000000000000..62545cd80d34f2e6dd9434817f09373437b33e2f --- /dev/null +++ b/source/ProtocolGenerator/js_protocol.json @@ -0,0 +1,1086 @@ +{ + "version": { "major": "1", "minor": "2" }, + "domains": [ + { + "domain": "Schema", + "description": "Provides information about the protocol schema.", + "types": [ + { + "id": "Domain", + "type": "object", + "description": "Description of the protocol domain.", + "properties": [ + { "name": "name", "type": "string", "description": "Domain name." }, + { "name": "version", "type": "string", "description": "Domain version." } + ] + } + ], + "commands": [ + { + "name": "getDomains", + "description": "Returns supported domains.", + "handlers": ["browser", "renderer"], + "returns": [ + { "name": "domains", "type": "array", "items": { "$ref": "Domain" }, "description": "List of supported domains." } + ] + } + ] + }, + { + "domain": "Runtime", + "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.", + "types": [ + { + "id": "ScriptId", + "type": "string", + "description": "Unique script identifier." + }, + { + "id": "RemoteObjectId", + "type": "string", + "description": "Unique object identifier." + }, + { + "id": "UnserializableValue", + "type": "string", + "enum": ["Infinity", "NaN", "-Infinity", "-0"], + "description": "Primitive value which cannot be JSON-stringified." + }, + { + "id": "RemoteObject", + "type": "object", + "description": "Mirror object referencing original JavaScript object.", + "properties": [ + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." }, + { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested)." }, + { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property." }, + { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, + { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." }, + { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "experimental": true }, + { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "experimental": true} + ] + }, + { + "id": "CustomPreview", + "type": "object", + "experimental": true, + "properties": [ + { "name": "header", "type": "string"}, + { "name": "hasBody", "type": "boolean"}, + { "name": "formatterObjectId", "$ref": "RemoteObjectId"}, + { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjectId" }, + { "name": "configObjectId", "$ref": "RemoteObjectId", "optional": true } + ] + }, + { + "id": "ObjectPreview", + "type": "object", + "experimental": true, + "description": "Object containing abbreviated remote object value.", + "properties": [ + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }, + { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." }, + { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." }, + { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." }, + { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." } + ] + }, + { + "id": "PropertyPreview", + "type": "object", + "experimental": true, + "properties": [ + { "name": "name", "type": "string", "description": "Property name." }, + { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." }, + { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." }, + { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." }, + { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." } + ] + }, + { + "id": "EntryPreview", + "type": "object", + "experimental": true, + "properties": [ + { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." }, + { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." } + ] + }, + { + "id": "PropertyDescriptor", + "type": "object", + "description": "Object property descriptor.", + "properties": [ + { "name": "name", "type": "string", "description": "Property name or symbol description." }, + { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }, + { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." }, + { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." }, + { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." }, + { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." }, + { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." }, + { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }, + { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object." }, + { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type." } + ] + }, + { + "id": "InternalPropertyDescriptor", + "type": "object", + "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.", + "properties": [ + { "name": "name", "type": "string", "description": "Conventional property name." }, + { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." } + ] + }, + { + "id": "CallArgument", + "type": "object", + "description": "Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.", + "properties": [ + { "name": "value", "type": "any", "optional": true, "description": "Primitive value." }, + { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified." }, + { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." } + ] + }, + { + "id": "ExecutionContextId", + "type": "integer", + "description": "Id of an execution context." + }, + { + "id": "ExecutionContextDescription", + "type": "object", + "description": "Description of an isolated world.", + "properties": [ + { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." }, + { "name": "origin", "type": "string", "description": "Execution context origin." }, + { "name": "name", "type": "string", "description": "Human readable name describing given context." }, + { "name": "auxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." } + ] + }, + { + "id": "ExceptionDetails", + "type": "object", + "description": "Detailed information about exception (or error) that was thrown during script compilation or execution.", + "properties": [ + { "name": "exceptionId", "type": "integer", "description": "Exception id." }, + { "name": "text", "type": "string", "description": "Exception text, which should be used together with exception object when available." }, + { "name": "lineNumber", "type": "integer", "description": "Line number of the exception location (0-based)." }, + { "name": "columnNumber", "type": "integer", "description": "Column number of the exception location (0-based)." }, + { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Script ID of the exception location." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the exception location, to be used when the script was not reported." }, + { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace if available." }, + { "name": "exception", "$ref": "RemoteObject", "optional": true, "description": "Exception object if available." }, + { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Identifier of the context where exception happened." } + ] + }, + { + "id": "Timestamp", + "type": "number", + "description": "Number of milliseconds since epoch." + }, + { + "id": "CallFrame", + "type": "object", + "description": "Stack entry for runtime errors and assertions.", + "properties": [ + { "name": "functionName", "type": "string", "description": "JavaScript function name." }, + { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." }, + { "name": "url", "type": "string", "description": "JavaScript script name or url." }, + { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number (0-based)." }, + { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number (0-based)." } + ] + }, + { + "id": "StackTrace", + "type": "object", + "description": "Call frames for assertions or error messages.", + "properties": [ + { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." }, + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." }, + { "name": "parent", "$ref": "StackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }, + { "name": "promiseCreationFrame", "$ref": "CallFrame", "optional": true, "experimental": true, "description": "Creation frame of the Promise which produced the next synchronous trace when resolved, if available." } + ] + } + ], + "commands": [ + { + "name": "evaluate", + "parameters": [ + { "name": "expression", "type": "string", "description": "Expression to evaluate." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." }, + { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." }, + { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page." }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." }, + { "name": "userGesture", "type": "boolean", "optional": true, "experimental": true, "description": "Whether execution should be treated as initiated by user in the UI." }, + { "name": "awaitPromise", "type": "boolean", "optional":true, "description": "Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Evaluates expression on global object." + }, + { + "name": "awaitPromise", + "parameters": [ + { "name": "promiseObjectId", "$ref": "RemoteObjectId", "description": "Identifier of the promise." }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Promise result. Will contain rejected value if promise was rejected." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details if stack strace is available."} + ], + "description": "Add handler to promise with given promise object id." + }, + { + "name": "callFunctionOn", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." }, + { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." }, + { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." }, + { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." }, + { "name": "userGesture", "type": "boolean", "optional": true, "experimental": true, "description": "Whether execution should be treated as initiated by user in the UI." }, + { "name": "awaitPromise", "type": "boolean", "optional":true, "description": "Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Call result." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object." + }, + { + "name": "getProperties", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." }, + { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." }, + { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "experimental": true }, + { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the results." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." }, + { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself)." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Returns properties of a given object. Object group of the result is inherited from the target object." + }, + { + "name": "releaseObject", + "parameters": [ + { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." } + ], + "description": "Releases remote object with given id." + }, + { + "name": "releaseObjectGroup", + "parameters": [ + { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." } + ], + "description": "Releases all remote objects that belong to a given group." + }, + { + "name": "runIfWaitingForDebugger", + "description": "Tells inspected instance to run if it was waiting for debugger to attach." + }, + { + "name": "enable", + "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context." + }, + { + "name": "disable", + "description": "Disables reporting of execution contexts creation." + }, + { + "name": "discardConsoleEntries", + "description": "Discards collected exceptions and console API calls." + }, + { + "name": "setCustomObjectFormatterEnabled", + "parameters": [ + { + "name": "enabled", + "type": "boolean" + } + ], + "experimental": true + }, + { + "name": "compileScript", + "parameters": [ + { "name": "expression", "type": "string", "description": "Expression to compile." }, + { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }, + { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." }, + { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page." } + ], + "returns": [ + { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Compiles expression." + }, + { + "name": "runScript", + "parameters": [ + { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." }, + { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }, + { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." }, + { "name": "awaitPromise", "type": "boolean", "optional": true, "description": "Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error." } + ], + "returns": [ + { "name": "result", "$ref": "RemoteObject", "description": "Run result." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Runs script with given id in a given context." + } + ], + "events": [ + { + "name": "executionContextCreated", + "parameters": [ + { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution context." } + ], + "description": "Issued when new execution context is created." + }, + { + "name": "executionContextDestroyed", + "parameters": [ + { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" } + ], + "description": "Issued when execution context is destroyed." + }, + { + "name": "executionContextsCleared", + "description": "Issued when all executionContexts were cleared in browser" + }, + { + "name": "exceptionThrown", + "description": "Issued when exception was thrown and unhandled.", + "parameters": [ + { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of the exception." }, + { "name": "exceptionDetails", "$ref": "ExceptionDetails" } + ] + }, + { + "name": "exceptionRevoked", + "description": "Issued when unhandled exception was revoked.", + "parameters": [ + { "name": "reason", "type": "string", "description": "Reason describing why exception was revoked." }, + { "name": "exceptionId", "type": "integer", "description": "The id of revoked exception, as reported in <code>exceptionUnhandled</code>." } + ] + }, + { + "name": "consoleAPICalled", + "description": "Issued when console API was called.", + "parameters": [ + { "name": "type", "type": "string", "enum": ["log", "debug", "info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd", "count", "timeEnd"], "description": "Type of the call." }, + { "name": "args", "type": "array", "items": { "$ref": "RemoteObject" }, "description": "Call arguments." }, + { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Identifier of the context where the call was made." }, + { "name": "timestamp", "$ref": "Timestamp", "description": "Call timestamp." }, + { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "Stack trace captured when the call was made." } + ] + }, + { + "name": "inspectRequested", + "description": "Issued when object should be inspected (for example, as a result of inspect() command line API call).", + "parameters": [ + { "name": "object", "$ref": "RemoteObject" }, + { "name": "hints", "type": "object" } + ] + } + ] + }, + { + "domain": "Debugger", + "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.", + "dependencies": ["Runtime"], + "types": [ + { + "id": "BreakpointId", + "type": "string", + "description": "Breakpoint identifier." + }, + { + "id": "CallFrameId", + "type": "string", + "description": "Call frame identifier." + }, + { + "id": "Location", + "type": "object", + "properties": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." }, + { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." }, + { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." } + ], + "description": "Location in the source code." + }, + { + "id": "ScriptPosition", + "experimental": true, + "type": "object", + "properties": [ + { "name": "lineNumber", "type": "integer" }, + { "name": "columnNumber", "type": "integer" } + ], + "description": "Location in the source code." + }, + { + "id": "CallFrame", + "type": "object", + "properties": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." }, + { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." }, + { "name": "functionLocation", "$ref": "Location", "optional": true, "experimental": true, "description": "Location in the source code." }, + { "name": "location", "$ref": "Location", "description": "Location in the source code." }, + { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." }, + { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }, + { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The value being returned, if the function is at return point." } + ], + "description": "JavaScript call frame. Array of call frames form the call stack." + }, + { + "id": "Scope", + "type": "object", + "properties": [ + { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script", "eval", "module"], "description": "Scope type." }, + { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." }, + { "name": "name", "type": "string", "optional": true }, + { "name": "startLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope starts" }, + { "name": "endLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope ends" } + ], + "description": "Scope description." + }, + { + "id": "SearchMatch", + "type": "object", + "description": "Search match for resource.", + "properties": [ + { "name": "lineNumber", "type": "number", "description": "Line number in resource content." }, + { "name": "lineContent", "type": "string", "description": "Line with match content." } + ], + "experimental": true + }, + { + "id": "BreakLocation", + "type": "object", + "properties": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." }, + { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." }, + { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." }, + { "name": "type", "type": "string", "enum": [ "debuggerStatement", "call", "return" ], "optional": true } + ], + "experimental": true + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received." + }, + { + "name": "disable", + "description": "Disables debugger for given page." + }, + { + "name": "setBreakpointsActive", + "parameters": [ + { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." } + ], + "description": "Activates / deactivates all breakpoints on the page." + }, + { + "name": "setSkipAllPauses", + "parameters": [ + { "name": "skip", "type": "boolean", "description": "New value for skip pauses state." } + ], + "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)." + }, + { + "name": "setBreakpointByUrl", + "parameters": [ + { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." }, + { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." }, + { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." }, + { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } + ], + "returns": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, + { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." } + ], + "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads." + }, + { + "name": "setBreakpoint", + "parameters": [ + { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." }, + { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } + ], + "returns": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." }, + { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." } + ], + "description": "Sets JavaScript breakpoint at a given location." + }, + { + "name": "removeBreakpoint", + "parameters": [ + { "name": "breakpointId", "$ref": "BreakpointId" } + ], + "description": "Removes JavaScript breakpoint." + }, + { + "name": "getPossibleBreakpoints", + "parameters": [ + { "name": "start", "$ref": "Location", "description": "Start of range to search possible breakpoint locations in." }, + { "name": "end", "$ref": "Location", "optional": true, "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range." }, + { "name": "restrictToFunction", "type": "boolean", "optional": true, "description": "Only consider locations which are in the same (non-nested) function as start." } + ], + "returns": [ + { "name": "locations", "type": "array", "items": { "$ref": "BreakLocation" }, "description": "List of the possible breakpoint locations." } + ], + "description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.", + "experimental": true + }, + { + "name": "continueToLocation", + "parameters": [ + { "name": "location", "$ref": "Location", "description": "Location to continue to." }, + { "name": "targetCallFrames", "type": "string", "enum": ["any", "current"], "optional": true, "experimental": true } + ], + "description": "Continues execution until specific location is reached." + }, + { + "name": "stepOver", + "description": "Steps over the statement." + }, + { + "name": "stepInto", + "description": "Steps into the function call." + }, + { + "name": "stepOut", + "description": "Steps out of the function call." + }, + { + "name": "pause", + "description": "Stops on the next JavaScript statement." + }, + { + "name": "scheduleStepIntoAsync", + "description": "Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.", + "experimental": true + }, + { + "name": "resume", + "description": "Resumes JavaScript execution." + }, + { + "name": "searchInContent", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to search in." }, + { "name": "query", "type": "string", "description": "String to search for." }, + { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." }, + { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." } + ], + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." } + ], + "experimental": true, + "description": "Searches for given string in script content." + }, + { + "name": "setScriptSource", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to edit." }, + { "name": "scriptSource", "type": "string", "description": "New content of the script." }, + { "name": "dryRun", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code." } + ], + "returns": [ + { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." }, + { "name": "stackChanged", "type": "boolean", "optional": true, "description": "Whether current call stack was modified after applying the changes." }, + { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }, + { "name": "exceptionDetails", "optional": true, "$ref": "Runtime.ExceptionDetails", "description": "Exception details if any." } + ], + "description": "Edits JavaScript source live." + }, + { + "name": "restartFrame", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." } + ], + "returns": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." }, + { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." } + ], + "description": "Restarts particular call frame from the beginning." + }, + { + "name": "getScriptSource", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to get source for." } + ], + "returns": [ + { "name": "scriptSource", "type": "string", "description": "Script source." } + ], + "description": "Returns source for the script with given id." + }, + { + "name": "setPauseOnExceptions", + "parameters": [ + { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." } + ], + "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>." + }, + { + "name": "evaluateOnCallFrame", + "parameters": [ + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }, + { "name": "expression", "type": "string", "description": "Expression to evaluate." }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." }, + { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false." }, + { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." }, + { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." }, + { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." }, + { "name": "throwOnSideEffect", "type": "boolean", "optional": true, "experimental": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." }, + { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDetails", "optional": true, "description": "Exception details."} + ], + "description": "Evaluates expression on a given call frame." + }, + { + "name": "setVariableValue", + "parameters": [ + { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." }, + { "name": "variableName", "type": "string", "description": "Variable name." }, + { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." }, + { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of callframe that holds variable." } + ], + "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually." + }, + { + "name": "setAsyncCallStackDepth", + "parameters": [ + { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." } + ], + "description": "Enables or disables async call stacks tracking." + }, + { + "name": "setBlackboxPatterns", + "parameters": [ + { "name": "patterns", "type": "array", "items": { "type": "string" }, "description": "Array of regexps that will be used to check script url for blackbox state." } + ], + "experimental": true, + "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful." + }, + { + "name": "setBlackboxedRanges", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script." }, + { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } } + ], + "experimental": true, + "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted." + } + ], + "events": [ + { + "name": "scriptParsed", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." }, + { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, + { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, + { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, + { "name": "endLine", "type": "integer", "description": "Last line of the script." }, + { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." }, + { "name": "hash", "type": "string", "description": "Content hash of the script."}, + { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." }, + { "name": "isLiveEdit", "type": "boolean", "optional": true, "description": "True, if this script is generated as a result of the live edit operation.", "experimental": true }, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "experimental": true }, + { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module.", "experimental": true }, + { "name": "length", "type": "integer", "optional": true, "description": "This script length.", "experimental": true }, + { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true } + ], + "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger." + }, + { + "name": "scriptFailedToParse", + "parameters": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." }, + { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." }, + { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." }, + { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." }, + { "name": "endLine", "type": "integer", "description": "Last line of the script." }, + { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." }, + { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." }, + { "name": "hash", "type": "string", "description": "Content hash of the script."}, + { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." }, + { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }, + { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "experimental": true }, + { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module.", "experimental": true }, + { "name": "length", "type": "integer", "optional": true, "description": "This script length.", "experimental": true }, + { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true } + ], + "description": "Fired when virtual machine fails to parse the script." + }, + { + "name": "breakpointResolved", + "parameters": [ + { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." }, + { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." } + ], + "description": "Fired when breakpoint is resolved to an actual script and location." + }, + { + "name": "paused", + "parameters": [ + { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." }, + { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "OOM", "other", "ambiguous" ], "description": "Pause reason." }, + { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." }, + { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs" }, + { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." } + ], + "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria." + }, + { + "name": "resumed", + "description": "Fired when the virtual machine resumed execution." + } + ] + }, + { + "domain": "Console", + "description": "This domain is deprecated - use Runtime or Log instead.", + "dependencies": ["Runtime"], + "deprecated": true, + "types": [ + { + "id": "ConsoleMessage", + "type": "object", + "description": "Console message.", + "properties": [ + { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation", "worker"], "description": "Message source." }, + { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info"], "description": "Message severity." }, + { "name": "text", "type": "string", "description": "Message text." }, + { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." }, + { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message (1-based)." }, + { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message (1-based)." } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification." + }, + { + "name": "disable", + "description": "Disables console domain, prevents further console messages from being reported to the client." + }, + { + "name": "clearMessages", + "description": "Does nothing." + } + ], + "events": [ + { + "name": "messageAdded", + "parameters": [ + { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." } + ], + "description": "Issued when new console message is added." + } + ] + }, + { + "domain": "Profiler", + "dependencies": ["Runtime", "Debugger"], + "types": [ + { + "id": "ProfileNode", + "type": "object", + "description": "Profile node. Holds callsite information, execution statistics and child nodes.", + "properties": [ + { "name": "id", "type": "integer", "description": "Unique id of the node." }, + { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." }, + { "name": "hitCount", "type": "integer", "optional": true, "experimental": true, "description": "Number of samples where this node was on top of the call stack." }, + { "name": "children", "type": "array", "items": { "type": "integer" }, "optional": true, "description": "Child node ids." }, + { "name": "deoptReason", "type": "string", "optional": true, "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."}, + { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "optional": true, "experimental": true, "description": "An array of source position ticks." } + ] + }, + { + "id": "Profile", + "type": "object", + "description": "Profile.", + "properties": [ + { "name": "nodes", "type": "array", "items": { "$ref": "ProfileNode" }, "description": "The list of profile nodes. First item is the root node." }, + { "name": "startTime", "type": "number", "description": "Profiling start timestamp in microseconds." }, + { "name": "endTime", "type": "number", "description": "Profiling end timestamp in microseconds." }, + { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." }, + { "name": "timeDeltas", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime." } + ] + }, + { + "id": "PositionTickInfo", + "type": "object", + "experimental": true, + "description": "Specifies a number of samples attributed to a certain source position.", + "properties": [ + { "name": "line", "type": "integer", "description": "Source line number (1-based)." }, + { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." } + ] + }, + { "id": "CoverageRange", + "type": "object", + "description": "Coverage data for a source range.", + "properties": [ + { "name": "startOffset", "type": "integer", "description": "JavaScript script source offset for the range start." }, + { "name": "endOffset", "type": "integer", "description": "JavaScript script source offset for the range end." }, + { "name": "count", "type": "integer", "description": "Collected execution count of the source range." } + ], + "experimental": true + }, + { "id": "FunctionCoverage", + "type": "object", + "description": "Coverage data for a JavaScript function.", + "properties": [ + { "name": "functionName", "type": "string", "description": "JavaScript function name." }, + { "name": "ranges", "type": "array", "items": { "$ref": "CoverageRange" }, "description": "Source ranges inside the function with coverage data." } + ], + "experimental": true + }, + { + "id": "ScriptCoverage", + "type": "object", + "description": "Coverage data for a JavaScript script.", + "properties": [ + { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "JavaScript script id." }, + { "name": "url", "type": "string", "description": "JavaScript script name or url." }, + { "name": "functions", "type": "array", "items": { "$ref": "FunctionCoverage" }, "description": "Functions contained in the script that has coverage data." } + ], + "experimental": true + } + ], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "setSamplingInterval", + "parameters": [ + { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." } + ], + "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started." + }, + { + "name": "start" + }, + { + "name": "stop", + "returns": [ + { "name": "profile", "$ref": "Profile", "description": "Recorded profile." } + ] + }, + { + "name": "startPreciseCoverage", + "parameters": [ + { "name": "callCount", "type": "boolean", "optional": true, "description": "Collect accurate call counts beyond simple 'covered' or 'not covered'." } + ], + "description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.", + "experimental": true + }, + { + "name": "stopPreciseCoverage", + "description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.", + "experimental": true + }, + { + "name": "takePreciseCoverage", + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." } + ], + "description": "Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.", + "experimental": true + }, + { + "name": "getBestEffortCoverage", + "returns": [ + { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." } + ], + "description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.", + "experimental": true + } + ], + "events": [ + { + "name": "consoleProfileStarted", + "parameters": [ + { "name": "id", "type": "string" }, + { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." }, + { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." } + ], + "description": "Sent when new profile recording is started using console.profile() call." + }, + { + "name": "consoleProfileFinished", + "parameters": [ + { "name": "id", "type": "string" }, + { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." }, + { "name": "profile", "$ref": "Profile" }, + { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." } + ] + } + ] + }, + { + "domain": "HeapProfiler", + "dependencies": ["Runtime"], + "experimental": true, + "types": [ + { + "id": "HeapSnapshotObjectId", + "type": "string", + "description": "Heap snapshot object id." + }, + { + "id": "SamplingHeapProfileNode", + "type": "object", + "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.", + "properties": [ + { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." }, + { "name": "selfSize", "type": "number", "description": "Allocations size in bytes for the node excluding children." }, + { "name": "children", "type": "array", "items": { "$ref": "SamplingHeapProfileNode" }, "description": "Child nodes." } + ] + }, + { + "id": "SamplingHeapProfile", + "type": "object", + "description": "Profile.", + "properties": [ + { "name": "head", "$ref": "SamplingHeapProfileNode" } + ] + } + ], + "commands": [ + { + "name": "enable" + }, + { + "name": "disable" + }, + { + "name": "startTrackingHeapObjects", + "parameters": [ + { "name": "trackAllocations", "type": "boolean", "optional": true } + ] + }, + { + "name": "stopTrackingHeapObjects", + "parameters": [ + { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." } + ] + }, + { + "name": "takeHeapSnapshot", + "parameters": [ + { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." } + ] + }, + { + "name": "collectGarbage" + }, + { + "name": "getObjectByHeapObjectId", + "parameters": [ + { "name": "objectId", "$ref": "HeapSnapshotObjectId" }, + { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } + ], + "returns": [ + { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." } + ] + }, + { + "name": "addInspectedHeapObject", + "parameters": [ + { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." } + ], + "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)." + }, + { + "name": "getHeapObjectId", + "parameters": [ + { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." } + ], + "returns": [ + { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." } + ] + }, + { + "name": "startSampling", + "parameters": [ + { "name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes." } + ] + }, + { + "name": "stopSampling", + "returns": [ + { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Recorded sampling heap profile." } + ] + } + ], + "events": [ + { + "name": "addHeapSnapshotChunk", + "parameters": [ + { "name": "chunk", "type": "string" } + ] + }, + { + "name": "resetProfiles" + }, + { + "name": "reportHeapSnapshotProgress", + "parameters": [ + { "name": "done", "type": "integer" }, + { "name": "total", "type": "integer" }, + { "name": "finished", "type": "boolean", "optional": true } + ] + }, + { + "name": "lastSeenObjectId", + "description": "If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.", + "parameters": [ + { "name": "lastSeenObjectId", "type": "integer" }, + { "name": "timestamp", "type": "number" } + ] + }, + { + "name": "heapStatsUpdate", + "description": "If heap objects tracking has been started then backend may send update for one or more fragments", + "parameters": [ + { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."} + ] + } + ] + }] +} diff --git a/source/Sample/Program.cs b/source/Sample/Program.cs index 73f1e0813647df51bad1d6560ec04ec99134e34a..7b3761d0e1ae274afca6aaa43f4120d5a61f6717 100644 --- a/source/Sample/Program.cs +++ b/source/Sample/Program.cs @@ -1,50 +1,92 @@ using MasterDevs.ChromeDevTools.Protocol.Chrome.Page; using System; +using System.IO; using System.Linq; +using System.Threading; +using MasterDevs.ChromeDevTools.Protocol.Chrome.DOM; +using MasterDevs.ChromeDevTools.Protocol.Chrome.Emulation; +using Task = System.Threading.Tasks.Task; namespace MasterDevs.ChromeDevTools.Sample { internal class Program { + const int ViewPortWidth = 1440; + const int ViewPortHeight = 900; private static void Main(string[] args) { - // STEP 1 - Run Chrome - var chromeProcessFactory = new ChromeProcessFactory(); - using (var chromeProcess = chromeProcessFactory.Create(9222)) + Task.Run(async () => { - // STEP 2 - Create a debugging session - var endpointUrl = chromeProcess.GetSessions().Result.LastOrDefault(); - var chromeSessionFactory = new ChromeSessionFactory(); - var chromeSession = chromeSessionFactory.Create(endpointUrl); - - // STEP 3 - Send a command - // - // Here we are sending a command to tell chrome to navigate to - // the specified URL - var navigateResponse = chromeSession.SendAsync(new NavigateCommand + // synchronization + var screenshotDone = new ManualResetEventSlim(); + + // STEP 1 - Run Chrome + var chromeProcessFactory = new ChromeProcessFactory(new StubbornDirectoryCleaner()); + using (var chromeProcess = chromeProcessFactory.Create(9222, true)) + { + // STEP 2 - Create a debugging session + var sessionInfo = (await chromeProcess.GetSessionInfo()).LastOrDefault(); + var chromeSessionFactory = new ChromeSessionFactory(); + var chromeSession = chromeSessionFactory.Create(sessionInfo.WebSocketDebuggerUrl); + + // STEP 3 - Send a command + // + // Here we are sending a commands to tell chrome to set the viewport size + // and navigate to the specified URL + await chromeSession.SendAsync(new SetVisibleSizeCommand { - Url = "http://www.google.com" - }) - .Result; - Console.WriteLine("NavigateResponse: " + navigateResponse.Id); - - // STEP 4 - Register for events (in this case, "Page" domain events) - // send an event to tell chrome to send us all Page events - // but we only subscribe to certain events in this session - var pageEnableResult = chromeSession.SendAsync<ChromeDevTools.Protocol.Chrome.Page.EnableCommand>().Result; - Console.WriteLine("PageEnable: " + pageEnableResult.Id); - chromeSession.Subscribe<Protocol.Chrome.Page.DomContentEventFiredEvent>(domContentEvent => + Width = ViewPortWidth, + Height = ViewPortHeight + }); + + var navigateResponse = await chromeSession.SendAsync(new NavigateCommand { - Console.WriteLine("DomContentEvent: " + domContentEvent.Timestamp); + Url = "http://www.google.com" }); - // you might never see this, but that's what an event is ... right? - chromeSession.Subscribe<Protocol.Chrome.Page.FrameStartedLoadingEvent>(frameStartedLoadingEvent => + Console.WriteLine("NavigateResponse: " + navigateResponse.Id); + + // STEP 4 - Register for events (in this case, "Page" domain events) + // send an command to tell chrome to send us all Page events + // but we only subscribe to certain events in this session + var pageEnableResult = await chromeSession.SendAsync<Protocol.Chrome.Page.EnableCommand>(); + Console.WriteLine("PageEnable: " + pageEnableResult.Id); + + chromeSession.Subscribe<LoadEventFiredEvent>(loadEventFired => { - Console.WriteLine("FrameStartedLoading: " + frameStartedLoadingEvent.FrameId); + // we cannot block in event handler, hence the task + Task.Run(async () => + { + Console.WriteLine("LoadEventFiredEvent: " + loadEventFired.Timestamp); + + var documentNodeId = (await chromeSession.SendAsync(new GetDocumentCommand())).Result.Root.NodeId; + var bodyNodeId = + (await chromeSession.SendAsync(new QuerySelectorCommand + { + NodeId = documentNodeId, + Selector = "body" + })).Result.NodeId; + var height = (await chromeSession.SendAsync(new GetBoxModelCommand {NodeId = bodyNodeId})).Result.Model.Height; + + await chromeSession.SendAsync(new SetVisibleSizeCommand {Width = ViewPortWidth, Height = height}); + + Console.WriteLine("Taking screenshot"); + var screenshot = await chromeSession.SendAsync(new CaptureScreenshotCommand {Format = "png"}); + + var data = Convert.FromBase64String(screenshot.Result.Data); + File.WriteAllBytes("output.png", data); + Console.WriteLine("Screenshot stored"); + + // tell the main thread we are done + screenshotDone.Set(); + }); }); - Console.ReadLine(); - } + // wait for screenshoting thread to (start and) finish + screenshotDone.Wait(); + + Console.WriteLine("Exiting .."); + } + }).Wait(); } } } \ No newline at end of file