Skip to content
Snippets Groups Projects
Commit 8203b745 authored by svatal's avatar svatal
Browse files

new protocols - Chrome 60

parent 548620f9
No related branches found
No related tags found
No related merge requests found
Showing
with 231 additions and 52 deletions
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; }
}
}
......@@ -2,18 +2,18 @@ using MasterDevs.ChromeDevTools;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser
{
/// <summary>
/// Blocks specific URL from loading.
/// Get position and size of the browser window.
/// </summary>
[Command(ProtocolName.Network.AddBlockedURL)]
[Command(ProtocolName.Browser.GetWindowBounds)]
[SupportedBy("Chrome")]
public class AddBlockedURLCommand
public class GetWindowBoundsCommand
{
/// <summary>
/// Gets or sets URL to block.
/// Gets or sets Browser window id.
/// </summary>
public string Url { get; set; }
public long WindowId { get; set; }
}
}
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; }
}
}
......@@ -2,18 +2,18 @@ using MasterDevs.ChromeDevTools;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Page
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser
{
/// <summary>
/// Shows / hides color picker
/// Get the browser window that contains the devtools target.
/// </summary>
[Command(ProtocolName.Page.SetColorPickerEnabled)]
[Command(ProtocolName.Browser.GetWindowForTarget)]
[SupportedBy("Chrome")]
public class SetColorPickerEnabledCommand
public class GetWindowForTargetCommand
{
/// <summary>
/// Gets or sets Shows / hides color picker
/// Gets or sets Devtools agent host id.
/// </summary>
public bool Enabled { get; set; }
public string TargetId { get; set; }
}
}
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; }
}
}
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
{
/// <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; }
}
}
......@@ -2,14 +2,14 @@ using MasterDevs.ChromeDevTools;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Browser
{
/// <summary>
/// Cancels blocking of a specific URL from loading.
/// Set position and/or size of the browser window.
/// </summary>
[CommandResponse(ProtocolName.Network.RemoveBlockedURL)]
[CommandResponse(ProtocolName.Browser.SetWindowBounds)]
[SupportedBy("Chrome")]
public class RemoveBlockedURLCommandResponse
public class SetWindowBoundsCommandResponse
{
}
}
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,
}
}
......@@ -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; }
}
}
......@@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
{
/// <summary>
/// CSS rule usage information.
/// CSS coverage information.
/// </summary>
[SupportedBy("Chrome")]
public class RuleUsage
......
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
{
}
}
......@@ -2,18 +2,18 @@ using MasterDevs.ChromeDevTools;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Network
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
{
/// <summary>
/// Toggles monitoring of XMLHttpRequest. If <code>true</code>, console will receive messages upon each XHR issued.
/// Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)
/// </summary>
[Command(ProtocolName.Network.SetMonitoringXHREnabled)]
[CommandResponse(ProtocolName.CSS.TakeCoverageDelta)]
[SupportedBy("Chrome")]
public class SetMonitoringXHREnabledCommand
public class TakeCoverageDeltaCommandResponse
{
/// <summary>
/// Gets or sets Monitoring enabled state.
/// Gets or sets Coverage
/// </summary>
public bool Enabled { get; set; }
public RuleUsage[] Coverage { get; set; }
}
}
......@@ -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; }
}
}
......@@ -5,7 +5,7 @@ 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")]
......
......@@ -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")]
......
......@@ -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
{
/// <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; }
}
}
......@@ -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")]
......
......@@ -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
{
/// <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; }
}
}
......@@ -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")]
......
......@@ -15,5 +15,10 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Debugger
/// Gets or sets Location to continue to.
/// </summary>
public Location Location { get; set; }
/// <summary>
/// Gets or sets TargetCallFrames
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string TargetCallFrames { get; set; }
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment