001package Torello.Browser.BrowserAPI; 002 003// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 004// Java-HTML Imports 005// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 006 007import Torello.Browser.*; 008import Torello.Browser.helper.*; 009import Torello.Browser.JavaScriptAPI.*; 010import Torello.JSON.*; 011 012import Torello.Java.ReadOnly.ReadOnlyList; 013import Torello.Java.ReadOnly.ReadOnlyArrayList; 014 015import Torello.JavaDoc.Annotations.StaticFunctional; 016import Torello.JavaDoc.Annotations.JDHeaderBackgroundImg; 017 018import Torello.Browser.BrowserAPI.NestedHelpers.Commands.Page$$Commands; 019 020 021// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 022// JDK Imports 023// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 024 025import javax.json.JsonObject; 026import javax.json.JsonValue; 027 028/** 029 * <SPAN CLASS=COPIEDJDK><B>Actions and events related to the inspected page belong to the page domain.</B></SPAN> 030 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.CODE_GEN_NOTE> 031 */ 032@StaticFunctional@JDHeaderBackgroundImg(EmbedTagFileID="CDP.WOOD_PLANK_NOTE") 033public class Page 034{ 035 // No Pubic Constructors 036 private Page() { } 037 038 039 // ******************************************************************************************** 040 // ******************************************************************************************** 041 // Eliminated Types 042 // ******************************************************************************************** 043 // ******************************************************************************************** 044 045 046 /** 047 * Unique frame identifier. 048 049 * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType 050 * DATA-NAME=FrameId> 051 */ 052 public static final String FrameId = 053 "FrameId has been eliminated.\n" + 054 "It was replaced with the standard Java-Type: String"; 055 056 /** 057 * Unique script identifier. 058 059 * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType 060 * DATA-NAME=ScriptIdentifier> 061 */ 062 public static final String ScriptIdentifier = 063 "ScriptIdentifier has been eliminated.\n" + 064 "It was replaced with the standard Java-Type: String"; 065 066 067 // ******************************************************************************************** 068 // ******************************************************************************************** 069 // Marker Events 070 // ******************************************************************************************** 071 // ******************************************************************************************** 072 073 074 /** 075 * <CODE>[No Description Provided by Google]</CODE> 076 * 077 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 078 079 * 080 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.MarkerEvent 081 * DATA-NAME=frameResized> 082 */ 083 public static final String frameResized = "Page.frameResized Marker Event"; 084 085 /** 086 * Fired when interstitial page was hidden 087 088 * 089 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.MarkerEvent 090 * DATA-NAME=interstitialHidden> 091 */ 092 public static final String interstitialHidden = "Page.interstitialHidden Marker Event"; 093 094 /** 095 * Fired when interstitial page was shown 096 097 * 098 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.MarkerEvent 099 * DATA-NAME=interstitialShown> 100 */ 101 public static final String interstitialShown = "Page.interstitialShown Marker Event"; 102 103 104 // ******************************************************************************************** 105 // ******************************************************************************************** 106 // Enumerated String Constants Lists 107 // ******************************************************************************************** 108 // ******************************************************************************************** 109 110 111 /** 112 * <CODE>[No Description Provided by Google]</CODE> 113 * 114 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 115 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 116 */ 117 public static final ReadOnlyList<String> AdFrameExplanation = new ReadOnlyArrayList<> 118 (String.class, "CreatedByAdScript", "MatchedBlockingRule", "ParentIsAd"); 119 120 /** 121 * Indicates whether a frame has been identified as an ad. 122 * 123 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 124 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 125 */ 126 public static final ReadOnlyList<String> AdFrameType = new ReadOnlyArrayList<> 127 (String.class, "child", "none", "root"); 128 129 /** 130 * List of not restored reasons for back-forward cache. 131 * 132 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 133 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 134 */ 135 public static final ReadOnlyList<String> BackForwardCacheNotRestoredReason = new ReadOnlyArrayList<>( 136 String.class, 137 "ActivationNavigationsDisallowedForBug1234857", "AppBanner", "BackForwardCacheDisabled", 138 "BackForwardCacheDisabledByCommandLine", "BackForwardCacheDisabledByLowMemory", 139 "BackForwardCacheDisabledForDelegate", "BackForwardCacheDisabledForPrerender", 140 "BroadcastChannel", "BroadcastChannelOnMessage", "BrowsingInstanceNotSwapped", 141 "CacheControlNoStore", "CacheControlNoStoreCookieModified", 142 "CacheControlNoStoreDeviceBoundSessionTerminated", 143 "CacheControlNoStoreHTTPOnlyCookieModified", "CacheFlushed", "CacheLimit", 144 "CacheLimitPrunedOnCriticalMemoryPressure", "CacheLimitPrunedOnModerateMemoryPressure", 145 "ConflictingBrowsingInstance", "ContainsPlugins", "ContentDiscarded", "ContentFileChooser", 146 "ContentFileSystemAccess", "ContentMediaDevicesDispatcherHost", 147 "ContentMediaSessionService", "ContentScreenReader", "ContentSecurityHandler", 148 "ContentSerial", "ContentWebAuthenticationAPI", "ContentWebBluetooth", "ContentWebUSB", 149 "CookieDisabled", "CookieFlushed", "DisableForRenderFrameHostCalled", "DocumentLoaded", 150 "DomainNotAllowed", "Dummy", "EmbedderAppBannerManager", 151 "EmbedderChromePasswordManagerClientBindCredentialManager", 152 "EmbedderDomDistillerSelfDeletingRequestDelegate", "EmbedderDomDistillerViewerSource", 153 "EmbedderExtensionMessaging", "EmbedderExtensionMessagingForOpenPort", 154 "EmbedderExtensionSentMessageToCachedFrame", "EmbedderExtensions", "EmbedderModalDialog", 155 "EmbedderOfflinePage", "EmbedderOomInterventionTabHelper", 156 "EmbedderPermissionRequestManager", "EmbedderPopupBlockerTabHelper", 157 "EmbedderSafeBrowsingThreatDetails", "EmbedderSafeBrowsingTriggeredPopupBlocker", 158 "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", "ErrorDocument", 159 "FencedFramesEmbedder", "ForegroundCacheLimit", "HTTPAuthRequired", "HTTPMethodNotGET", 160 "HTTPStatusNotOK", "HaveInnerContents", "IdleManager", "IgnoreEventAndEvict", 161 "IndexedDBEvent", "InjectedJavascript", "InjectedStyleSheet", "JavaScriptExecution", 162 "JsNetworkRequestReceivedCacheControlNoStoreResource", "KeepaliveRequest", "KeyboardLock", 163 "LiveMediaStreamTrack", "Loading", "MainResourceHasCacheControlNoCache", 164 "MainResourceHasCacheControlNoStore", "NavigationCancelledWhileRestoring", 165 "NetworkExceedsBufferLimit", "NetworkRequestDatapipeDrainedAsBytesConsumer", 166 "NetworkRequestRedirected", "NetworkRequestTimeout", "NoResponseHead", 167 "NotMostRecentNavigationEntry", "NotPrimaryMainFrame", 168 "OutstandingNetworkRequestDirectSocket", "OutstandingNetworkRequestFetch", 169 "OutstandingNetworkRequestOthers", "OutstandingNetworkRequestXHR", "ParserAborted", 170 "PaymentManager", "PictureInPicture", "PostMessageByWebViewClient", "Printing", 171 "RelatedActiveContentsExist", "RenderFrameHostReused_CrossSite", 172 "RenderFrameHostReused_SameSite", "RendererProcessCrashed", "RendererProcessKilled", 173 "RequestedAudioCapturePermission", "RequestedBackForwardCacheBlockedSensors", 174 "RequestedBackgroundWorkPermission", "RequestedByWebViewClient", "RequestedMIDIPermission", 175 "RequestedStorageAccessGrant", "RequestedVideoCapturePermission", 176 "SchedulerTrackedFeatureUsed", "SchemeNotHTTPOrHTTPS", "ServiceWorkerClaim", 177 "ServiceWorkerPostMessage", "ServiceWorkerUnregistration", "ServiceWorkerVersionActivation", 178 "SessionRestored", "SharedWorker", "SharedWorkerMessage", "SmartCard", "SpeechRecognizer", 179 "SpeechSynthesis", "SubframeIsNavigating", "SubresourceHasCacheControlNoCache", 180 "SubresourceHasCacheControlNoStore", "Timeout", "TimeoutPuttingInCache", "Unknown", 181 "UnloadHandler", "UnloadHandlerExistsInMainFrame", "UnloadHandlerExistsInSubFrame", 182 "UserAgentOverrideDiffers", "WasGrantedMediaAccess", "WebDatabase", "WebHID", "WebLocks", 183 "WebNfc", "WebOTPService", "WebRTC", "WebRTCSticky", "WebShare", "WebSocket", 184 "WebSocketSticky", "WebTransport", "WebTransportSticky", 185 "WebViewDocumentStartJavascriptChanged", "WebViewJavaScriptObjectChanged", 186 "WebViewMessageListenerInjected", "WebViewSafeBrowsingAllowlistChanged", 187 "WebViewSettingsChanged", "WebXR" 188 ); 189 190 /** 191 * Types of not restored reasons for back-forward cache. 192 * 193 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 194 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 195 */ 196 public static final ReadOnlyList<String> BackForwardCacheNotRestoredReasonType = new ReadOnlyArrayList<> 197 (String.class, "Circumstantial", "PageSupportNeeded", "SupportPending"); 198 199 /** 200 * <CODE>[No Description Provided by Google]</CODE> 201 * 202 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 203 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 204 */ 205 public static final ReadOnlyList<String> ClientNavigationDisposition = new ReadOnlyArrayList<> 206 (String.class, "currentTab", "download", "newTab", "newWindow"); 207 208 /** 209 * <CODE>[No Description Provided by Google]</CODE> 210 * 211 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 212 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 213 */ 214 public static final ReadOnlyList<String> ClientNavigationReason = new ReadOnlyArrayList<>( 215 String.class, 216 "anchorClick", "formSubmissionGet", "formSubmissionPost", "httpHeaderRefresh", 217 "initialFrameNavigation", "metaTagRefresh", "other", "pageBlockInterstitial", "reload", 218 "scriptInitiated" 219 ); 220 221 /** 222 * Indicates whether the frame is cross-origin isolated and why it is the case. 223 * 224 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 225 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 226 */ 227 public static final ReadOnlyList<String> CrossOriginIsolatedContextType = new ReadOnlyArrayList<> 228 (String.class, "Isolated", "NotIsolated", "NotIsolatedFeatureDisabled"); 229 230 /** 231 * Javascript dialog type. 232 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 233 */ 234 public static final ReadOnlyList<String> DialogType = new ReadOnlyArrayList<> 235 (String.class, "alert", "beforeunload", "confirm", "prompt"); 236 237 /** 238 * <CODE>[No Description Provided by Google]</CODE> 239 * 240 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 241 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 242 */ 243 public static final ReadOnlyList<String> GatedAPIFeatures = new ReadOnlyArrayList<>( 244 String.class, 245 "PerformanceMeasureMemory", "PerformanceProfile", "SharedArrayBuffers", 246 "SharedArrayBuffersTransferAllowed" 247 ); 248 249 /** 250 * The type of a frameNavigated event. 251 * 252 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 253 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 254 */ 255 public static final ReadOnlyList<String> NavigationType = new ReadOnlyArrayList<> 256 (String.class, "BackForwardCacheRestore", "Navigation"); 257 258 /** 259 * Status for an Origin Trial. 260 * 261 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 262 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 263 */ 264 public static final ReadOnlyList<String> OriginTrialStatus = new ReadOnlyArrayList<> 265 (String.class, "Enabled", "OSNotSupported", "TrialNotAllowed", "ValidTokenNotProvided"); 266 267 /** 268 * Origin Trial(https://www.chromium.org/blink/origin-trials) support. 269 * Status for an Origin Trial token. 270 * 271 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 272 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 273 */ 274 public static final ReadOnlyList<String> OriginTrialTokenStatus = new ReadOnlyArrayList<>( 275 String.class, 276 "Expired", "FeatureDisabled", "FeatureDisabledForUser", "Insecure", "InvalidSignature", 277 "Malformed", "NotSupported", "Success", "TokenDisabled", "UnknownTrial", "WrongOrigin", 278 "WrongVersion" 279 ); 280 281 /** 282 * <CODE>[No Description Provided by Google]</CODE> 283 * 284 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 285 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 286 */ 287 public static final ReadOnlyList<String> OriginTrialUsageRestriction = new ReadOnlyArrayList<> 288 (String.class, "None", "Subset"); 289 290 /** 291 * Reason for a permissions policy feature to be disabled. 292 * 293 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 294 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 295 */ 296 public static final ReadOnlyList<String> PermissionsPolicyBlockReason = new ReadOnlyArrayList<> 297 (String.class, "Header", "IframeAttribute", "InFencedFrameTree", "InIsolatedApp"); 298 299 /** 300 * All Permissions Policy features. This enum should match the one defined 301 * in services/network/public/cpp/permissions_policy/permissions_policy_features.json5. 302 * LINT.IfChange(PermissionsPolicyFeature) 303 * 304 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 305 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 306 */ 307 public static final ReadOnlyList<String> PermissionsPolicyFeature = new ReadOnlyArrayList<>( 308 String.class, 309 "accelerometer", "all-screens-capture", "ambient-light-sensor", "aria-notify", 310 "attribution-reporting", "autoplay", "bluetooth", "browsing-topics", "camera", 311 "captured-surface-control", "ch-device-memory", "ch-downlink", "ch-dpr", "ch-ect", 312 "ch-prefers-color-scheme", "ch-prefers-reduced-motion", "ch-prefers-reduced-transparency", 313 "ch-rtt", "ch-save-data", "ch-ua", "ch-ua-arch", "ch-ua-bitness", "ch-ua-form-factors", 314 "ch-ua-full-version", "ch-ua-full-version-list", "ch-ua-high-entropy-values", 315 "ch-ua-mobile", "ch-ua-model", "ch-ua-platform", "ch-ua-platform-version", "ch-ua-wow64", 316 "ch-viewport-height", "ch-viewport-width", "ch-width", "clipboard-read", "clipboard-write", 317 "compute-pressure", "controlled-frame", "cross-origin-isolated", "deferred-fetch", 318 "deferred-fetch-minimal", "device-attributes", "digital-credentials-get", "direct-sockets", 319 "direct-sockets-private", "display-capture", "document-domain", "encrypted-media", 320 "execution-while-not-rendered", "execution-while-out-of-viewport", 321 "fenced-unpartitioned-storage-read", "focus-without-user-activation", "frobulate", 322 "fullscreen", "gamepad", "geolocation", "gyroscope", "hid", "identity-credentials-get", 323 "idle-detection", "interest-cohort", "join-ad-interest-group", "keyboard-map", 324 "language-detector", "language-model", "local-fonts", "local-network-access", 325 "magnetometer", "media-playback-while-not-visible", "microphone", "midi", 326 "on-device-speech-recognition", "otp-credentials", "payment", "picture-in-picture", 327 "popins", "private-aggregation", "private-state-token-issuance", 328 "private-state-token-redemption", "publickey-credentials-create", 329 "publickey-credentials-get", "record-ad-auction-events", "rewriter", "run-ad-auction", 330 "screen-wake-lock", "serial", "shared-autofill", "shared-storage", 331 "shared-storage-select-url", "smart-card", "speaker-selection", "storage-access", 332 "sub-apps", "summarizer", "sync-xhr", "translator", "unload", "usb", "usb-unrestricted", 333 "vertical-scroll", "web-app-installation", "web-printing", "web-share", "window-management", 334 "writer", "xr-spatial-tracking" 335 ); 336 337 /** 338 * The referring-policy used for the navigation. 339 * 340 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 341 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 342 */ 343 public static final ReadOnlyList<String> ReferrerPolicy = new ReadOnlyArrayList<>( 344 String.class, 345 "noReferrer", "noReferrerWhenDowngrade", "origin", "originWhenCrossOrigin", "sameOrigin", 346 "strictOrigin", "strictOriginWhenCrossOrigin", "unsafeUrl" 347 ); 348 349 /** 350 * Indicates whether the frame is a secure context and why it is the case. 351 * 352 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 353 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 354 */ 355 public static final ReadOnlyList<String> SecureContextType = new ReadOnlyArrayList<> 356 (String.class, "InsecureAncestor", "InsecureScheme", "Secure", "SecureLocalhost"); 357 358 /** 359 * Transition type. 360 * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B> 361 */ 362 public static final ReadOnlyList<String> TransitionType = new ReadOnlyArrayList<>( 363 String.class, 364 "address_bar", "auto_bookmark", "auto_subframe", "auto_toplevel", "form_submit", 365 "generated", "keyword", "keyword_generated", "link", "manual_subframe", "other", "reload", 366 "typed" 367 ); 368 369 370 371 // ******************************************************************************************** 372 // ******************************************************************************************** 373 // Basic Types 374 // ******************************************************************************************** 375 // ******************************************************************************************** 376 377 378 /** 379 * Indicates whether a frame has been identified as an ad and why. 380 * 381 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 382 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 383 */ 384 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 385 public static class AdFrameStatus 386 extends BaseType<AdFrameStatus> 387 implements java.io.Serializable 388 { 389 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 390 protected static final long serialVersionUID = 1; 391 392 private static final NestedHelper<Page.AdFrameStatus> singleton = 393 Torello.Browser.BrowserAPI.NestedHelpers.Types. 394 Page$$AdFrameStatus$$.singleton; 395 396 /** 397 * <CODE>[No Description Provided by Google]</CODE> 398 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=AdFrameType DATA-F=adFrameType DATA-FILE-ID=CDP.EL2> 399 * @see BaseType#enumStrList(String) 400 */ 401 public final String adFrameType; 402 403 /** 404 * <CODE>[No Description Provided by Google]</CODE> 405 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 406 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=AdFrameExplanation DATA-F=explanations DATA-FILE-ID=CDP.EL2> 407 * @see BaseType#enumStrList(String) 408 */ 409 public final String[] explanations; 410 411 /** Constructor. Please review this class' fields for documentation. */ 412 public AdFrameStatus 413 (ReadOnlyList<Boolean> isPresent, String adFrameType, String[] explanations) 414 { 415 super(singleton, Domains.Page, "AdFrameStatus", 2); 416 417 this.adFrameType = adFrameType; 418 this.explanations = explanations; 419 420 this.isPresent = (isPresent == null) 421 ? singleton.generateIsPresentList(this) 422 : THROWS.check(isPresent, 2, "Page.AdFrameStatus"); 423 } 424 425 /** Creates an instance of this class from a {@link JsonObject}.*/ 426 public static AdFrameStatus fromJSON(JsonObject jo) 427 { return singleton.fromJSON(jo); } 428 429 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 430 public static NestedDescriptor<AdFrameStatus> descriptor() 431 { return singleton.descriptor(); } 432 } 433 434 /** 435 * Encapsulates the script ancestry and the root script filterlist rule that 436 * caused the frame to be labelled as an ad. Only created when <CODE>ancestryChain</CODE> 437 * is not empty. 438 * 439 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 440 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 441 */ 442 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 443 public static class AdScriptAncestry 444 extends BaseType<AdScriptAncestry> 445 implements java.io.Serializable 446 { 447 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 448 protected static final long serialVersionUID = 1; 449 450 private static final NestedHelper<Page.AdScriptAncestry> singleton = 451 Torello.Browser.BrowserAPI.NestedHelpers.Types. 452 Page$$AdScriptAncestry$$.singleton; 453 454 /** 455 * A chain of <CODE>AdScriptId</CODE>s representing the ancestry of an ad script that 456 * led to the creation of a frame. The chain is ordered from the script 457 * itself (lower level) up to its root ancestor that was flagged by 458 * filterlist. 459 */ 460 public final Page.AdScriptId[] ancestryChain; 461 462 /** 463 * The filterlist rule that caused the root (last) script in 464 * <CODE>ancestryChain</CODE> to be ad-tagged. Only populated if the rule is 465 * available. 466 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 467 */ 468 public final String rootScriptFilterlistRule; 469 470 /** Constructor. Please review this class' fields for documentation. */ 471 public AdScriptAncestry( 472 ReadOnlyList<Boolean> isPresent, AdScriptId[] ancestryChain, 473 String rootScriptFilterlistRule 474 ) 475 { 476 super(singleton, Domains.Page, "AdScriptAncestry", 2); 477 478 this.ancestryChain = ancestryChain; 479 this.rootScriptFilterlistRule = rootScriptFilterlistRule; 480 481 this.isPresent = (isPresent == null) 482 ? singleton.generateIsPresentList(this) 483 : THROWS.check(isPresent, 2, "Page.AdScriptAncestry"); 484 } 485 486 /** Creates an instance of this class from a {@link JsonObject}.*/ 487 public static AdScriptAncestry fromJSON(JsonObject jo) 488 { return singleton.fromJSON(jo); } 489 490 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 491 public static NestedDescriptor<AdScriptAncestry> descriptor() 492 { return singleton.descriptor(); } 493 } 494 495 /** 496 * Identifies the script which caused a script or frame to be labelled as an 497 * ad. 498 * 499 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 500 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 501 */ 502 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 503 public static class AdScriptId 504 extends BaseType<AdScriptId> 505 implements java.io.Serializable 506 { 507 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 508 protected static final long serialVersionUID = 1; 509 510 private static final NestedHelper<Page.AdScriptId> singleton = 511 Torello.Browser.BrowserAPI.NestedHelpers.Types. 512 Page$$AdScriptId$$.singleton; 513 514 /** 515 * Script Id of the script which caused a script or frame to be labelled as 516 * an ad. 517 */ 518 public final String scriptId; 519 520 /** Id of scriptId's debugger. */ 521 public final String debuggerId; 522 523 /** Constructor. Please review this class' fields for documentation. */ 524 public AdScriptId(ReadOnlyList<Boolean> isPresent, String scriptId, String debuggerId) 525 { 526 super(singleton, Domains.Page, "AdScriptId", 2); 527 528 this.scriptId = scriptId; 529 this.debuggerId = debuggerId; 530 531 this.isPresent = (isPresent == null) 532 ? singleton.generateIsPresentList(this) 533 : THROWS.check(isPresent, 2, "Page.AdScriptId"); 534 } 535 536 /** Creates an instance of this class from a {@link JsonObject}.*/ 537 public static AdScriptId fromJSON(JsonObject jo) 538 { return singleton.fromJSON(jo); } 539 540 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 541 public static NestedDescriptor<AdScriptId> descriptor() 542 { return singleton.descriptor(); } 543 } 544 545 /** 546 * Error while paring app manifest. 547 * 548 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 549 */ 550 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 551 public static class AppManifestError 552 extends BaseType<AppManifestError> 553 implements java.io.Serializable 554 { 555 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 556 protected static final long serialVersionUID = 1; 557 558 private static final NestedHelper<Page.AppManifestError> singleton = 559 Torello.Browser.BrowserAPI.NestedHelpers.Types. 560 Page$$AppManifestError$$.singleton; 561 562 /** Error message. */ 563 public final String message; 564 565 /** If critical, this is a non-recoverable parse error. */ 566 public final int critical; 567 568 /** Error line. */ 569 public final int line; 570 571 /** Error column. */ 572 public final int column; 573 574 /** Constructor. Please review this class' fields for documentation. */ 575 public AppManifestError 576 (ReadOnlyList<Boolean> isPresent, String message, int critical, int line, int column) 577 { 578 super(singleton, Domains.Page, "AppManifestError", 4); 579 580 this.message = message; 581 this.critical = critical; 582 this.line = line; 583 this.column = column; 584 585 this.isPresent = (isPresent == null) 586 ? singleton.generateIsPresentList(this) 587 : THROWS.check(isPresent, 4, "Page.AppManifestError"); 588 } 589 590 /** Creates an instance of this class from a {@link JsonObject}.*/ 591 public static AppManifestError fromJSON(JsonObject jo) 592 { return singleton.fromJSON(jo); } 593 594 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 595 public static NestedDescriptor<AppManifestError> descriptor() 596 { return singleton.descriptor(); } 597 } 598 599 /** 600 * Parsed app manifest properties. 601 * 602 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 603 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 604 */ 605 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 606 public static class AppManifestParsedProperties 607 extends BaseType<AppManifestParsedProperties> 608 implements java.io.Serializable 609 { 610 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 611 protected static final long serialVersionUID = 1; 612 613 private static final NestedHelper<Page.AppManifestParsedProperties> singleton = 614 Torello.Browser.BrowserAPI.NestedHelpers.Types. 615 Page$$AppManifestParsedProperties$$.singleton; 616 617 /** Computed scope value */ 618 public final String scope; 619 620 /** Constructor. Please review this class' fields for documentation. */ 621 public AppManifestParsedProperties(ReadOnlyList<Boolean> isPresent, String scope) 622 { 623 super(singleton, Domains.Page, "AppManifestParsedProperties", 1); 624 625 this.scope = scope; 626 627 this.isPresent = (isPresent == null) 628 ? singleton.generateIsPresentList(this) 629 : THROWS.check(isPresent, 1, "Page.AppManifestParsedProperties"); 630 } 631 632 /** Creates an instance of this class from a {@link JsonObject}.*/ 633 public static AppManifestParsedProperties fromJSON(JsonObject jo) 634 { return singleton.fromJSON(jo); } 635 636 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 637 public static NestedDescriptor<AppManifestParsedProperties> descriptor() 638 { return singleton.descriptor(); } 639 } 640 641 /** 642 * <CODE>[No Description Provided by Google]</CODE> 643 * 644 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 645 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 646 */ 647 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 648 public static class BackForwardCacheBlockingDetails 649 extends BaseType<BackForwardCacheBlockingDetails> 650 implements java.io.Serializable 651 { 652 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 653 protected static final long serialVersionUID = 1; 654 655 private static final NestedHelper<Page.BackForwardCacheBlockingDetails> singleton = 656 Torello.Browser.BrowserAPI.NestedHelpers.Types. 657 Page$$BackForwardCacheBlockingDetails$$.singleton; 658 659 /** 660 * Url of the file where blockage happened. Optional because of tests. 661 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 662 */ 663 public final String url; 664 665 /** 666 * Function name where blockage happened. Optional because of anonymous functions and tests. 667 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 668 */ 669 public final String function; 670 671 /** Line number in the script (0-based). */ 672 public final int lineNumber; 673 674 /** Column number in the script (0-based). */ 675 public final int columnNumber; 676 677 /** Constructor. Please review this class' fields for documentation. */ 678 public BackForwardCacheBlockingDetails( 679 ReadOnlyList<Boolean> isPresent, String url, String function, int lineNumber, 680 int columnNumber 681 ) 682 { 683 super(singleton, Domains.Page, "BackForwardCacheBlockingDetails", 4); 684 685 this.url = url; 686 this.function = function; 687 this.lineNumber = lineNumber; 688 this.columnNumber = columnNumber; 689 690 this.isPresent = (isPresent == null) 691 ? singleton.generateIsPresentList(this) 692 : THROWS.check(isPresent, 4, "Page.BackForwardCacheBlockingDetails"); 693 } 694 695 /** Creates an instance of this class from a {@link JsonObject}.*/ 696 public static BackForwardCacheBlockingDetails fromJSON(JsonObject jo) 697 { return singleton.fromJSON(jo); } 698 699 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 700 public static NestedDescriptor<BackForwardCacheBlockingDetails> descriptor() 701 { return singleton.descriptor(); } 702 } 703 704 /** 705 * <CODE>[No Description Provided by Google]</CODE> 706 * 707 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 708 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 709 */ 710 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 711 public static class BackForwardCacheNotRestoredExplanation 712 extends BaseType<BackForwardCacheNotRestoredExplanation> 713 implements java.io.Serializable 714 { 715 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 716 protected static final long serialVersionUID = 1; 717 718 private static final NestedHelper<Page.BackForwardCacheNotRestoredExplanation> singleton = 719 Torello.Browser.BrowserAPI.NestedHelpers.Types. 720 Page$$BackForwardCacheNotRestoredExplanation$$.singleton; 721 722 /** 723 * Type of the reason 724 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=BackForwardCacheNotRestoredReasonType DATA-F=type DATA-FILE-ID=CDP.EL2> 725 * @see BaseType#enumStrList(String) 726 */ 727 public final String type; 728 729 /** 730 * Not restored reason 731 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=BackForwardCacheNotRestoredReason DATA-F=reason DATA-FILE-ID=CDP.EL2> 732 * @see BaseType#enumStrList(String) 733 */ 734 public final String reason; 735 736 /** 737 * Context associated with the reason. The meaning of this context is 738 * dependent on the reason: 739 * - EmbedderExtensionSentMessageToCachedFrame: the extension ID. 740 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 741 */ 742 public final String context; 743 744 /** 745 * <CODE>[No Description Provided by Google]</CODE> 746 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 747 */ 748 public final Page.BackForwardCacheBlockingDetails[] details; 749 750 /** Constructor. Please review this class' fields for documentation. */ 751 public BackForwardCacheNotRestoredExplanation( 752 ReadOnlyList<Boolean> isPresent, String type, String reason, String context, 753 BackForwardCacheBlockingDetails[] details 754 ) 755 { 756 super(singleton, Domains.Page, "BackForwardCacheNotRestoredExplanation", 4); 757 758 this.type = type; 759 this.reason = reason; 760 this.context = context; 761 this.details = details; 762 763 this.isPresent = (isPresent == null) 764 ? singleton.generateIsPresentList(this) 765 : THROWS.check(isPresent, 4, "Page.BackForwardCacheNotRestoredExplanation"); 766 } 767 768 /** Creates an instance of this class from a {@link JsonObject}.*/ 769 public static BackForwardCacheNotRestoredExplanation fromJSON(JsonObject jo) 770 { return singleton.fromJSON(jo); } 771 772 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 773 public static NestedDescriptor<BackForwardCacheNotRestoredExplanation> descriptor() 774 { return singleton.descriptor(); } 775 } 776 777 /** 778 * <CODE>[No Description Provided by Google]</CODE> 779 * 780 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 781 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 782 */ 783 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 784 public static class BackForwardCacheNotRestoredExplanationTree 785 extends BaseType<BackForwardCacheNotRestoredExplanationTree> 786 implements java.io.Serializable 787 { 788 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 789 protected static final long serialVersionUID = 1; 790 791 private static final NestedHelper<Page.BackForwardCacheNotRestoredExplanationTree> singleton = 792 Torello.Browser.BrowserAPI.NestedHelpers.Types. 793 Page$$BackForwardCacheNotRestoredExplanationTree$$.singleton; 794 795 /** URL of each frame */ 796 public final String url; 797 798 /** Not restored reasons of each frame */ 799 public final Page.BackForwardCacheNotRestoredExplanation[] explanations; 800 801 /** Array of children frame */ 802 public final Page.BackForwardCacheNotRestoredExplanationTree[] children; 803 804 /** Constructor. Please review this class' fields for documentation. */ 805 public BackForwardCacheNotRestoredExplanationTree( 806 ReadOnlyList<Boolean> isPresent, String url, 807 BackForwardCacheNotRestoredExplanation[] explanations, 808 BackForwardCacheNotRestoredExplanationTree[] children 809 ) 810 { 811 super(singleton, Domains.Page, "BackForwardCacheNotRestoredExplanationTree", 3); 812 813 this.url = url; 814 this.explanations = explanations; 815 this.children = children; 816 817 this.isPresent = (isPresent == null) 818 ? singleton.generateIsPresentList(this) 819 : THROWS.check(isPresent, 3, "Page.BackForwardCacheNotRestoredExplanationTree"); 820 } 821 822 /** Creates an instance of this class from a {@link JsonObject}.*/ 823 public static BackForwardCacheNotRestoredExplanationTree fromJSON(JsonObject jo) 824 { return singleton.fromJSON(jo); } 825 826 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 827 public static NestedDescriptor<BackForwardCacheNotRestoredExplanationTree> descriptor() 828 { return singleton.descriptor(); } 829 } 830 831 /** 832 * Per-script compilation cache parameters for <CODE>Page.produceCompilationCache</CODE> 833 * 834 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 835 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 836 */ 837 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 838 public static class CompilationCacheParams 839 extends BaseType<CompilationCacheParams> 840 implements java.io.Serializable 841 { 842 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 843 protected static final long serialVersionUID = 1; 844 845 private static final NestedHelper<Page.CompilationCacheParams> singleton = 846 Torello.Browser.BrowserAPI.NestedHelpers.Types. 847 Page$$CompilationCacheParams$$.singleton; 848 849 /** The URL of the script to produce a compilation cache entry for. */ 850 public final String url; 851 852 /** 853 * A hint to the backend whether eager compilation is recommended. 854 * (the actual compilation mode used is upon backend discretion). 855 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 856 */ 857 public final Boolean eager; 858 859 /** Constructor. Please review this class' fields for documentation. */ 860 public CompilationCacheParams(ReadOnlyList<Boolean> isPresent, String url, Boolean eager) 861 { 862 super(singleton, Domains.Page, "CompilationCacheParams", 2); 863 864 this.url = url; 865 this.eager = eager; 866 867 this.isPresent = (isPresent == null) 868 ? singleton.generateIsPresentList(this) 869 : THROWS.check(isPresent, 2, "Page.CompilationCacheParams"); 870 } 871 872 /** Creates an instance of this class from a {@link JsonObject}.*/ 873 public static CompilationCacheParams fromJSON(JsonObject jo) 874 { return singleton.fromJSON(jo); } 875 876 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 877 public static NestedDescriptor<CompilationCacheParams> descriptor() 878 { return singleton.descriptor(); } 879 } 880 881 /** 882 * <CODE>[No Description Provided by Google]</CODE> 883 * 884 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 885 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 886 */ 887 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 888 public static class FileFilter 889 extends BaseType<FileFilter> 890 implements java.io.Serializable 891 { 892 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 893 protected static final long serialVersionUID = 1; 894 895 private static final NestedHelper<Page.FileFilter> singleton = 896 Torello.Browser.BrowserAPI.NestedHelpers.Types. 897 Page$$FileFilter$$.singleton; 898 899 /** 900 * <CODE>[No Description Provided by Google]</CODE> 901 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 902 */ 903 public final String name; 904 905 /** 906 * <CODE>[No Description Provided by Google]</CODE> 907 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 908 */ 909 public final String[] accepts; 910 911 /** Constructor. Please review this class' fields for documentation. */ 912 public FileFilter(ReadOnlyList<Boolean> isPresent, String name, String[] accepts) 913 { 914 super(singleton, Domains.Page, "FileFilter", 2); 915 916 this.name = name; 917 this.accepts = accepts; 918 919 this.isPresent = (isPresent == null) 920 ? singleton.generateIsPresentList(this) 921 : THROWS.check(isPresent, 2, "Page.FileFilter"); 922 } 923 924 /** Creates an instance of this class from a {@link JsonObject}.*/ 925 public static FileFilter fromJSON(JsonObject jo) 926 { return singleton.fromJSON(jo); } 927 928 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 929 public static NestedDescriptor<FileFilter> descriptor() 930 { return singleton.descriptor(); } 931 } 932 933 /** 934 * <CODE>[No Description Provided by Google]</CODE> 935 * 936 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 937 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 938 */ 939 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 940 public static class FileHandler 941 extends BaseType<FileHandler> 942 implements java.io.Serializable 943 { 944 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 945 protected static final long serialVersionUID = 1; 946 947 private static final NestedHelper<Page.FileHandler> singleton = 948 Torello.Browser.BrowserAPI.NestedHelpers.Types. 949 Page$$FileHandler$$.singleton; 950 951 /** <CODE>[No Description Provided by Google]</CODE> */ 952 public final String action; 953 954 /** <CODE>[No Description Provided by Google]</CODE> */ 955 public final String name; 956 957 /** 958 * <CODE>[No Description Provided by Google]</CODE> 959 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 960 */ 961 public final Page.ImageResource[] icons; 962 963 /** 964 * Mimic a map, name is the key, accepts is the value. 965 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 966 */ 967 public final Page.FileFilter[] accepts; 968 969 /** 970 * Won't repeat the enums, using string for easy comparison. Same as the 971 * other enums below. 972 */ 973 public final String launchType; 974 975 /** Constructor. Please review this class' fields for documentation. */ 976 public FileHandler( 977 ReadOnlyList<Boolean> isPresent, String action, String name, ImageResource[] icons, 978 FileFilter[] accepts, String launchType 979 ) 980 { 981 super(singleton, Domains.Page, "FileHandler", 5); 982 983 this.action = action; 984 this.name = name; 985 this.icons = icons; 986 this.accepts = accepts; 987 this.launchType = launchType; 988 989 this.isPresent = (isPresent == null) 990 ? singleton.generateIsPresentList(this) 991 : THROWS.check(isPresent, 5, "Page.FileHandler"); 992 } 993 994 /** Creates an instance of this class from a {@link JsonObject}.*/ 995 public static FileHandler fromJSON(JsonObject jo) 996 { return singleton.fromJSON(jo); } 997 998 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 999 public static NestedDescriptor<FileHandler> descriptor() 1000 { return singleton.descriptor(); } 1001 } 1002 1003 /** 1004 * Generic font families collection. 1005 * 1006 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1007 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1008 */ 1009 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1010 public static class FontFamilies 1011 extends BaseType<FontFamilies> 1012 implements java.io.Serializable 1013 { 1014 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1015 protected static final long serialVersionUID = 1; 1016 1017 private static final NestedHelper<Page.FontFamilies> singleton = 1018 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1019 Page$$FontFamilies$$.singleton; 1020 1021 /** 1022 * The standard font-family. 1023 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1024 */ 1025 public final String standard; 1026 1027 /** 1028 * The fixed font-family. 1029 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1030 */ 1031 public final String fixed; 1032 1033 /** 1034 * The serif font-family. 1035 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1036 */ 1037 public final String serif; 1038 1039 /** 1040 * The sansSerif font-family. 1041 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1042 */ 1043 public final String sansSerif; 1044 1045 /** 1046 * The cursive font-family. 1047 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1048 */ 1049 public final String cursive; 1050 1051 /** 1052 * The fantasy font-family. 1053 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1054 */ 1055 public final String fantasy; 1056 1057 /** 1058 * The math font-family. 1059 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1060 */ 1061 public final String math; 1062 1063 /** Constructor. Please review this class' fields for documentation. */ 1064 public FontFamilies( 1065 ReadOnlyList<Boolean> isPresent, String standard, String fixed, String serif, 1066 String sansSerif, String cursive, String fantasy, String math 1067 ) 1068 { 1069 super(singleton, Domains.Page, "FontFamilies", 7); 1070 1071 this.standard = standard; 1072 this.fixed = fixed; 1073 this.serif = serif; 1074 this.sansSerif = sansSerif; 1075 this.cursive = cursive; 1076 this.fantasy = fantasy; 1077 this.math = math; 1078 1079 this.isPresent = (isPresent == null) 1080 ? singleton.generateIsPresentList(this) 1081 : THROWS.check(isPresent, 7, "Page.FontFamilies"); 1082 } 1083 1084 /** Creates an instance of this class from a {@link JsonObject}.*/ 1085 public static FontFamilies fromJSON(JsonObject jo) 1086 { return singleton.fromJSON(jo); } 1087 1088 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1089 public static NestedDescriptor<FontFamilies> descriptor() 1090 { return singleton.descriptor(); } 1091 } 1092 1093 /** 1094 * Default font sizes. 1095 * 1096 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1097 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1098 */ 1099 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1100 public static class FontSizes 1101 extends BaseType<FontSizes> 1102 implements java.io.Serializable 1103 { 1104 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1105 protected static final long serialVersionUID = 1; 1106 1107 private static final NestedHelper<Page.FontSizes> singleton = 1108 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1109 Page$$FontSizes$$.singleton; 1110 1111 /** 1112 * Default standard font size. 1113 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1114 */ 1115 public final Integer standard; 1116 1117 /** 1118 * Default fixed font size. 1119 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1120 */ 1121 public final Integer fixed; 1122 1123 /** Constructor. Please review this class' fields for documentation. */ 1124 public FontSizes(ReadOnlyList<Boolean> isPresent, Integer standard, Integer fixed) 1125 { 1126 super(singleton, Domains.Page, "FontSizes", 2); 1127 1128 this.standard = standard; 1129 this.fixed = fixed; 1130 1131 this.isPresent = (isPresent == null) 1132 ? singleton.generateIsPresentList(this) 1133 : THROWS.check(isPresent, 2, "Page.FontSizes"); 1134 } 1135 1136 /** Creates an instance of this class from a {@link JsonObject}.*/ 1137 public static FontSizes fromJSON(JsonObject jo) 1138 { return singleton.fromJSON(jo); } 1139 1140 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1141 public static NestedDescriptor<FontSizes> descriptor() 1142 { return singleton.descriptor(); } 1143 } 1144 1145 /** 1146 * Information about the Frame on the page. 1147 * 1148 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1149 */ 1150 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1151 public static class Frame 1152 extends BaseType<Frame> 1153 implements java.io.Serializable 1154 { 1155 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1156 protected static final long serialVersionUID = 1; 1157 1158 private static final NestedHelper<Page.Frame> singleton = 1159 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1160 Page$$Frame$$.singleton; 1161 1162 /** Frame unique identifier. */ 1163 public final String id; 1164 1165 /** 1166 * Parent frame identifier. 1167 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1168 */ 1169 public final String parentId; 1170 1171 /** Identifier of the loader associated with this frame. */ 1172 public final String loaderId; 1173 1174 /** 1175 * Frame's name as specified in the tag. 1176 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1177 */ 1178 public final String name; 1179 1180 /** Frame document's URL without fragment. */ 1181 public final String url; 1182 1183 /** 1184 * Frame document's URL fragment including the '#'. 1185 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1186 */ 1187 public final String urlFragment; 1188 1189 /** 1190 * Frame document's registered domain, taking the public suffixes list into account. 1191 * Extracted from the Frame's url. 1192 * Example URLs: http://www.google.com/file.html -> "google.com" 1193 * http://a.b.co.uk/file.html -> "b.co.uk" 1194 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1195 */ 1196 public final String domainAndRegistry; 1197 1198 /** Frame document's security origin. */ 1199 public final String securityOrigin; 1200 1201 /** 1202 * Additional details about the frame document's security origin. 1203 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1204 */ 1205 public final Page.SecurityOriginDetails securityOriginDetails; 1206 1207 /** Frame document's mimeType as determined by the browser. */ 1208 public final String mimeType; 1209 1210 /** 1211 * If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment. 1212 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1213 */ 1214 public final String unreachableUrl; 1215 1216 /** 1217 * Indicates whether this frame was tagged as an ad and why. 1218 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 1219 */ 1220 public final Page.AdFrameStatus adFrameStatus; 1221 1222 /** 1223 * Indicates whether the main document is a secure context and explains why that is the case. 1224 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1225 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=SecureContextType DATA-F=secureContextType DATA-FILE-ID=CDP.EL2> 1226 * @see BaseType#enumStrList(String) 1227 */ 1228 public final String secureContextType; 1229 1230 /** 1231 * Indicates whether this is a cross origin isolated context. 1232 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1233 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=CrossOriginIsolatedContextType DATA-F=crossOriginIsolatedContextType DATA-FILE-ID=CDP.EL2> 1234 * @see BaseType#enumStrList(String) 1235 */ 1236 public final String crossOriginIsolatedContextType; 1237 1238 /** 1239 * Indicated which gated APIs / features are available. 1240 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1241 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=GatedAPIFeatures DATA-F=gatedAPIFeatures DATA-FILE-ID=CDP.EL2> 1242 * @see BaseType#enumStrList(String) 1243 */ 1244 public final String[] gatedAPIFeatures; 1245 1246 /** Constructor. Please review this class' fields for documentation. */ 1247 public Frame( 1248 ReadOnlyList<Boolean> isPresent, String id, String parentId, String loaderId, 1249 String name, String url, String urlFragment, String domainAndRegistry, 1250 String securityOrigin, SecurityOriginDetails securityOriginDetails, 1251 String mimeType, String unreachableUrl, AdFrameStatus adFrameStatus, 1252 String secureContextType, String crossOriginIsolatedContextType, 1253 String[] gatedAPIFeatures 1254 ) 1255 { 1256 super(singleton, Domains.Page, "Frame", 15); 1257 1258 this.id = id; 1259 this.parentId = parentId; 1260 this.loaderId = loaderId; 1261 this.name = name; 1262 this.url = url; 1263 this.urlFragment = urlFragment; 1264 this.domainAndRegistry = domainAndRegistry; 1265 this.securityOrigin = securityOrigin; 1266 this.securityOriginDetails = securityOriginDetails; 1267 this.mimeType = mimeType; 1268 this.unreachableUrl = unreachableUrl; 1269 this.adFrameStatus = adFrameStatus; 1270 this.secureContextType = secureContextType; 1271 this.crossOriginIsolatedContextType = crossOriginIsolatedContextType; 1272 this.gatedAPIFeatures = gatedAPIFeatures; 1273 1274 this.isPresent = (isPresent == null) 1275 ? singleton.generateIsPresentList(this) 1276 : THROWS.check(isPresent, 15, "Page.Frame"); 1277 } 1278 1279 /** Creates an instance of this class from a {@link JsonObject}.*/ 1280 public static Frame fromJSON(JsonObject jo) 1281 { return singleton.fromJSON(jo); } 1282 1283 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1284 public static NestedDescriptor<Frame> descriptor() 1285 { return singleton.descriptor(); } 1286 } 1287 1288 /** 1289 * Information about the Resource on the page. 1290 * 1291 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1292 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1293 */ 1294 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1295 public static class FrameResource 1296 extends BaseType<FrameResource> 1297 implements java.io.Serializable 1298 { 1299 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1300 protected static final long serialVersionUID = 1; 1301 1302 private static final NestedHelper<Page.FrameResource> singleton = 1303 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1304 Page$$FrameResource$$.singleton; 1305 1306 /** Resource URL. */ 1307 public final String url; 1308 1309 /** 1310 * Type of this resource. 1311 * <EMBED CLASS='external-html' DATA-D=Network DATA-C=ResourceType DATA-F=type DATA-FILE-ID=CDP.EL2> 1312 * @see BaseType#enumStrList(String) 1313 */ 1314 public final String type; 1315 1316 /** Resource mimeType as determined by the browser. */ 1317 public final String mimeType; 1318 1319 /** 1320 * last-modified timestamp as reported by server. 1321 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1322 */ 1323 public final Number lastModified; 1324 1325 /** 1326 * Resource content size. 1327 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1328 */ 1329 public final Number contentSize; 1330 1331 /** 1332 * True if the resource failed to load. 1333 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1334 */ 1335 public final Boolean failed; 1336 1337 /** 1338 * True if the resource was canceled during loading. 1339 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1340 */ 1341 public final Boolean canceled; 1342 1343 /** Constructor. Please review this class' fields for documentation. */ 1344 public FrameResource( 1345 ReadOnlyList<Boolean> isPresent, String url, String type, String mimeType, 1346 Number lastModified, Number contentSize, Boolean failed, Boolean canceled 1347 ) 1348 { 1349 super(singleton, Domains.Page, "FrameResource", 7); 1350 1351 this.url = url; 1352 this.type = type; 1353 this.mimeType = mimeType; 1354 this.lastModified = lastModified; 1355 this.contentSize = contentSize; 1356 this.failed = failed; 1357 this.canceled = canceled; 1358 1359 this.isPresent = (isPresent == null) 1360 ? singleton.generateIsPresentList(this) 1361 : THROWS.check(isPresent, 7, "Page.FrameResource"); 1362 } 1363 1364 /** Creates an instance of this class from a {@link JsonObject}.*/ 1365 public static FrameResource fromJSON(JsonObject jo) 1366 { return singleton.fromJSON(jo); } 1367 1368 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1369 public static NestedDescriptor<FrameResource> descriptor() 1370 { return singleton.descriptor(); } 1371 } 1372 1373 /** 1374 * Information about the Frame hierarchy along with their cached resources. 1375 * 1376 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1377 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1378 */ 1379 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1380 public static class FrameResourceTree 1381 extends BaseType<FrameResourceTree> 1382 implements java.io.Serializable 1383 { 1384 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1385 protected static final long serialVersionUID = 1; 1386 1387 private static final NestedHelper<Page.FrameResourceTree> singleton = 1388 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1389 Page$$FrameResourceTree$$.singleton; 1390 1391 /** Frame information for this tree item. */ 1392 public final Page.Frame frame; 1393 1394 /** 1395 * Child frames. 1396 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1397 */ 1398 public final Page.FrameResourceTree[] childFrames; 1399 1400 /** Information about frame resources. */ 1401 public final Page.FrameResource[] resources; 1402 1403 /** Constructor. Please review this class' fields for documentation. */ 1404 public FrameResourceTree( 1405 ReadOnlyList<Boolean> isPresent, Frame frame, FrameResourceTree[] childFrames, 1406 FrameResource[] resources 1407 ) 1408 { 1409 super(singleton, Domains.Page, "FrameResourceTree", 3); 1410 1411 this.frame = frame; 1412 this.childFrames = childFrames; 1413 this.resources = resources; 1414 1415 this.isPresent = (isPresent == null) 1416 ? singleton.generateIsPresentList(this) 1417 : THROWS.check(isPresent, 3, "Page.FrameResourceTree"); 1418 } 1419 1420 /** Creates an instance of this class from a {@link JsonObject}.*/ 1421 public static FrameResourceTree fromJSON(JsonObject jo) 1422 { return singleton.fromJSON(jo); } 1423 1424 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1425 public static NestedDescriptor<FrameResourceTree> descriptor() 1426 { return singleton.descriptor(); } 1427 } 1428 1429 /** 1430 * Information about the Frame hierarchy. 1431 * 1432 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1433 */ 1434 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1435 public static class FrameTree 1436 extends BaseType<FrameTree> 1437 implements java.io.Serializable 1438 { 1439 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1440 protected static final long serialVersionUID = 1; 1441 1442 private static final NestedHelper<Page.FrameTree> singleton = 1443 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1444 Page$$FrameTree$$.singleton; 1445 1446 /** Frame information for this tree item. */ 1447 public final Page.Frame frame; 1448 1449 /** 1450 * Child frames. 1451 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1452 */ 1453 public final Page.FrameTree[] childFrames; 1454 1455 /** Constructor. Please review this class' fields for documentation. */ 1456 public FrameTree(ReadOnlyList<Boolean> isPresent, Frame frame, FrameTree[] childFrames) 1457 { 1458 super(singleton, Domains.Page, "FrameTree", 2); 1459 1460 this.frame = frame; 1461 this.childFrames = childFrames; 1462 1463 this.isPresent = (isPresent == null) 1464 ? singleton.generateIsPresentList(this) 1465 : THROWS.check(isPresent, 2, "Page.FrameTree"); 1466 } 1467 1468 /** Creates an instance of this class from a {@link JsonObject}.*/ 1469 public static FrameTree fromJSON(JsonObject jo) 1470 { return singleton.fromJSON(jo); } 1471 1472 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1473 public static NestedDescriptor<FrameTree> descriptor() 1474 { return singleton.descriptor(); } 1475 } 1476 1477 /** 1478 * The image definition used in both icon and screenshot. 1479 * 1480 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1481 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1482 */ 1483 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1484 public static class ImageResource 1485 extends BaseType<ImageResource> 1486 implements java.io.Serializable 1487 { 1488 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1489 protected static final long serialVersionUID = 1; 1490 1491 private static final NestedHelper<Page.ImageResource> singleton = 1492 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1493 Page$$ImageResource$$.singleton; 1494 1495 /** 1496 * The src field in the definition, but changing to url in favor of 1497 * consistency. 1498 */ 1499 public final String url; 1500 1501 /** 1502 * <CODE>[No Description Provided by Google]</CODE> 1503 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1504 */ 1505 public final String sizes; 1506 1507 /** 1508 * <CODE>[No Description Provided by Google]</CODE> 1509 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1510 */ 1511 public final String type; 1512 1513 /** Constructor. Please review this class' fields for documentation. */ 1514 public ImageResource 1515 (ReadOnlyList<Boolean> isPresent, String url, String sizes, String type) 1516 { 1517 super(singleton, Domains.Page, "ImageResource", 3); 1518 1519 this.url = url; 1520 this.sizes = sizes; 1521 this.type = type; 1522 1523 this.isPresent = (isPresent == null) 1524 ? singleton.generateIsPresentList(this) 1525 : THROWS.check(isPresent, 3, "Page.ImageResource"); 1526 } 1527 1528 /** Creates an instance of this class from a {@link JsonObject}.*/ 1529 public static ImageResource fromJSON(JsonObject jo) 1530 { return singleton.fromJSON(jo); } 1531 1532 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1533 public static NestedDescriptor<ImageResource> descriptor() 1534 { return singleton.descriptor(); } 1535 } 1536 1537 /** 1538 * The installability error 1539 * 1540 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1541 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1542 */ 1543 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1544 public static class InstallabilityError 1545 extends BaseType<InstallabilityError> 1546 implements java.io.Serializable 1547 { 1548 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1549 protected static final long serialVersionUID = 1; 1550 1551 private static final NestedHelper<Page.InstallabilityError> singleton = 1552 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1553 Page$$InstallabilityError$$.singleton; 1554 1555 /** The error id (e.g. 'manifest-missing-suitable-icon'). */ 1556 public final String errorId; 1557 1558 /** The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}). */ 1559 public final Page.InstallabilityErrorArgument[] errorArguments; 1560 1561 /** Constructor. Please review this class' fields for documentation. */ 1562 public InstallabilityError( 1563 ReadOnlyList<Boolean> isPresent, String errorId, 1564 InstallabilityErrorArgument[] errorArguments 1565 ) 1566 { 1567 super(singleton, Domains.Page, "InstallabilityError", 2); 1568 1569 this.errorId = errorId; 1570 this.errorArguments = errorArguments; 1571 1572 this.isPresent = (isPresent == null) 1573 ? singleton.generateIsPresentList(this) 1574 : THROWS.check(isPresent, 2, "Page.InstallabilityError"); 1575 } 1576 1577 /** Creates an instance of this class from a {@link JsonObject}.*/ 1578 public static InstallabilityError fromJSON(JsonObject jo) 1579 { return singleton.fromJSON(jo); } 1580 1581 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1582 public static NestedDescriptor<InstallabilityError> descriptor() 1583 { return singleton.descriptor(); } 1584 } 1585 1586 /** 1587 * <CODE>[No Description Provided by Google]</CODE> 1588 * 1589 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1590 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1591 */ 1592 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1593 public static class InstallabilityErrorArgument 1594 extends BaseType<InstallabilityErrorArgument> 1595 implements java.io.Serializable 1596 { 1597 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1598 protected static final long serialVersionUID = 1; 1599 1600 private static final NestedHelper<Page.InstallabilityErrorArgument> singleton = 1601 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1602 Page$$InstallabilityErrorArgument$$.singleton; 1603 1604 /** Argument name (e.g. name:'minimum-icon-size-in-pixels'). */ 1605 public final String name; 1606 1607 /** Argument value (e.g. value:'64'). */ 1608 public final String value; 1609 1610 /** Constructor. Please review this class' fields for documentation. */ 1611 public InstallabilityErrorArgument 1612 (ReadOnlyList<Boolean> isPresent, String name, String value) 1613 { 1614 super(singleton, Domains.Page, "InstallabilityErrorArgument", 2); 1615 1616 this.name = name; 1617 this.value = value; 1618 1619 this.isPresent = (isPresent == null) 1620 ? singleton.generateIsPresentList(this) 1621 : THROWS.check(isPresent, 2, "Page.InstallabilityErrorArgument"); 1622 } 1623 1624 /** Creates an instance of this class from a {@link JsonObject}.*/ 1625 public static InstallabilityErrorArgument fromJSON(JsonObject jo) 1626 { return singleton.fromJSON(jo); } 1627 1628 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1629 public static NestedDescriptor<InstallabilityErrorArgument> descriptor() 1630 { return singleton.descriptor(); } 1631 } 1632 1633 /** 1634 * <CODE>[No Description Provided by Google]</CODE> 1635 * 1636 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1637 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1638 */ 1639 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1640 public static class LaunchHandler 1641 extends BaseType<LaunchHandler> 1642 implements java.io.Serializable 1643 { 1644 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1645 protected static final long serialVersionUID = 1; 1646 1647 private static final NestedHelper<Page.LaunchHandler> singleton = 1648 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1649 Page$$LaunchHandler$$.singleton; 1650 1651 /** <CODE>[No Description Provided by Google]</CODE> */ 1652 public final String clientMode; 1653 1654 /** Constructor. Please review this class' fields for documentation. */ 1655 public LaunchHandler(ReadOnlyList<Boolean> isPresent, String clientMode) 1656 { 1657 super(singleton, Domains.Page, "LaunchHandler", 1); 1658 1659 this.clientMode = clientMode; 1660 1661 this.isPresent = (isPresent == null) 1662 ? singleton.generateIsPresentList(this) 1663 : THROWS.check(isPresent, 1, "Page.LaunchHandler"); 1664 } 1665 1666 /** Creates an instance of this class from a {@link JsonObject}.*/ 1667 public static LaunchHandler fromJSON(JsonObject jo) 1668 { return singleton.fromJSON(jo); } 1669 1670 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1671 public static NestedDescriptor<LaunchHandler> descriptor() 1672 { return singleton.descriptor(); } 1673 } 1674 1675 /** 1676 * Layout viewport position and dimensions. 1677 * 1678 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1679 */ 1680 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1681 public static class LayoutViewport 1682 extends BaseType<LayoutViewport> 1683 implements java.io.Serializable 1684 { 1685 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1686 protected static final long serialVersionUID = 1; 1687 1688 private static final NestedHelper<Page.LayoutViewport> singleton = 1689 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1690 Page$$LayoutViewport$$.singleton; 1691 1692 /** Horizontal offset relative to the document (CSS pixels). */ 1693 public final int pageX; 1694 1695 /** Vertical offset relative to the document (CSS pixels). */ 1696 public final int pageY; 1697 1698 /** Width (CSS pixels), excludes scrollbar if present. */ 1699 public final int clientWidth; 1700 1701 /** Height (CSS pixels), excludes scrollbar if present. */ 1702 public final int clientHeight; 1703 1704 /** Constructor. Please review this class' fields for documentation. */ 1705 public LayoutViewport( 1706 ReadOnlyList<Boolean> isPresent, int pageX, int pageY, int clientWidth, 1707 int clientHeight 1708 ) 1709 { 1710 super(singleton, Domains.Page, "LayoutViewport", 4); 1711 1712 this.pageX = pageX; 1713 this.pageY = pageY; 1714 this.clientWidth = clientWidth; 1715 this.clientHeight = clientHeight; 1716 1717 this.isPresent = (isPresent == null) 1718 ? singleton.generateIsPresentList(this) 1719 : THROWS.check(isPresent, 4, "Page.LayoutViewport"); 1720 } 1721 1722 /** Creates an instance of this class from a {@link JsonObject}.*/ 1723 public static LayoutViewport fromJSON(JsonObject jo) 1724 { return singleton.fromJSON(jo); } 1725 1726 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1727 public static NestedDescriptor<LayoutViewport> descriptor() 1728 { return singleton.descriptor(); } 1729 } 1730 1731 /** 1732 * Navigation history entry. 1733 * 1734 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1735 */ 1736 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1737 public static class NavigationEntry 1738 extends BaseType<NavigationEntry> 1739 implements java.io.Serializable 1740 { 1741 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1742 protected static final long serialVersionUID = 1; 1743 1744 private static final NestedHelper<Page.NavigationEntry> singleton = 1745 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1746 Page$$NavigationEntry$$.singleton; 1747 1748 /** Unique id of the navigation history entry. */ 1749 public final int id; 1750 1751 /** URL of the navigation history entry. */ 1752 public final String url; 1753 1754 /** URL that the user typed in the url bar. */ 1755 public final String userTypedURL; 1756 1757 /** Title of the navigation history entry. */ 1758 public final String title; 1759 1760 /** 1761 * Transition type. 1762 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=TransitionType DATA-F=transitionType DATA-FILE-ID=CDP.EL2> 1763 * @see BaseType#enumStrList(String) 1764 */ 1765 public final String transitionType; 1766 1767 /** Constructor. Please review this class' fields for documentation. */ 1768 public NavigationEntry( 1769 ReadOnlyList<Boolean> isPresent, int id, String url, String userTypedURL, 1770 String title, String transitionType 1771 ) 1772 { 1773 super(singleton, Domains.Page, "NavigationEntry", 5); 1774 1775 this.id = id; 1776 this.url = url; 1777 this.userTypedURL = userTypedURL; 1778 this.title = title; 1779 this.transitionType = transitionType; 1780 1781 this.isPresent = (isPresent == null) 1782 ? singleton.generateIsPresentList(this) 1783 : THROWS.check(isPresent, 5, "Page.NavigationEntry"); 1784 } 1785 1786 /** Creates an instance of this class from a {@link JsonObject}.*/ 1787 public static NavigationEntry fromJSON(JsonObject jo) 1788 { return singleton.fromJSON(jo); } 1789 1790 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1791 public static NestedDescriptor<NavigationEntry> descriptor() 1792 { return singleton.descriptor(); } 1793 } 1794 1795 /** 1796 * <CODE>[No Description Provided by Google]</CODE> 1797 * 1798 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1799 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1800 */ 1801 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1802 public static class OriginTrial 1803 extends BaseType<OriginTrial> 1804 implements java.io.Serializable 1805 { 1806 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1807 protected static final long serialVersionUID = 1; 1808 1809 private static final NestedHelper<Page.OriginTrial> singleton = 1810 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1811 Page$$OriginTrial$$.singleton; 1812 1813 /** <CODE>[No Description Provided by Google]</CODE> */ 1814 public final String trialName; 1815 1816 /** 1817 * <CODE>[No Description Provided by Google]</CODE> 1818 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=OriginTrialStatus DATA-F=status DATA-FILE-ID=CDP.EL2> 1819 * @see BaseType#enumStrList(String) 1820 */ 1821 public final String status; 1822 1823 /** <CODE>[No Description Provided by Google]</CODE> */ 1824 public final Page.OriginTrialTokenWithStatus[] tokensWithStatus; 1825 1826 /** Constructor. Please review this class' fields for documentation. */ 1827 public OriginTrial( 1828 ReadOnlyList<Boolean> isPresent, String trialName, String status, 1829 OriginTrialTokenWithStatus[] tokensWithStatus 1830 ) 1831 { 1832 super(singleton, Domains.Page, "OriginTrial", 3); 1833 1834 this.trialName = trialName; 1835 this.status = status; 1836 this.tokensWithStatus = tokensWithStatus; 1837 1838 this.isPresent = (isPresent == null) 1839 ? singleton.generateIsPresentList(this) 1840 : THROWS.check(isPresent, 3, "Page.OriginTrial"); 1841 } 1842 1843 /** Creates an instance of this class from a {@link JsonObject}.*/ 1844 public static OriginTrial fromJSON(JsonObject jo) 1845 { return singleton.fromJSON(jo); } 1846 1847 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1848 public static NestedDescriptor<OriginTrial> descriptor() 1849 { return singleton.descriptor(); } 1850 } 1851 1852 /** 1853 * <CODE>[No Description Provided by Google]</CODE> 1854 * 1855 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1856 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1857 */ 1858 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1859 public static class OriginTrialToken 1860 extends BaseType<OriginTrialToken> 1861 implements java.io.Serializable 1862 { 1863 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1864 protected static final long serialVersionUID = 1; 1865 1866 private static final NestedHelper<Page.OriginTrialToken> singleton = 1867 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1868 Page$$OriginTrialToken$$.singleton; 1869 1870 /** <CODE>[No Description Provided by Google]</CODE> */ 1871 public final String origin; 1872 1873 /** <CODE>[No Description Provided by Google]</CODE> */ 1874 public final boolean matchSubDomains; 1875 1876 /** <CODE>[No Description Provided by Google]</CODE> */ 1877 public final String trialName; 1878 1879 /** <CODE>[No Description Provided by Google]</CODE> */ 1880 public final Number expiryTime; 1881 1882 /** <CODE>[No Description Provided by Google]</CODE> */ 1883 public final boolean isThirdParty; 1884 1885 /** 1886 * <CODE>[No Description Provided by Google]</CODE> 1887 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=OriginTrialUsageRestriction DATA-F=usageRestriction DATA-FILE-ID=CDP.EL2> 1888 * @see BaseType#enumStrList(String) 1889 */ 1890 public final String usageRestriction; 1891 1892 /** Constructor. Please review this class' fields for documentation. */ 1893 public OriginTrialToken( 1894 ReadOnlyList<Boolean> isPresent, String origin, boolean matchSubDomains, 1895 String trialName, Number expiryTime, boolean isThirdParty, String usageRestriction 1896 ) 1897 { 1898 super(singleton, Domains.Page, "OriginTrialToken", 6); 1899 1900 this.origin = origin; 1901 this.matchSubDomains = matchSubDomains; 1902 this.trialName = trialName; 1903 this.expiryTime = expiryTime; 1904 this.isThirdParty = isThirdParty; 1905 this.usageRestriction = usageRestriction; 1906 1907 this.isPresent = (isPresent == null) 1908 ? singleton.generateIsPresentList(this) 1909 : THROWS.check(isPresent, 6, "Page.OriginTrialToken"); 1910 } 1911 1912 /** Creates an instance of this class from a {@link JsonObject}.*/ 1913 public static OriginTrialToken fromJSON(JsonObject jo) 1914 { return singleton.fromJSON(jo); } 1915 1916 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1917 public static NestedDescriptor<OriginTrialToken> descriptor() 1918 { return singleton.descriptor(); } 1919 } 1920 1921 /** 1922 * <CODE>[No Description Provided by Google]</CODE> 1923 * 1924 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1925 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1926 */ 1927 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1928 public static class OriginTrialTokenWithStatus 1929 extends BaseType<OriginTrialTokenWithStatus> 1930 implements java.io.Serializable 1931 { 1932 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1933 protected static final long serialVersionUID = 1; 1934 1935 private static final NestedHelper<Page.OriginTrialTokenWithStatus> singleton = 1936 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1937 Page$$OriginTrialTokenWithStatus$$.singleton; 1938 1939 /** <CODE>[No Description Provided by Google]</CODE> */ 1940 public final String rawTokenText; 1941 1942 /** 1943 * <CODE>parsedToken</CODE> is present only when the token is extractable and 1944 * parsable. 1945 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 1946 */ 1947 public final Page.OriginTrialToken parsedToken; 1948 1949 /** 1950 * <CODE>[No Description Provided by Google]</CODE> 1951 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=OriginTrialTokenStatus DATA-F=status DATA-FILE-ID=CDP.EL2> 1952 * @see BaseType#enumStrList(String) 1953 */ 1954 public final String status; 1955 1956 /** Constructor. Please review this class' fields for documentation. */ 1957 public OriginTrialTokenWithStatus( 1958 ReadOnlyList<Boolean> isPresent, String rawTokenText, OriginTrialToken parsedToken, 1959 String status 1960 ) 1961 { 1962 super(singleton, Domains.Page, "OriginTrialTokenWithStatus", 3); 1963 1964 this.rawTokenText = rawTokenText; 1965 this.parsedToken = parsedToken; 1966 this.status = status; 1967 1968 this.isPresent = (isPresent == null) 1969 ? singleton.generateIsPresentList(this) 1970 : THROWS.check(isPresent, 3, "Page.OriginTrialTokenWithStatus"); 1971 } 1972 1973 /** Creates an instance of this class from a {@link JsonObject}.*/ 1974 public static OriginTrialTokenWithStatus fromJSON(JsonObject jo) 1975 { return singleton.fromJSON(jo); } 1976 1977 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 1978 public static NestedDescriptor<OriginTrialTokenWithStatus> descriptor() 1979 { return singleton.descriptor(); } 1980 } 1981 1982 /** 1983 * <CODE>[No Description Provided by Google]</CODE> 1984 * 1985 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 1986 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 1987 */ 1988 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 1989 public static class PermissionsPolicyBlockLocator 1990 extends BaseType<PermissionsPolicyBlockLocator> 1991 implements java.io.Serializable 1992 { 1993 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 1994 protected static final long serialVersionUID = 1; 1995 1996 private static final NestedHelper<Page.PermissionsPolicyBlockLocator> singleton = 1997 Torello.Browser.BrowserAPI.NestedHelpers.Types. 1998 Page$$PermissionsPolicyBlockLocator$$.singleton; 1999 2000 /** <CODE>[No Description Provided by Google]</CODE> */ 2001 public final String frameId; 2002 2003 /** 2004 * <CODE>[No Description Provided by Google]</CODE> 2005 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=PermissionsPolicyBlockReason DATA-F=blockReason DATA-FILE-ID=CDP.EL2> 2006 * @see BaseType#enumStrList(String) 2007 */ 2008 public final String blockReason; 2009 2010 /** Constructor. Please review this class' fields for documentation. */ 2011 public PermissionsPolicyBlockLocator 2012 (ReadOnlyList<Boolean> isPresent, String frameId, String blockReason) 2013 { 2014 super(singleton, Domains.Page, "PermissionsPolicyBlockLocator", 2); 2015 2016 this.frameId = frameId; 2017 this.blockReason = blockReason; 2018 2019 this.isPresent = (isPresent == null) 2020 ? singleton.generateIsPresentList(this) 2021 : THROWS.check(isPresent, 2, "Page.PermissionsPolicyBlockLocator"); 2022 } 2023 2024 /** Creates an instance of this class from a {@link JsonObject}.*/ 2025 public static PermissionsPolicyBlockLocator fromJSON(JsonObject jo) 2026 { return singleton.fromJSON(jo); } 2027 2028 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2029 public static NestedDescriptor<PermissionsPolicyBlockLocator> descriptor() 2030 { return singleton.descriptor(); } 2031 } 2032 2033 /** 2034 * <CODE>[No Description Provided by Google]</CODE> 2035 * 2036 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2037 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2038 */ 2039 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2040 public static class PermissionsPolicyFeatureState 2041 extends BaseType<PermissionsPolicyFeatureState> 2042 implements java.io.Serializable 2043 { 2044 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2045 protected static final long serialVersionUID = 1; 2046 2047 private static final NestedHelper<Page.PermissionsPolicyFeatureState> singleton = 2048 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2049 Page$$PermissionsPolicyFeatureState$$.singleton; 2050 2051 /** 2052 * <CODE>[No Description Provided by Google]</CODE> 2053 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=PermissionsPolicyFeature DATA-F=feature DATA-FILE-ID=CDP.EL2> 2054 * @see BaseType#enumStrList(String) 2055 */ 2056 public final String feature; 2057 2058 /** <CODE>[No Description Provided by Google]</CODE> */ 2059 public final boolean allowed; 2060 2061 /** 2062 * <CODE>[No Description Provided by Google]</CODE> 2063 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2064 */ 2065 public final Page.PermissionsPolicyBlockLocator locator; 2066 2067 /** Constructor. Please review this class' fields for documentation. */ 2068 public PermissionsPolicyFeatureState( 2069 ReadOnlyList<Boolean> isPresent, String feature, boolean allowed, 2070 PermissionsPolicyBlockLocator locator 2071 ) 2072 { 2073 super(singleton, Domains.Page, "PermissionsPolicyFeatureState", 3); 2074 2075 this.feature = feature; 2076 this.allowed = allowed; 2077 this.locator = locator; 2078 2079 this.isPresent = (isPresent == null) 2080 ? singleton.generateIsPresentList(this) 2081 : THROWS.check(isPresent, 3, "Page.PermissionsPolicyFeatureState"); 2082 } 2083 2084 /** Creates an instance of this class from a {@link JsonObject}.*/ 2085 public static PermissionsPolicyFeatureState fromJSON(JsonObject jo) 2086 { return singleton.fromJSON(jo); } 2087 2088 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2089 public static NestedDescriptor<PermissionsPolicyFeatureState> descriptor() 2090 { return singleton.descriptor(); } 2091 } 2092 2093 /** 2094 * <CODE>[No Description Provided by Google]</CODE> 2095 * 2096 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2097 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2098 */ 2099 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2100 public static class ProtocolHandler 2101 extends BaseType<ProtocolHandler> 2102 implements java.io.Serializable 2103 { 2104 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2105 protected static final long serialVersionUID = 1; 2106 2107 private static final NestedHelper<Page.ProtocolHandler> singleton = 2108 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2109 Page$$ProtocolHandler$$.singleton; 2110 2111 /** <CODE>[No Description Provided by Google]</CODE> */ 2112 public final String protocol; 2113 2114 /** <CODE>[No Description Provided by Google]</CODE> */ 2115 public final String url; 2116 2117 /** Constructor. Please review this class' fields for documentation. */ 2118 public ProtocolHandler(ReadOnlyList<Boolean> isPresent, String protocol, String url) 2119 { 2120 super(singleton, Domains.Page, "ProtocolHandler", 2); 2121 2122 this.protocol = protocol; 2123 this.url = url; 2124 2125 this.isPresent = (isPresent == null) 2126 ? singleton.generateIsPresentList(this) 2127 : THROWS.check(isPresent, 2, "Page.ProtocolHandler"); 2128 } 2129 2130 /** Creates an instance of this class from a {@link JsonObject}.*/ 2131 public static ProtocolHandler fromJSON(JsonObject jo) 2132 { return singleton.fromJSON(jo); } 2133 2134 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2135 public static NestedDescriptor<ProtocolHandler> descriptor() 2136 { return singleton.descriptor(); } 2137 } 2138 2139 /** 2140 * <CODE>[No Description Provided by Google]</CODE> 2141 * 2142 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2143 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2144 */ 2145 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2146 public static class RelatedApplication 2147 extends BaseType<RelatedApplication> 2148 implements java.io.Serializable 2149 { 2150 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2151 protected static final long serialVersionUID = 1; 2152 2153 private static final NestedHelper<Page.RelatedApplication> singleton = 2154 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2155 Page$$RelatedApplication$$.singleton; 2156 2157 /** 2158 * <CODE>[No Description Provided by Google]</CODE> 2159 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2160 */ 2161 public final String id; 2162 2163 /** <CODE>[No Description Provided by Google]</CODE> */ 2164 public final String url; 2165 2166 /** Constructor. Please review this class' fields for documentation. */ 2167 public RelatedApplication(ReadOnlyList<Boolean> isPresent, String id, String url) 2168 { 2169 super(singleton, Domains.Page, "RelatedApplication", 2); 2170 2171 this.id = id; 2172 this.url = url; 2173 2174 this.isPresent = (isPresent == null) 2175 ? singleton.generateIsPresentList(this) 2176 : THROWS.check(isPresent, 2, "Page.RelatedApplication"); 2177 } 2178 2179 /** Creates an instance of this class from a {@link JsonObject}.*/ 2180 public static RelatedApplication fromJSON(JsonObject jo) 2181 { return singleton.fromJSON(jo); } 2182 2183 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2184 public static NestedDescriptor<RelatedApplication> descriptor() 2185 { return singleton.descriptor(); } 2186 } 2187 2188 /** 2189 * <CODE>[No Description Provided by Google]</CODE> 2190 * 2191 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2192 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2193 */ 2194 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2195 public static class ScopeExtension 2196 extends BaseType<ScopeExtension> 2197 implements java.io.Serializable 2198 { 2199 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2200 protected static final long serialVersionUID = 1; 2201 2202 private static final NestedHelper<Page.ScopeExtension> singleton = 2203 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2204 Page$$ScopeExtension$$.singleton; 2205 2206 /** 2207 * Instead of using tuple, this field always returns the serialized string 2208 * for easy understanding and comparison. 2209 */ 2210 public final String origin; 2211 2212 /** <CODE>[No Description Provided by Google]</CODE> */ 2213 public final boolean hasOriginWildcard; 2214 2215 /** Constructor. Please review this class' fields for documentation. */ 2216 public ScopeExtension 2217 (ReadOnlyList<Boolean> isPresent, String origin, boolean hasOriginWildcard) 2218 { 2219 super(singleton, Domains.Page, "ScopeExtension", 2); 2220 2221 this.origin = origin; 2222 this.hasOriginWildcard = hasOriginWildcard; 2223 2224 this.isPresent = (isPresent == null) 2225 ? singleton.generateIsPresentList(this) 2226 : THROWS.check(isPresent, 2, "Page.ScopeExtension"); 2227 } 2228 2229 /** Creates an instance of this class from a {@link JsonObject}.*/ 2230 public static ScopeExtension fromJSON(JsonObject jo) 2231 { return singleton.fromJSON(jo); } 2232 2233 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2234 public static NestedDescriptor<ScopeExtension> descriptor() 2235 { return singleton.descriptor(); } 2236 } 2237 2238 /** 2239 * Screencast frame metadata. 2240 * 2241 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2242 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2243 */ 2244 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2245 public static class ScreencastFrameMetadata 2246 extends BaseType<ScreencastFrameMetadata> 2247 implements java.io.Serializable 2248 { 2249 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2250 protected static final long serialVersionUID = 1; 2251 2252 private static final NestedHelper<Page.ScreencastFrameMetadata> singleton = 2253 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2254 Page$$ScreencastFrameMetadata$$.singleton; 2255 2256 /** Top offset in DIP. */ 2257 public final Number offsetTop; 2258 2259 /** Page scale factor. */ 2260 public final Number pageScaleFactor; 2261 2262 /** Device screen width in DIP. */ 2263 public final Number deviceWidth; 2264 2265 /** Device screen height in DIP. */ 2266 public final Number deviceHeight; 2267 2268 /** Position of horizontal scroll in CSS pixels. */ 2269 public final Number scrollOffsetX; 2270 2271 /** Position of vertical scroll in CSS pixels. */ 2272 public final Number scrollOffsetY; 2273 2274 /** 2275 * Frame swap timestamp. 2276 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2277 */ 2278 public final Number timestamp; 2279 2280 /** Constructor. Please review this class' fields for documentation. */ 2281 public ScreencastFrameMetadata( 2282 ReadOnlyList<Boolean> isPresent, Number offsetTop, Number pageScaleFactor, 2283 Number deviceWidth, Number deviceHeight, Number scrollOffsetX, 2284 Number scrollOffsetY, Number timestamp 2285 ) 2286 { 2287 super(singleton, Domains.Page, "ScreencastFrameMetadata", 7); 2288 2289 this.offsetTop = offsetTop; 2290 this.pageScaleFactor = pageScaleFactor; 2291 this.deviceWidth = deviceWidth; 2292 this.deviceHeight = deviceHeight; 2293 this.scrollOffsetX = scrollOffsetX; 2294 this.scrollOffsetY = scrollOffsetY; 2295 this.timestamp = timestamp; 2296 2297 this.isPresent = (isPresent == null) 2298 ? singleton.generateIsPresentList(this) 2299 : THROWS.check(isPresent, 7, "Page.ScreencastFrameMetadata"); 2300 } 2301 2302 /** Creates an instance of this class from a {@link JsonObject}.*/ 2303 public static ScreencastFrameMetadata fromJSON(JsonObject jo) 2304 { return singleton.fromJSON(jo); } 2305 2306 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2307 public static NestedDescriptor<ScreencastFrameMetadata> descriptor() 2308 { return singleton.descriptor(); } 2309 } 2310 2311 /** 2312 * <CODE>[No Description Provided by Google]</CODE> 2313 * 2314 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2315 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2316 */ 2317 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2318 public static class Screenshot 2319 extends BaseType<Screenshot> 2320 implements java.io.Serializable 2321 { 2322 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2323 protected static final long serialVersionUID = 1; 2324 2325 private static final NestedHelper<Page.Screenshot> singleton = 2326 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2327 Page$$Screenshot$$.singleton; 2328 2329 /** <CODE>[No Description Provided by Google]</CODE> */ 2330 public final Page.ImageResource image; 2331 2332 /** <CODE>[No Description Provided by Google]</CODE> */ 2333 public final String formFactor; 2334 2335 /** 2336 * <CODE>[No Description Provided by Google]</CODE> 2337 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2338 */ 2339 public final String label; 2340 2341 /** Constructor. Please review this class' fields for documentation. */ 2342 public Screenshot 2343 (ReadOnlyList<Boolean> isPresent, ImageResource image, String formFactor, String label) 2344 { 2345 super(singleton, Domains.Page, "Screenshot", 3); 2346 2347 this.image = image; 2348 this.formFactor = formFactor; 2349 this.label = label; 2350 2351 this.isPresent = (isPresent == null) 2352 ? singleton.generateIsPresentList(this) 2353 : THROWS.check(isPresent, 3, "Page.Screenshot"); 2354 } 2355 2356 /** Creates an instance of this class from a {@link JsonObject}.*/ 2357 public static Screenshot fromJSON(JsonObject jo) 2358 { return singleton.fromJSON(jo); } 2359 2360 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2361 public static NestedDescriptor<Screenshot> descriptor() 2362 { return singleton.descriptor(); } 2363 } 2364 2365 /** 2366 * Font families collection for a script. 2367 * 2368 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2369 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2370 */ 2371 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2372 public static class ScriptFontFamilies 2373 extends BaseType<ScriptFontFamilies> 2374 implements java.io.Serializable 2375 { 2376 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2377 protected static final long serialVersionUID = 1; 2378 2379 private static final NestedHelper<Page.ScriptFontFamilies> singleton = 2380 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2381 Page$$ScriptFontFamilies$$.singleton; 2382 2383 /** Name of the script which these font families are defined for. */ 2384 public final String script; 2385 2386 /** Generic font families collection for the script. */ 2387 public final Page.FontFamilies fontFamilies; 2388 2389 /** Constructor. Please review this class' fields for documentation. */ 2390 public ScriptFontFamilies 2391 (ReadOnlyList<Boolean> isPresent, String script, FontFamilies fontFamilies) 2392 { 2393 super(singleton, Domains.Page, "ScriptFontFamilies", 2); 2394 2395 this.script = script; 2396 this.fontFamilies = fontFamilies; 2397 2398 this.isPresent = (isPresent == null) 2399 ? singleton.generateIsPresentList(this) 2400 : THROWS.check(isPresent, 2, "Page.ScriptFontFamilies"); 2401 } 2402 2403 /** Creates an instance of this class from a {@link JsonObject}.*/ 2404 public static ScriptFontFamilies fromJSON(JsonObject jo) 2405 { return singleton.fromJSON(jo); } 2406 2407 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2408 public static NestedDescriptor<ScriptFontFamilies> descriptor() 2409 { return singleton.descriptor(); } 2410 } 2411 2412 /** 2413 * Additional information about the frame document's security origin. 2414 * 2415 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2416 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2417 */ 2418 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2419 public static class SecurityOriginDetails 2420 extends BaseType<SecurityOriginDetails> 2421 implements java.io.Serializable 2422 { 2423 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2424 protected static final long serialVersionUID = 1; 2425 2426 private static final NestedHelper<Page.SecurityOriginDetails> singleton = 2427 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2428 Page$$SecurityOriginDetails$$.singleton; 2429 2430 /** 2431 * Indicates whether the frame document's security origin is one 2432 * of the local hostnames (e.g. "localhost") or IP addresses (IPv4 2433 * 127.0.0.0/8 or IPv6 ::1). 2434 */ 2435 public final boolean isLocalhost; 2436 2437 /** Constructor. Please review this class' fields for documentation. */ 2438 public SecurityOriginDetails(ReadOnlyList<Boolean> isPresent, boolean isLocalhost) 2439 { 2440 super(singleton, Domains.Page, "SecurityOriginDetails", 1); 2441 2442 this.isLocalhost = isLocalhost; 2443 2444 this.isPresent = (isPresent == null) 2445 ? singleton.generateIsPresentList(this) 2446 : THROWS.check(isPresent, 1, "Page.SecurityOriginDetails"); 2447 } 2448 2449 /** Creates an instance of this class from a {@link JsonObject}.*/ 2450 public static SecurityOriginDetails fromJSON(JsonObject jo) 2451 { return singleton.fromJSON(jo); } 2452 2453 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2454 public static NestedDescriptor<SecurityOriginDetails> descriptor() 2455 { return singleton.descriptor(); } 2456 } 2457 2458 /** 2459 * <CODE>[No Description Provided by Google]</CODE> 2460 * 2461 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2462 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2463 */ 2464 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2465 public static class ShareTarget 2466 extends BaseType<ShareTarget> 2467 implements java.io.Serializable 2468 { 2469 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2470 protected static final long serialVersionUID = 1; 2471 2472 private static final NestedHelper<Page.ShareTarget> singleton = 2473 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2474 Page$$ShareTarget$$.singleton; 2475 2476 /** <CODE>[No Description Provided by Google]</CODE> */ 2477 public final String action; 2478 2479 /** <CODE>[No Description Provided by Google]</CODE> */ 2480 public final String method; 2481 2482 /** <CODE>[No Description Provided by Google]</CODE> */ 2483 public final String enctype; 2484 2485 /** 2486 * Embed the ShareTargetParams 2487 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2488 */ 2489 public final String title; 2490 2491 /** 2492 * <CODE>[No Description Provided by Google]</CODE> 2493 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2494 */ 2495 public final String text; 2496 2497 /** 2498 * <CODE>[No Description Provided by Google]</CODE> 2499 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2500 */ 2501 public final String url; 2502 2503 /** 2504 * <CODE>[No Description Provided by Google]</CODE> 2505 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2506 */ 2507 public final Page.FileFilter[] files; 2508 2509 /** Constructor. Please review this class' fields for documentation. */ 2510 public ShareTarget( 2511 ReadOnlyList<Boolean> isPresent, String action, String method, String enctype, 2512 String title, String text, String url, FileFilter[] files 2513 ) 2514 { 2515 super(singleton, Domains.Page, "ShareTarget", 7); 2516 2517 this.action = action; 2518 this.method = method; 2519 this.enctype = enctype; 2520 this.title = title; 2521 this.text = text; 2522 this.url = url; 2523 this.files = files; 2524 2525 this.isPresent = (isPresent == null) 2526 ? singleton.generateIsPresentList(this) 2527 : THROWS.check(isPresent, 7, "Page.ShareTarget"); 2528 } 2529 2530 /** Creates an instance of this class from a {@link JsonObject}.*/ 2531 public static ShareTarget fromJSON(JsonObject jo) 2532 { return singleton.fromJSON(jo); } 2533 2534 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2535 public static NestedDescriptor<ShareTarget> descriptor() 2536 { return singleton.descriptor(); } 2537 } 2538 2539 /** 2540 * <CODE>[No Description Provided by Google]</CODE> 2541 * 2542 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2543 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2544 */ 2545 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2546 public static class Shortcut 2547 extends BaseType<Shortcut> 2548 implements java.io.Serializable 2549 { 2550 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2551 protected static final long serialVersionUID = 1; 2552 2553 private static final NestedHelper<Page.Shortcut> singleton = 2554 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2555 Page$$Shortcut$$.singleton; 2556 2557 /** <CODE>[No Description Provided by Google]</CODE> */ 2558 public final String name; 2559 2560 /** <CODE>[No Description Provided by Google]</CODE> */ 2561 public final String url; 2562 2563 /** Constructor. Please review this class' fields for documentation. */ 2564 public Shortcut(ReadOnlyList<Boolean> isPresent, String name, String url) 2565 { 2566 super(singleton, Domains.Page, "Shortcut", 2); 2567 2568 this.name = name; 2569 this.url = url; 2570 2571 this.isPresent = (isPresent == null) 2572 ? singleton.generateIsPresentList(this) 2573 : THROWS.check(isPresent, 2, "Page.Shortcut"); 2574 } 2575 2576 /** Creates an instance of this class from a {@link JsonObject}.*/ 2577 public static Shortcut fromJSON(JsonObject jo) 2578 { return singleton.fromJSON(jo); } 2579 2580 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2581 public static NestedDescriptor<Shortcut> descriptor() 2582 { return singleton.descriptor(); } 2583 } 2584 2585 /** 2586 * Viewport for capturing screenshot. 2587 * 2588 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2589 */ 2590 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2591 public static class Viewport 2592 extends BaseType<Viewport> 2593 implements java.io.Serializable 2594 { 2595 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2596 protected static final long serialVersionUID = 1; 2597 2598 private static final NestedHelper<Page.Viewport> singleton = 2599 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2600 Page$$Viewport$$.singleton; 2601 2602 /** X offset in device independent pixels (dip). */ 2603 public final Number x; 2604 2605 /** Y offset in device independent pixels (dip). */ 2606 public final Number y; 2607 2608 /** Rectangle width in device independent pixels (dip). */ 2609 public final Number width; 2610 2611 /** Rectangle height in device independent pixels (dip). */ 2612 public final Number height; 2613 2614 /** Page scale factor. */ 2615 public final Number scale; 2616 2617 /** Constructor. Please review this class' fields for documentation. */ 2618 public Viewport( 2619 ReadOnlyList<Boolean> isPresent, Number x, Number y, Number width, Number height, 2620 Number scale 2621 ) 2622 { 2623 super(singleton, Domains.Page, "Viewport", 5); 2624 2625 this.x = x; 2626 this.y = y; 2627 this.width = width; 2628 this.height = height; 2629 this.scale = scale; 2630 2631 this.isPresent = (isPresent == null) 2632 ? singleton.generateIsPresentList(this) 2633 : THROWS.check(isPresent, 5, "Page.Viewport"); 2634 } 2635 2636 /** Creates an instance of this class from a {@link JsonObject}.*/ 2637 public static Viewport fromJSON(JsonObject jo) 2638 { return singleton.fromJSON(jo); } 2639 2640 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2641 public static NestedDescriptor<Viewport> descriptor() 2642 { return singleton.descriptor(); } 2643 } 2644 2645 /** 2646 * Visual viewport position, dimensions, and scale. 2647 * 2648 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2649 */ 2650 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2651 public static class VisualViewport 2652 extends BaseType<VisualViewport> 2653 implements java.io.Serializable 2654 { 2655 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2656 protected static final long serialVersionUID = 1; 2657 2658 private static final NestedHelper<Page.VisualViewport> singleton = 2659 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2660 Page$$VisualViewport$$.singleton; 2661 2662 /** Horizontal offset relative to the layout viewport (CSS pixels). */ 2663 public final Number offsetX; 2664 2665 /** Vertical offset relative to the layout viewport (CSS pixels). */ 2666 public final Number offsetY; 2667 2668 /** Horizontal offset relative to the document (CSS pixels). */ 2669 public final Number pageX; 2670 2671 /** Vertical offset relative to the document (CSS pixels). */ 2672 public final Number pageY; 2673 2674 /** Width (CSS pixels), excludes scrollbar if present. */ 2675 public final Number clientWidth; 2676 2677 /** Height (CSS pixels), excludes scrollbar if present. */ 2678 public final Number clientHeight; 2679 2680 /** Scale relative to the ideal viewport (size at width=device-width). */ 2681 public final Number scale; 2682 2683 /** 2684 * Page zoom factor (CSS to device independent pixels ratio). 2685 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2686 */ 2687 public final Number zoom; 2688 2689 /** Constructor. Please review this class' fields for documentation. */ 2690 public VisualViewport( 2691 ReadOnlyList<Boolean> isPresent, Number offsetX, Number offsetY, Number pageX, 2692 Number pageY, Number clientWidth, Number clientHeight, Number scale, Number zoom 2693 ) 2694 { 2695 super(singleton, Domains.Page, "VisualViewport", 8); 2696 2697 this.offsetX = offsetX; 2698 this.offsetY = offsetY; 2699 this.pageX = pageX; 2700 this.pageY = pageY; 2701 this.clientWidth = clientWidth; 2702 this.clientHeight = clientHeight; 2703 this.scale = scale; 2704 this.zoom = zoom; 2705 2706 this.isPresent = (isPresent == null) 2707 ? singleton.generateIsPresentList(this) 2708 : THROWS.check(isPresent, 8, "Page.VisualViewport"); 2709 } 2710 2711 /** Creates an instance of this class from a {@link JsonObject}.*/ 2712 public static VisualViewport fromJSON(JsonObject jo) 2713 { return singleton.fromJSON(jo); } 2714 2715 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2716 public static NestedDescriptor<VisualViewport> descriptor() 2717 { return singleton.descriptor(); } 2718 } 2719 2720 /** 2721 * <CODE>[No Description Provided by Google]</CODE> 2722 * 2723 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2724 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 2725 */ 2726 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI") 2727 public static class WebAppManifest 2728 extends BaseType<WebAppManifest> 2729 implements java.io.Serializable 2730 { 2731 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2732 protected static final long serialVersionUID = 1; 2733 2734 private static final NestedHelper<Page.WebAppManifest> singleton = 2735 Torello.Browser.BrowserAPI.NestedHelpers.Types. 2736 Page$$WebAppManifest$$.singleton; 2737 2738 /** 2739 * <CODE>[No Description Provided by Google]</CODE> 2740 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2741 */ 2742 public final String backgroundColor; 2743 2744 /** 2745 * The extra description provided by the manifest. 2746 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2747 */ 2748 public final String description; 2749 2750 /** 2751 * <CODE>[No Description Provided by Google]</CODE> 2752 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2753 */ 2754 public final String dir; 2755 2756 /** 2757 * <CODE>[No Description Provided by Google]</CODE> 2758 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2759 */ 2760 public final String display; 2761 2762 /** 2763 * The overrided display mode controlled by the user. 2764 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2765 */ 2766 public final String[] displayOverrides; 2767 2768 /** 2769 * The handlers to open files. 2770 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2771 */ 2772 public final Page.FileHandler[] fileHandlers; 2773 2774 /** 2775 * <CODE>[No Description Provided by Google]</CODE> 2776 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2777 */ 2778 public final Page.ImageResource[] icons; 2779 2780 /** 2781 * <CODE>[No Description Provided by Google]</CODE> 2782 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2783 */ 2784 public final String id; 2785 2786 /** 2787 * <CODE>[No Description Provided by Google]</CODE> 2788 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2789 */ 2790 public final String lang; 2791 2792 /** 2793 * TODO(crbug.com/1231886): This field is non-standard and part of a Chrome 2794 * experiment. See: 2795 * https://github.com/WICG/web-app-launch/blob/main/launch_handler.md 2796 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2797 */ 2798 public final Page.LaunchHandler launchHandler; 2799 2800 /** 2801 * <CODE>[No Description Provided by Google]</CODE> 2802 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2803 */ 2804 public final String name; 2805 2806 /** 2807 * <CODE>[No Description Provided by Google]</CODE> 2808 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2809 */ 2810 public final String orientation; 2811 2812 /** 2813 * <CODE>[No Description Provided by Google]</CODE> 2814 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2815 */ 2816 public final Boolean preferRelatedApplications; 2817 2818 /** 2819 * The handlers to open protocols. 2820 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2821 */ 2822 public final Page.ProtocolHandler[] protocolHandlers; 2823 2824 /** 2825 * <CODE>[No Description Provided by Google]</CODE> 2826 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2827 */ 2828 public final Page.RelatedApplication[] relatedApplications; 2829 2830 /** 2831 * <CODE>[No Description Provided by Google]</CODE> 2832 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2833 */ 2834 public final String scope; 2835 2836 /** 2837 * Non-standard, see 2838 * https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md 2839 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2840 */ 2841 public final Page.ScopeExtension[] scopeExtensions; 2842 2843 /** 2844 * The screenshots used by chromium. 2845 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2846 */ 2847 public final Page.Screenshot[] screenshots; 2848 2849 /** 2850 * <CODE>[No Description Provided by Google]</CODE> 2851 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2852 */ 2853 public final Page.ShareTarget shareTarget; 2854 2855 /** 2856 * <CODE>[No Description Provided by Google]</CODE> 2857 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2858 */ 2859 public final String shortName; 2860 2861 /** 2862 * <CODE>[No Description Provided by Google]</CODE> 2863 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2864 */ 2865 public final Page.Shortcut[] shortcuts; 2866 2867 /** 2868 * <CODE>[No Description Provided by Google]</CODE> 2869 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2870 */ 2871 public final String startUrl; 2872 2873 /** 2874 * <CODE>[No Description Provided by Google]</CODE> 2875 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2876 */ 2877 public final String themeColor; 2878 2879 /** Constructor. Please review this class' fields for documentation. */ 2880 public WebAppManifest( 2881 ReadOnlyList<Boolean> isPresent, String backgroundColor, String description, 2882 String dir, String display, String[] displayOverrides, FileHandler[] fileHandlers, 2883 ImageResource[] icons, String id, String lang, LaunchHandler launchHandler, 2884 String name, String orientation, Boolean preferRelatedApplications, 2885 ProtocolHandler[] protocolHandlers, RelatedApplication[] relatedApplications, 2886 String scope, ScopeExtension[] scopeExtensions, Screenshot[] screenshots, 2887 ShareTarget shareTarget, String shortName, Shortcut[] shortcuts, String startUrl, 2888 String themeColor 2889 ) 2890 { 2891 super(singleton, Domains.Page, "WebAppManifest", 23); 2892 2893 this.backgroundColor = backgroundColor; 2894 this.description = description; 2895 this.dir = dir; 2896 this.display = display; 2897 this.displayOverrides = displayOverrides; 2898 this.fileHandlers = fileHandlers; 2899 this.icons = icons; 2900 this.id = id; 2901 this.lang = lang; 2902 this.launchHandler = launchHandler; 2903 this.name = name; 2904 this.orientation = orientation; 2905 this.preferRelatedApplications = preferRelatedApplications; 2906 this.protocolHandlers = protocolHandlers; 2907 this.relatedApplications = relatedApplications; 2908 this.scope = scope; 2909 this.scopeExtensions = scopeExtensions; 2910 this.screenshots = screenshots; 2911 this.shareTarget = shareTarget; 2912 this.shortName = shortName; 2913 this.shortcuts = shortcuts; 2914 this.startUrl = startUrl; 2915 this.themeColor = themeColor; 2916 2917 this.isPresent = (isPresent == null) 2918 ? singleton.generateIsPresentList(this) 2919 : THROWS.check(isPresent, 23, "Page.WebAppManifest"); 2920 } 2921 2922 /** Creates an instance of this class from a {@link JsonObject}.*/ 2923 public static WebAppManifest fromJSON(JsonObject jo) 2924 { return singleton.fromJSON(jo); } 2925 2926 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2927 public static NestedDescriptor<WebAppManifest> descriptor() 2928 { return singleton.descriptor(); } 2929 } 2930 2931 2932 // ******************************************************************************************** 2933 // ******************************************************************************************** 2934 // Command-Return Types 2935 // ******************************************************************************************** 2936 // ******************************************************************************************** 2937 2938 2939 /** 2940 * Returns the unique (PWA) app id. 2941 * Only returns values if the feature flag 'WebAppEnableManifestId' is enabled 2942 * 2943 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 2944 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI DATA-CMD=getAppId> 2945 * @see Page#getAppId 2946 */ 2947 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 2948 public static class getAppId$$RET 2949 extends BaseType<getAppId$$RET> 2950 implements java.io.Serializable 2951 { 2952 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 2953 protected static final long serialVersionUID = 1; 2954 2955 private static final NestedHelper<Page.getAppId$$RET> singleton = 2956 Torello.Browser.BrowserAPI.NestedHelpers.CmdReturns. 2957 Page$$getAppId$$RET.singleton; 2958 2959 /** 2960 * App id, either from manifest's id attribute or computed from start_url 2961 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2962 */ 2963 public final String appId; 2964 2965 /** 2966 * Recommendation for manifest's id attribute to match current id computed from start_url 2967 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 2968 */ 2969 public final String recommendedId; 2970 2971 /** Constructor. Please review this class' fields for documentation. */ 2972 public getAppId$$RET(ReadOnlyList<Boolean> isPresent, String appId, String recommendedId) 2973 { 2974 super(singleton, Domains.Page, "getAppId", 2); 2975 2976 this.appId = appId; 2977 this.recommendedId = recommendedId; 2978 2979 this.isPresent = (isPresent == null) 2980 ? singleton.generateIsPresentList(this) 2981 : THROWS.check(isPresent, 2, "Page.getAppId$$RET"); 2982 } 2983 2984 /** Creates an instance of this class from a {@link JsonObject}.*/ 2985 public static getAppId$$RET fromJSON(JsonObject jo) 2986 { return singleton.fromJSON(jo); } 2987 2988 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 2989 public static NestedDescriptor<getAppId$$RET> descriptor() 2990 { return singleton.descriptor(); } 2991 } 2992 2993 /** 2994 * Gets the processed manifest for this current document. 2995 * This API always waits for the manifest to be loaded. 2996 * If manifestId is provided, and it does not match the manifest of the 2997 * current document, this API errors out. 2998 * If there is not a loaded page, this API errors out immediately. 2999 * 3000 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI DATA-CMD=getAppManifest> 3001 * @see Page#getAppManifest 3002 */ 3003 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 3004 public static class getAppManifest$$RET 3005 extends BaseType<getAppManifest$$RET> 3006 implements java.io.Serializable 3007 { 3008 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3009 protected static final long serialVersionUID = 1; 3010 3011 private static final NestedHelper<Page.getAppManifest$$RET> singleton = 3012 Torello.Browser.BrowserAPI.NestedHelpers.CmdReturns. 3013 Page$$getAppManifest$$RET.singleton; 3014 3015 /** Manifest location. */ 3016 public final String url; 3017 3018 /** <CODE>[No Description Provided by Google]</CODE> */ 3019 public final Page.AppManifestError[] errors; 3020 3021 /** 3022 * Manifest content. 3023 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 3024 */ 3025 public final String data; 3026 3027 /** 3028 * Parsed manifest properties. Deprecated, use manifest instead. 3029 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 3030 */ 3031 public final Page.AppManifestParsedProperties parsed; 3032 3033 /** 3034 * <CODE>[No Description Provided by Google]</CODE> 3035 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3036 */ 3037 public final Page.WebAppManifest manifest; 3038 3039 /** Constructor. Please review this class' fields for documentation. */ 3040 public getAppManifest$$RET( 3041 ReadOnlyList<Boolean> isPresent, String url, AppManifestError[] errors, 3042 String data, AppManifestParsedProperties parsed, WebAppManifest manifest 3043 ) 3044 { 3045 super(singleton, Domains.Page, "getAppManifest", 5); 3046 3047 this.url = url; 3048 this.errors = errors; 3049 this.data = data; 3050 this.parsed = parsed; 3051 this.manifest = manifest; 3052 3053 this.isPresent = (isPresent == null) 3054 ? singleton.generateIsPresentList(this) 3055 : THROWS.check(isPresent, 5, "Page.getAppManifest$$RET"); 3056 } 3057 3058 /** Creates an instance of this class from a {@link JsonObject}.*/ 3059 public static getAppManifest$$RET fromJSON(JsonObject jo) 3060 { return singleton.fromJSON(jo); } 3061 3062 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3063 public static NestedDescriptor<getAppManifest$$RET> descriptor() 3064 { return singleton.descriptor(); } 3065 } 3066 3067 /** 3068 * Returns metrics relating to the layouting of the page, such as viewport bounds/scale. 3069 * 3070 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI DATA-CMD=getLayoutMetrics> 3071 * @see Page#getLayoutMetrics 3072 */ 3073 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 3074 public static class getLayoutMetrics$$RET 3075 extends BaseType<getLayoutMetrics$$RET> 3076 implements java.io.Serializable 3077 { 3078 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3079 protected static final long serialVersionUID = 1; 3080 3081 private static final NestedHelper<Page.getLayoutMetrics$$RET> singleton = 3082 Torello.Browser.BrowserAPI.NestedHelpers.CmdReturns. 3083 Page$$getLayoutMetrics$$RET.singleton; 3084 3085 /** 3086 * Deprecated metrics relating to the layout viewport. Is in device pixels. Use <CODE>cssLayoutViewport</CODE> instead. 3087 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 3088 */ 3089 public final Page.LayoutViewport layoutViewport; 3090 3091 /** 3092 * Deprecated metrics relating to the visual viewport. Is in device pixels. Use <CODE>cssVisualViewport</CODE> instead. 3093 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 3094 */ 3095 public final Page.VisualViewport visualViewport; 3096 3097 /** 3098 * Deprecated size of scrollable area. Is in DP. Use <CODE>cssContentSize</CODE> instead. 3099 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 3100 */ 3101 public final DOM.Rect contentSize; 3102 3103 /** Metrics relating to the layout viewport in CSS pixels. */ 3104 public final Page.LayoutViewport cssLayoutViewport; 3105 3106 /** Metrics relating to the visual viewport in CSS pixels. */ 3107 public final Page.VisualViewport cssVisualViewport; 3108 3109 /** Size of scrollable area in CSS pixels. */ 3110 public final DOM.Rect cssContentSize; 3111 3112 /** Constructor. Please review this class' fields for documentation. */ 3113 public getLayoutMetrics$$RET( 3114 ReadOnlyList<Boolean> isPresent, LayoutViewport layoutViewport, 3115 VisualViewport visualViewport, DOM.Rect contentSize, 3116 LayoutViewport cssLayoutViewport, VisualViewport cssVisualViewport, 3117 DOM.Rect cssContentSize 3118 ) 3119 { 3120 super(singleton, Domains.Page, "getLayoutMetrics", 6); 3121 3122 this.layoutViewport = layoutViewport; 3123 this.visualViewport = visualViewport; 3124 this.contentSize = contentSize; 3125 this.cssLayoutViewport = cssLayoutViewport; 3126 this.cssVisualViewport = cssVisualViewport; 3127 this.cssContentSize = cssContentSize; 3128 3129 this.isPresent = (isPresent == null) 3130 ? singleton.generateIsPresentList(this) 3131 : THROWS.check(isPresent, 6, "Page.getLayoutMetrics$$RET"); 3132 } 3133 3134 /** Creates an instance of this class from a {@link JsonObject}.*/ 3135 public static getLayoutMetrics$$RET fromJSON(JsonObject jo) 3136 { return singleton.fromJSON(jo); } 3137 3138 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3139 public static NestedDescriptor<getLayoutMetrics$$RET> descriptor() 3140 { return singleton.descriptor(); } 3141 } 3142 3143 /** 3144 * Returns navigation history for the current page. 3145 * 3146 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI DATA-CMD=getNavigationHistory> 3147 * @see Page#getNavigationHistory 3148 */ 3149 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 3150 public static class getNavigationHistory$$RET 3151 extends BaseType<getNavigationHistory$$RET> 3152 implements java.io.Serializable 3153 { 3154 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3155 protected static final long serialVersionUID = 1; 3156 3157 private static final NestedHelper<Page.getNavigationHistory$$RET> singleton = 3158 Torello.Browser.BrowserAPI.NestedHelpers.CmdReturns. 3159 Page$$getNavigationHistory$$RET.singleton; 3160 3161 /** Index of the current navigation history entry. */ 3162 public final int currentIndex; 3163 3164 /** Array of navigation history entries. */ 3165 public final Page.NavigationEntry[] entries; 3166 3167 /** Constructor. Please review this class' fields for documentation. */ 3168 public getNavigationHistory$$RET 3169 (ReadOnlyList<Boolean> isPresent, int currentIndex, NavigationEntry[] entries) 3170 { 3171 super(singleton, Domains.Page, "getNavigationHistory", 2); 3172 3173 this.currentIndex = currentIndex; 3174 this.entries = entries; 3175 3176 this.isPresent = (isPresent == null) 3177 ? singleton.generateIsPresentList(this) 3178 : THROWS.check(isPresent, 2, "Page.getNavigationHistory$$RET"); 3179 } 3180 3181 /** Creates an instance of this class from a {@link JsonObject}.*/ 3182 public static getNavigationHistory$$RET fromJSON(JsonObject jo) 3183 { return singleton.fromJSON(jo); } 3184 3185 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3186 public static NestedDescriptor<getNavigationHistory$$RET> descriptor() 3187 { return singleton.descriptor(); } 3188 } 3189 3190 /** 3191 * Returns content of the given resource. 3192 * 3193 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3194 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI DATA-CMD=getResourceContent> 3195 * @see Page#getResourceContent 3196 */ 3197 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 3198 public static class getResourceContent$$RET 3199 extends BaseType<getResourceContent$$RET> 3200 implements java.io.Serializable 3201 { 3202 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3203 protected static final long serialVersionUID = 1; 3204 3205 private static final NestedHelper<Page.getResourceContent$$RET> singleton = 3206 Torello.Browser.BrowserAPI.NestedHelpers.CmdReturns. 3207 Page$$getResourceContent$$RET.singleton; 3208 3209 /** Resource content. */ 3210 public final String content; 3211 3212 /** True, if content was served as base64. */ 3213 public final boolean base64Encoded; 3214 3215 /** Constructor. Please review this class' fields for documentation. */ 3216 public getResourceContent$$RET 3217 (ReadOnlyList<Boolean> isPresent, String content, boolean base64Encoded) 3218 { 3219 super(singleton, Domains.Page, "getResourceContent", 2); 3220 3221 this.content = content; 3222 this.base64Encoded = base64Encoded; 3223 3224 this.isPresent = (isPresent == null) 3225 ? singleton.generateIsPresentList(this) 3226 : THROWS.check(isPresent, 2, "Page.getResourceContent$$RET"); 3227 } 3228 3229 /** Creates an instance of this class from a {@link JsonObject}.*/ 3230 public static getResourceContent$$RET fromJSON(JsonObject jo) 3231 { return singleton.fromJSON(jo); } 3232 3233 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3234 public static NestedDescriptor<getResourceContent$$RET> descriptor() 3235 { return singleton.descriptor(); } 3236 } 3237 3238 /** 3239 * Navigates current page to the given URL. 3240 * 3241 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI DATA-CMD=navigate> 3242 * @see Page#navigate 3243 */ 3244 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 3245 public static class navigate$$RET 3246 extends BaseType<navigate$$RET> 3247 implements java.io.Serializable 3248 { 3249 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3250 protected static final long serialVersionUID = 1; 3251 3252 private static final NestedHelper<Page.navigate$$RET> singleton = 3253 Torello.Browser.BrowserAPI.NestedHelpers.CmdReturns. 3254 Page$$navigate$$RET.singleton; 3255 3256 /** Frame id that has navigated (or failed to navigate) */ 3257 public final String frameId; 3258 3259 /** 3260 * Loader identifier. This is omitted in case of same-document navigation, 3261 * as the previously committed loaderId would not change. 3262 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 3263 */ 3264 public final String loaderId; 3265 3266 /** 3267 * User friendly error message, present if and only if navigation has failed. 3268 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 3269 */ 3270 public final String errorText; 3271 3272 /** 3273 * Whether the navigation resulted in a download. 3274 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 3275 */ 3276 public final Boolean isDownload; 3277 3278 /** Constructor. Please review this class' fields for documentation. */ 3279 public navigate$$RET( 3280 ReadOnlyList<Boolean> isPresent, String frameId, String loaderId, String errorText, 3281 Boolean isDownload 3282 ) 3283 { 3284 super(singleton, Domains.Page, "navigate", 4); 3285 3286 this.frameId = frameId; 3287 this.loaderId = loaderId; 3288 this.errorText = errorText; 3289 this.isDownload = isDownload; 3290 3291 this.isPresent = (isPresent == null) 3292 ? singleton.generateIsPresentList(this) 3293 : THROWS.check(isPresent, 4, "Page.navigate$$RET"); 3294 } 3295 3296 /** Creates an instance of this class from a {@link JsonObject}.*/ 3297 public static navigate$$RET fromJSON(JsonObject jo) 3298 { return singleton.fromJSON(jo); } 3299 3300 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3301 public static NestedDescriptor<navigate$$RET> descriptor() 3302 { return singleton.descriptor(); } 3303 } 3304 3305 /** 3306 * Print page as PDF. 3307 * 3308 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI DATA-CMD=printToPDF> 3309 * @see Page#printToPDF 3310 */ 3311 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI") 3312 public static class printToPDF$$RET 3313 extends BaseType<printToPDF$$RET> 3314 implements java.io.Serializable 3315 { 3316 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3317 protected static final long serialVersionUID = 1; 3318 3319 private static final NestedHelper<Page.printToPDF$$RET> singleton = 3320 Torello.Browser.BrowserAPI.NestedHelpers.CmdReturns. 3321 Page$$printToPDF$$RET.singleton; 3322 3323 /** Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON) */ 3324 public final String data; 3325 3326 /** 3327 * A handle of the stream that holds resulting PDF data. 3328 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 3329 */ 3330 public final String stream; 3331 3332 /** Constructor. Please review this class' fields for documentation. */ 3333 public printToPDF$$RET(ReadOnlyList<Boolean> isPresent, String data, String stream) 3334 { 3335 super(singleton, Domains.Page, "printToPDF", 2); 3336 3337 this.data = data; 3338 this.stream = stream; 3339 3340 this.isPresent = (isPresent == null) 3341 ? singleton.generateIsPresentList(this) 3342 : THROWS.check(isPresent, 2, "Page.printToPDF$$RET"); 3343 } 3344 3345 /** Creates an instance of this class from a {@link JsonObject}.*/ 3346 public static printToPDF$$RET fromJSON(JsonObject jo) 3347 { return singleton.fromJSON(jo); } 3348 3349 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3350 public static NestedDescriptor<printToPDF$$RET> descriptor() 3351 { return singleton.descriptor(); } 3352 } 3353 3354 3355 // ******************************************************************************************** 3356 // ******************************************************************************************** 3357 // Event Types 3358 // ******************************************************************************************** 3359 // ******************************************************************************************** 3360 3361 3362 /** 3363 * Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do 3364 * not assume any ordering with the Page.frameNavigated event. This event is fired only for 3365 * main-frame history navigation where the document changes (non-same-document navigations), 3366 * when bfcache navigation fails. 3367 * 3368 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3369 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3370 */ 3371 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3372 public static class backForwardCacheNotUsed 3373 extends BrowserEvent<backForwardCacheNotUsed> 3374 implements java.io.Serializable 3375 { 3376 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3377 protected static final long serialVersionUID = 1; 3378 3379 private static final NestedHelper<Page.backForwardCacheNotUsed> singleton = 3380 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3381 Page$$backForwardCacheNotUsed$$.singleton; 3382 3383 /** The loader id for the associated navigation. */ 3384 public final String loaderId; 3385 3386 /** The frame id of the associated frame. */ 3387 public final String frameId; 3388 3389 /** Array of reasons why the page could not be cached. This must not be empty. */ 3390 public final Page.BackForwardCacheNotRestoredExplanation[] notRestoredExplanations; 3391 3392 /** 3393 * Tree structure of reasons why the page could not be cached for each frame. 3394 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 3395 */ 3396 public final Page.BackForwardCacheNotRestoredExplanationTree notRestoredExplanationsTree; 3397 3398 /** Constructor. Please review this class' fields for documentation. */ 3399 public backForwardCacheNotUsed( 3400 ReadOnlyList<Boolean> isPresent, String loaderId, String frameId, 3401 BackForwardCacheNotRestoredExplanation[] notRestoredExplanations, 3402 BackForwardCacheNotRestoredExplanationTree notRestoredExplanationsTree 3403 ) 3404 { 3405 super(singleton, Domains.Page, "backForwardCacheNotUsed", 4); 3406 3407 this.loaderId = loaderId; 3408 this.frameId = frameId; 3409 this.notRestoredExplanations = notRestoredExplanations; 3410 this.notRestoredExplanationsTree = notRestoredExplanationsTree; 3411 3412 this.isPresent = (isPresent == null) 3413 ? singleton.generateIsPresentList(this) 3414 : THROWS.check(isPresent, 4, "Page.backForwardCacheNotUsed"); 3415 } 3416 3417 /** Creates an instance of this class from a {@link JsonObject}.*/ 3418 public static backForwardCacheNotUsed fromJSON(JsonObject jo) 3419 { return singleton.fromJSON(jo); } 3420 3421 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3422 public static NestedDescriptor<backForwardCacheNotUsed> descriptor() 3423 { return singleton.descriptor(); } 3424 } 3425 3426 /** 3427 * Issued for every compilation cache generated. 3428 * 3429 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3430 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3431 */ 3432 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3433 public static class compilationCacheProduced 3434 extends BrowserEvent<compilationCacheProduced> 3435 implements java.io.Serializable 3436 { 3437 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3438 protected static final long serialVersionUID = 1; 3439 3440 private static final NestedHelper<Page.compilationCacheProduced> singleton = 3441 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3442 Page$$compilationCacheProduced$$.singleton; 3443 3444 /** <CODE>[No Description Provided by Google]</CODE> */ 3445 public final String url; 3446 3447 /** Base64-encoded data (Encoded as a base64 string when passed over JSON) */ 3448 public final String data; 3449 3450 /** Constructor. Please review this class' fields for documentation. */ 3451 public compilationCacheProduced(ReadOnlyList<Boolean> isPresent, String url, String data) 3452 { 3453 super(singleton, Domains.Page, "compilationCacheProduced", 2); 3454 3455 this.url = url; 3456 this.data = data; 3457 3458 this.isPresent = (isPresent == null) 3459 ? singleton.generateIsPresentList(this) 3460 : THROWS.check(isPresent, 2, "Page.compilationCacheProduced"); 3461 } 3462 3463 /** Creates an instance of this class from a {@link JsonObject}.*/ 3464 public static compilationCacheProduced fromJSON(JsonObject jo) 3465 { return singleton.fromJSON(jo); } 3466 3467 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3468 public static NestedDescriptor<compilationCacheProduced> descriptor() 3469 { return singleton.descriptor(); } 3470 } 3471 3472 /** 3473 * Fired when opening document to write to. 3474 * 3475 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3476 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3477 */ 3478 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3479 public static class documentOpened 3480 extends BrowserEvent<documentOpened> 3481 implements java.io.Serializable 3482 { 3483 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3484 protected static final long serialVersionUID = 1; 3485 3486 private static final NestedHelper<Page.documentOpened> singleton = 3487 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3488 Page$$documentOpened$$.singleton; 3489 3490 /** Frame object. */ 3491 public final Page.Frame frame; 3492 3493 /** Constructor. Please review this class' fields for documentation. */ 3494 public documentOpened(ReadOnlyList<Boolean> isPresent, Frame frame) 3495 { 3496 super(singleton, Domains.Page, "documentOpened", 1); 3497 3498 this.frame = frame; 3499 3500 this.isPresent = (isPresent == null) 3501 ? singleton.generateIsPresentList(this) 3502 : THROWS.check(isPresent, 1, "Page.documentOpened"); 3503 } 3504 3505 /** Creates an instance of this class from a {@link JsonObject}.*/ 3506 public static documentOpened fromJSON(JsonObject jo) 3507 { return singleton.fromJSON(jo); } 3508 3509 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3510 public static NestedDescriptor<documentOpened> descriptor() 3511 { return singleton.descriptor(); } 3512 } 3513 3514 /** 3515 * <CODE>[No Description Provided by Google]</CODE> 3516 * 3517 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3518 */ 3519 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3520 public static class domContentEventFired 3521 extends BrowserEvent<domContentEventFired> 3522 implements java.io.Serializable 3523 { 3524 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3525 protected static final long serialVersionUID = 1; 3526 3527 private static final NestedHelper<Page.domContentEventFired> singleton = 3528 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3529 Page$$domContentEventFired$$.singleton; 3530 3531 /** <CODE>[No Description Provided by Google]</CODE> */ 3532 public final Number timestamp; 3533 3534 /** Constructor. Please review this class' fields for documentation. */ 3535 public domContentEventFired(ReadOnlyList<Boolean> isPresent, Number timestamp) 3536 { 3537 super(singleton, Domains.Page, "domContentEventFired", 1); 3538 3539 this.timestamp = timestamp; 3540 3541 this.isPresent = (isPresent == null) 3542 ? singleton.generateIsPresentList(this) 3543 : THROWS.check(isPresent, 1, "Page.domContentEventFired"); 3544 } 3545 3546 /** Creates an instance of this class from a {@link JsonObject}.*/ 3547 public static domContentEventFired fromJSON(JsonObject jo) 3548 { return singleton.fromJSON(jo); } 3549 3550 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3551 public static NestedDescriptor<domContentEventFired> descriptor() 3552 { return singleton.descriptor(); } 3553 } 3554 3555 /** 3556 * Fired when download makes progress. Last call has |done| == true. 3557 * Deprecated. Use Browser.downloadProgress instead. 3558 * 3559 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 3560 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3561 */ 3562 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3563 public static class downloadProgress 3564 extends BrowserEvent<downloadProgress> 3565 implements java.io.Serializable 3566 { 3567 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3568 protected static final long serialVersionUID = 1; 3569 3570 private static final NestedHelper<Page.downloadProgress> singleton = 3571 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3572 Page$$downloadProgress$$.singleton; 3573 3574 /** Global unique identifier of the download. */ 3575 public final String guid; 3576 3577 /** Total expected bytes to download. */ 3578 public final Number totalBytes; 3579 3580 /** Total bytes received. */ 3581 public final Number receivedBytes; 3582 3583 /** 3584 * Download status. 3585 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=downloadProgress DATA-F=state DATA-FILE-ID=CDP.EL1> 3586 * @see BaseType#enumStrList(String) 3587 */ 3588 public final String state; 3589 3590 /** Constructor. Please review this class' fields for documentation. */ 3591 public downloadProgress( 3592 ReadOnlyList<Boolean> isPresent, String guid, Number totalBytes, 3593 Number receivedBytes, String state 3594 ) 3595 { 3596 super(singleton, Domains.Page, "downloadProgress", 4); 3597 3598 this.guid = guid; 3599 this.totalBytes = totalBytes; 3600 this.receivedBytes = receivedBytes; 3601 this.state = state; 3602 3603 this.isPresent = (isPresent == null) 3604 ? singleton.generateIsPresentList(this) 3605 : THROWS.check(isPresent, 4, "Page.downloadProgress"); 3606 } 3607 3608 /** Creates an instance of this class from a {@link JsonObject}.*/ 3609 public static downloadProgress fromJSON(JsonObject jo) 3610 { return singleton.fromJSON(jo); } 3611 3612 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3613 public static NestedDescriptor<downloadProgress> descriptor() 3614 { return singleton.descriptor(); } 3615 } 3616 3617 /** 3618 * Fired when page is about to start a download. 3619 * Deprecated. Use Browser.downloadWillBegin instead. 3620 * 3621 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 3622 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3623 */ 3624 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3625 public static class downloadWillBegin 3626 extends BrowserEvent<downloadWillBegin> 3627 implements java.io.Serializable 3628 { 3629 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3630 protected static final long serialVersionUID = 1; 3631 3632 private static final NestedHelper<Page.downloadWillBegin> singleton = 3633 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3634 Page$$downloadWillBegin$$.singleton; 3635 3636 /** Id of the frame that caused download to begin. */ 3637 public final String frameId; 3638 3639 /** Global unique identifier of the download. */ 3640 public final String guid; 3641 3642 /** URL of the resource being downloaded. */ 3643 public final String url; 3644 3645 /** Suggested file name of the resource (the actual name of the file saved on disk may differ). */ 3646 public final String suggestedFilename; 3647 3648 /** Constructor. Please review this class' fields for documentation. */ 3649 public downloadWillBegin( 3650 ReadOnlyList<Boolean> isPresent, String frameId, String guid, String url, 3651 String suggestedFilename 3652 ) 3653 { 3654 super(singleton, Domains.Page, "downloadWillBegin", 4); 3655 3656 this.frameId = frameId; 3657 this.guid = guid; 3658 this.url = url; 3659 this.suggestedFilename = suggestedFilename; 3660 3661 this.isPresent = (isPresent == null) 3662 ? singleton.generateIsPresentList(this) 3663 : THROWS.check(isPresent, 4, "Page.downloadWillBegin"); 3664 } 3665 3666 /** Creates an instance of this class from a {@link JsonObject}.*/ 3667 public static downloadWillBegin fromJSON(JsonObject jo) 3668 { return singleton.fromJSON(jo); } 3669 3670 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3671 public static NestedDescriptor<downloadWillBegin> descriptor() 3672 { return singleton.descriptor(); } 3673 } 3674 3675 /** 3676 * Emitted only when <CODE>page.interceptFileChooser</CODE> is enabled. 3677 * 3678 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3679 */ 3680 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3681 public static class fileChooserOpened 3682 extends BrowserEvent<fileChooserOpened> 3683 implements java.io.Serializable 3684 { 3685 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3686 protected static final long serialVersionUID = 1; 3687 3688 private static final NestedHelper<Page.fileChooserOpened> singleton = 3689 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3690 Page$$fileChooserOpened$$.singleton; 3691 3692 /** 3693 * Id of the frame containing input node. 3694 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3695 */ 3696 public final String frameId; 3697 3698 /** 3699 * Input mode. 3700 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=fileChooserOpened DATA-F=mode DATA-FILE-ID=CDP.EL1> 3701 * @see BaseType#enumStrList(String) 3702 */ 3703 public final String mode; 3704 3705 /** 3706 * Input node id. Only present for file choosers opened via an <CODE><input type="file"></CODE> element. 3707 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 3708 */ 3709 public final Integer backendNodeId; 3710 3711 /** Constructor. Please review this class' fields for documentation. */ 3712 public fileChooserOpened 3713 (ReadOnlyList<Boolean> isPresent, String frameId, String mode, Integer backendNodeId) 3714 { 3715 super(singleton, Domains.Page, "fileChooserOpened", 3); 3716 3717 this.frameId = frameId; 3718 this.mode = mode; 3719 this.backendNodeId = backendNodeId; 3720 3721 this.isPresent = (isPresent == null) 3722 ? singleton.generateIsPresentList(this) 3723 : THROWS.check(isPresent, 3, "Page.fileChooserOpened"); 3724 } 3725 3726 /** Creates an instance of this class from a {@link JsonObject}.*/ 3727 public static fileChooserOpened fromJSON(JsonObject jo) 3728 { return singleton.fromJSON(jo); } 3729 3730 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3731 public static NestedDescriptor<fileChooserOpened> descriptor() 3732 { return singleton.descriptor(); } 3733 } 3734 3735 /** 3736 * Fired when frame has been attached to its parent. 3737 * 3738 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3739 */ 3740 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3741 public static class frameAttached 3742 extends BrowserEvent<frameAttached> 3743 implements java.io.Serializable 3744 { 3745 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3746 protected static final long serialVersionUID = 1; 3747 3748 private static final NestedHelper<Page.frameAttached> singleton = 3749 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3750 Page$$frameAttached$$.singleton; 3751 3752 /** Id of the frame that has been attached. */ 3753 public final String frameId; 3754 3755 /** Parent frame identifier. */ 3756 public final String parentFrameId; 3757 3758 /** 3759 * JavaScript stack trace of when frame was attached, only set if frame initiated from script. 3760 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 3761 */ 3762 public final RunTime.StackTrace stack; 3763 3764 /** Constructor. Please review this class' fields for documentation. */ 3765 public frameAttached( 3766 ReadOnlyList<Boolean> isPresent, String frameId, String parentFrameId, 3767 RunTime.StackTrace stack 3768 ) 3769 { 3770 super(singleton, Domains.Page, "frameAttached", 3); 3771 3772 this.frameId = frameId; 3773 this.parentFrameId = parentFrameId; 3774 this.stack = stack; 3775 3776 this.isPresent = (isPresent == null) 3777 ? singleton.generateIsPresentList(this) 3778 : THROWS.check(isPresent, 3, "Page.frameAttached"); 3779 } 3780 3781 /** Creates an instance of this class from a {@link JsonObject}.*/ 3782 public static frameAttached fromJSON(JsonObject jo) 3783 { return singleton.fromJSON(jo); } 3784 3785 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3786 public static NestedDescriptor<frameAttached> descriptor() 3787 { return singleton.descriptor(); } 3788 } 3789 3790 /** 3791 * Fired when frame no longer has a scheduled navigation. 3792 * 3793 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 3794 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3795 */ 3796 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3797 public static class frameClearedScheduledNavigation 3798 extends BrowserEvent<frameClearedScheduledNavigation> 3799 implements java.io.Serializable 3800 { 3801 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3802 protected static final long serialVersionUID = 1; 3803 3804 private static final NestedHelper<Page.frameClearedScheduledNavigation> singleton = 3805 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3806 Page$$frameClearedScheduledNavigation$$.singleton; 3807 3808 /** Id of the frame that has cleared its scheduled navigation. */ 3809 public final String frameId; 3810 3811 /** Constructor. Please review this class' fields for documentation. */ 3812 public frameClearedScheduledNavigation(ReadOnlyList<Boolean> isPresent, String frameId) 3813 { 3814 super(singleton, Domains.Page, "frameClearedScheduledNavigation", 1); 3815 3816 this.frameId = frameId; 3817 3818 this.isPresent = (isPresent == null) 3819 ? singleton.generateIsPresentList(this) 3820 : THROWS.check(isPresent, 1, "Page.frameClearedScheduledNavigation"); 3821 } 3822 3823 /** Creates an instance of this class from a {@link JsonObject}.*/ 3824 public static frameClearedScheduledNavigation fromJSON(JsonObject jo) 3825 { return singleton.fromJSON(jo); } 3826 3827 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3828 public static NestedDescriptor<frameClearedScheduledNavigation> descriptor() 3829 { return singleton.descriptor(); } 3830 } 3831 3832 /** 3833 * Fired when frame has been detached from its parent. 3834 * 3835 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3836 */ 3837 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3838 public static class frameDetached 3839 extends BrowserEvent<frameDetached> 3840 implements java.io.Serializable 3841 { 3842 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3843 protected static final long serialVersionUID = 1; 3844 3845 private static final NestedHelper<Page.frameDetached> singleton = 3846 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3847 Page$$frameDetached$$.singleton; 3848 3849 /** Id of the frame that has been detached. */ 3850 public final String frameId; 3851 3852 /** 3853 * <CODE>[No Description Provided by Google]</CODE> 3854 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3855 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=frameDetached DATA-F=reason DATA-FILE-ID=CDP.EL1> 3856 * @see BaseType#enumStrList(String) 3857 */ 3858 public final String reason; 3859 3860 /** Constructor. Please review this class' fields for documentation. */ 3861 public frameDetached(ReadOnlyList<Boolean> isPresent, String frameId, String reason) 3862 { 3863 super(singleton, Domains.Page, "frameDetached", 2); 3864 3865 this.frameId = frameId; 3866 this.reason = reason; 3867 3868 this.isPresent = (isPresent == null) 3869 ? singleton.generateIsPresentList(this) 3870 : THROWS.check(isPresent, 2, "Page.frameDetached"); 3871 } 3872 3873 /** Creates an instance of this class from a {@link JsonObject}.*/ 3874 public static frameDetached fromJSON(JsonObject jo) 3875 { return singleton.fromJSON(jo); } 3876 3877 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3878 public static NestedDescriptor<frameDetached> descriptor() 3879 { return singleton.descriptor(); } 3880 } 3881 3882 /** 3883 * Fired once navigation of the frame has completed. Frame is now associated with the new loader. 3884 * 3885 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3886 */ 3887 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3888 public static class frameNavigated 3889 extends BrowserEvent<frameNavigated> 3890 implements java.io.Serializable 3891 { 3892 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3893 protected static final long serialVersionUID = 1; 3894 3895 private static final NestedHelper<Page.frameNavigated> singleton = 3896 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3897 Page$$frameNavigated$$.singleton; 3898 3899 /** Frame object. */ 3900 public final Page.Frame frame; 3901 3902 /** 3903 * <CODE>[No Description Provided by Google]</CODE> 3904 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3905 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=NavigationType DATA-F=type DATA-FILE-ID=CDP.EL2> 3906 * @see BaseType#enumStrList(String) 3907 */ 3908 public final String type; 3909 3910 /** Constructor. Please review this class' fields for documentation. */ 3911 public frameNavigated(ReadOnlyList<Boolean> isPresent, Frame frame, String type) 3912 { 3913 super(singleton, Domains.Page, "frameNavigated", 2); 3914 3915 this.frame = frame; 3916 this.type = type; 3917 3918 this.isPresent = (isPresent == null) 3919 ? singleton.generateIsPresentList(this) 3920 : THROWS.check(isPresent, 2, "Page.frameNavigated"); 3921 } 3922 3923 /** Creates an instance of this class from a {@link JsonObject}.*/ 3924 public static frameNavigated fromJSON(JsonObject jo) 3925 { return singleton.fromJSON(jo); } 3926 3927 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3928 public static NestedDescriptor<frameNavigated> descriptor() 3929 { return singleton.descriptor(); } 3930 } 3931 3932 /** 3933 * Fired when a renderer-initiated navigation is requested. 3934 * Navigation may still be cancelled after the event is issued. 3935 * 3936 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 3937 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 3938 */ 3939 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 3940 public static class frameRequestedNavigation 3941 extends BrowserEvent<frameRequestedNavigation> 3942 implements java.io.Serializable 3943 { 3944 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 3945 protected static final long serialVersionUID = 1; 3946 3947 private static final NestedHelper<Page.frameRequestedNavigation> singleton = 3948 Torello.Browser.BrowserAPI.NestedHelpers.Events. 3949 Page$$frameRequestedNavigation$$.singleton; 3950 3951 /** Id of the frame that is being navigated. */ 3952 public final String frameId; 3953 3954 /** 3955 * The reason for the navigation. 3956 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=ClientNavigationReason DATA-F=reason DATA-FILE-ID=CDP.EL2> 3957 * @see BaseType#enumStrList(String) 3958 */ 3959 public final String reason; 3960 3961 /** The destination URL for the requested navigation. */ 3962 public final String url; 3963 3964 /** 3965 * The disposition for the navigation. 3966 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=ClientNavigationDisposition DATA-F=disposition DATA-FILE-ID=CDP.EL2> 3967 * @see BaseType#enumStrList(String) 3968 */ 3969 public final String disposition; 3970 3971 /** Constructor. Please review this class' fields for documentation. */ 3972 public frameRequestedNavigation( 3973 ReadOnlyList<Boolean> isPresent, String frameId, String reason, String url, 3974 String disposition 3975 ) 3976 { 3977 super(singleton, Domains.Page, "frameRequestedNavigation", 4); 3978 3979 this.frameId = frameId; 3980 this.reason = reason; 3981 this.url = url; 3982 this.disposition = disposition; 3983 3984 this.isPresent = (isPresent == null) 3985 ? singleton.generateIsPresentList(this) 3986 : THROWS.check(isPresent, 4, "Page.frameRequestedNavigation"); 3987 } 3988 3989 /** Creates an instance of this class from a {@link JsonObject}.*/ 3990 public static frameRequestedNavigation fromJSON(JsonObject jo) 3991 { return singleton.fromJSON(jo); } 3992 3993 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 3994 public static NestedDescriptor<frameRequestedNavigation> descriptor() 3995 { return singleton.descriptor(); } 3996 } 3997 3998 /** 3999 * Fired when frame schedules a potential navigation. 4000 * 4001 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 4002 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4003 */ 4004 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4005 public static class frameScheduledNavigation 4006 extends BrowserEvent<frameScheduledNavigation> 4007 implements java.io.Serializable 4008 { 4009 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4010 protected static final long serialVersionUID = 1; 4011 4012 private static final NestedHelper<Page.frameScheduledNavigation> singleton = 4013 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4014 Page$$frameScheduledNavigation$$.singleton; 4015 4016 /** Id of the frame that has scheduled a navigation. */ 4017 public final String frameId; 4018 4019 /** 4020 * Delay (in seconds) until the navigation is scheduled to begin. The navigation is not 4021 * guaranteed to start. 4022 */ 4023 public final Number delay; 4024 4025 /** 4026 * The reason for the navigation. 4027 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=ClientNavigationReason DATA-F=reason DATA-FILE-ID=CDP.EL2> 4028 * @see BaseType#enumStrList(String) 4029 */ 4030 public final String reason; 4031 4032 /** The destination URL for the scheduled navigation. */ 4033 public final String url; 4034 4035 /** Constructor. Please review this class' fields for documentation. */ 4036 public frameScheduledNavigation( 4037 ReadOnlyList<Boolean> isPresent, String frameId, Number delay, String reason, 4038 String url 4039 ) 4040 { 4041 super(singleton, Domains.Page, "frameScheduledNavigation", 4); 4042 4043 this.frameId = frameId; 4044 this.delay = delay; 4045 this.reason = reason; 4046 this.url = url; 4047 4048 this.isPresent = (isPresent == null) 4049 ? singleton.generateIsPresentList(this) 4050 : THROWS.check(isPresent, 4, "Page.frameScheduledNavigation"); 4051 } 4052 4053 /** Creates an instance of this class from a {@link JsonObject}.*/ 4054 public static frameScheduledNavigation fromJSON(JsonObject jo) 4055 { return singleton.fromJSON(jo); } 4056 4057 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4058 public static NestedDescriptor<frameScheduledNavigation> descriptor() 4059 { return singleton.descriptor(); } 4060 } 4061 4062 /** 4063 * Fired when frame has started loading. 4064 * 4065 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4066 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4067 */ 4068 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4069 public static class frameStartedLoading 4070 extends BrowserEvent<frameStartedLoading> 4071 implements java.io.Serializable 4072 { 4073 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4074 protected static final long serialVersionUID = 1; 4075 4076 private static final NestedHelper<Page.frameStartedLoading> singleton = 4077 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4078 Page$$frameStartedLoading$$.singleton; 4079 4080 /** Id of the frame that has started loading. */ 4081 public final String frameId; 4082 4083 /** Constructor. Please review this class' fields for documentation. */ 4084 public frameStartedLoading(ReadOnlyList<Boolean> isPresent, String frameId) 4085 { 4086 super(singleton, Domains.Page, "frameStartedLoading", 1); 4087 4088 this.frameId = frameId; 4089 4090 this.isPresent = (isPresent == null) 4091 ? singleton.generateIsPresentList(this) 4092 : THROWS.check(isPresent, 1, "Page.frameStartedLoading"); 4093 } 4094 4095 /** Creates an instance of this class from a {@link JsonObject}.*/ 4096 public static frameStartedLoading fromJSON(JsonObject jo) 4097 { return singleton.fromJSON(jo); } 4098 4099 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4100 public static NestedDescriptor<frameStartedLoading> descriptor() 4101 { return singleton.descriptor(); } 4102 } 4103 4104 /** 4105 * Fired when a navigation starts. This event is fired for both 4106 * renderer-initiated and browser-initiated navigations. For renderer-initiated 4107 * navigations, the event is fired after <CODE>frameRequestedNavigation</CODE>. 4108 * Navigation may still be cancelled after the event is issued. Multiple events 4109 * can be fired for a single navigation, for example, when a same-document 4110 * navigation becomes a cross-document navigation (such as in the case of a 4111 * frameset). 4112 * 4113 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4114 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4115 */ 4116 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4117 public static class frameStartedNavigating 4118 extends BrowserEvent<frameStartedNavigating> 4119 implements java.io.Serializable 4120 { 4121 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4122 protected static final long serialVersionUID = 1; 4123 4124 private static final NestedHelper<Page.frameStartedNavigating> singleton = 4125 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4126 Page$$frameStartedNavigating$$.singleton; 4127 4128 /** ID of the frame that is being navigated. */ 4129 public final String frameId; 4130 4131 /** The URL the navigation started with. The final URL can be different. */ 4132 public final String url; 4133 4134 /** 4135 * Loader identifier. Even though it is present in case of same-document 4136 * navigation, the previously committed loaderId would not change unless 4137 * the navigation changes from a same-document to a cross-document 4138 * navigation. 4139 */ 4140 public final String loaderId; 4141 4142 /** 4143 * <CODE>[No Description Provided by Google]</CODE> 4144 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=frameStartedNavigating DATA-F=navigationType DATA-FILE-ID=CDP.EL1> 4145 * @see BaseType#enumStrList(String) 4146 */ 4147 public final String navigationType; 4148 4149 /** Constructor. Please review this class' fields for documentation. */ 4150 public frameStartedNavigating( 4151 ReadOnlyList<Boolean> isPresent, String frameId, String url, String loaderId, 4152 String navigationType 4153 ) 4154 { 4155 super(singleton, Domains.Page, "frameStartedNavigating", 4); 4156 4157 this.frameId = frameId; 4158 this.url = url; 4159 this.loaderId = loaderId; 4160 this.navigationType = navigationType; 4161 4162 this.isPresent = (isPresent == null) 4163 ? singleton.generateIsPresentList(this) 4164 : THROWS.check(isPresent, 4, "Page.frameStartedNavigating"); 4165 } 4166 4167 /** Creates an instance of this class from a {@link JsonObject}.*/ 4168 public static frameStartedNavigating fromJSON(JsonObject jo) 4169 { return singleton.fromJSON(jo); } 4170 4171 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4172 public static NestedDescriptor<frameStartedNavigating> descriptor() 4173 { return singleton.descriptor(); } 4174 } 4175 4176 /** 4177 * Fired when frame has stopped loading. 4178 * 4179 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4180 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4181 */ 4182 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4183 public static class frameStoppedLoading 4184 extends BrowserEvent<frameStoppedLoading> 4185 implements java.io.Serializable 4186 { 4187 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4188 protected static final long serialVersionUID = 1; 4189 4190 private static final NestedHelper<Page.frameStoppedLoading> singleton = 4191 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4192 Page$$frameStoppedLoading$$.singleton; 4193 4194 /** Id of the frame that has stopped loading. */ 4195 public final String frameId; 4196 4197 /** Constructor. Please review this class' fields for documentation. */ 4198 public frameStoppedLoading(ReadOnlyList<Boolean> isPresent, String frameId) 4199 { 4200 super(singleton, Domains.Page, "frameStoppedLoading", 1); 4201 4202 this.frameId = frameId; 4203 4204 this.isPresent = (isPresent == null) 4205 ? singleton.generateIsPresentList(this) 4206 : THROWS.check(isPresent, 1, "Page.frameStoppedLoading"); 4207 } 4208 4209 /** Creates an instance of this class from a {@link JsonObject}.*/ 4210 public static frameStoppedLoading fromJSON(JsonObject jo) 4211 { return singleton.fromJSON(jo); } 4212 4213 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4214 public static NestedDescriptor<frameStoppedLoading> descriptor() 4215 { return singleton.descriptor(); } 4216 } 4217 4218 /** 4219 * Fired before frame subtree is detached. Emitted before any frame of the 4220 * subtree is actually detached. 4221 * 4222 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4223 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4224 */ 4225 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4226 public static class frameSubtreeWillBeDetached 4227 extends BrowserEvent<frameSubtreeWillBeDetached> 4228 implements java.io.Serializable 4229 { 4230 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4231 protected static final long serialVersionUID = 1; 4232 4233 private static final NestedHelper<Page.frameSubtreeWillBeDetached> singleton = 4234 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4235 Page$$frameSubtreeWillBeDetached$$.singleton; 4236 4237 /** Id of the frame that is the root of the subtree that will be detached. */ 4238 public final String frameId; 4239 4240 /** Constructor. Please review this class' fields for documentation. */ 4241 public frameSubtreeWillBeDetached(ReadOnlyList<Boolean> isPresent, String frameId) 4242 { 4243 super(singleton, Domains.Page, "frameSubtreeWillBeDetached", 1); 4244 4245 this.frameId = frameId; 4246 4247 this.isPresent = (isPresent == null) 4248 ? singleton.generateIsPresentList(this) 4249 : THROWS.check(isPresent, 1, "Page.frameSubtreeWillBeDetached"); 4250 } 4251 4252 /** Creates an instance of this class from a {@link JsonObject}.*/ 4253 public static frameSubtreeWillBeDetached fromJSON(JsonObject jo) 4254 { return singleton.fromJSON(jo); } 4255 4256 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4257 public static NestedDescriptor<frameSubtreeWillBeDetached> descriptor() 4258 { return singleton.descriptor(); } 4259 } 4260 4261 /** 4262 * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been 4263 * closed. 4264 * 4265 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4266 */ 4267 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4268 public static class javascriptDialogClosed 4269 extends BrowserEvent<javascriptDialogClosed> 4270 implements java.io.Serializable 4271 { 4272 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4273 protected static final long serialVersionUID = 1; 4274 4275 private static final NestedHelper<Page.javascriptDialogClosed> singleton = 4276 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4277 Page$$javascriptDialogClosed$$.singleton; 4278 4279 /** 4280 * Frame id. 4281 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4282 */ 4283 public final String frameId; 4284 4285 /** Whether dialog was confirmed. */ 4286 public final boolean result; 4287 4288 /** User input in case of prompt. */ 4289 public final String userInput; 4290 4291 /** Constructor. Please review this class' fields for documentation. */ 4292 public javascriptDialogClosed 4293 (ReadOnlyList<Boolean> isPresent, String frameId, boolean result, String userInput) 4294 { 4295 super(singleton, Domains.Page, "javascriptDialogClosed", 3); 4296 4297 this.frameId = frameId; 4298 this.result = result; 4299 this.userInput = userInput; 4300 4301 this.isPresent = (isPresent == null) 4302 ? singleton.generateIsPresentList(this) 4303 : THROWS.check(isPresent, 3, "Page.javascriptDialogClosed"); 4304 } 4305 4306 /** Creates an instance of this class from a {@link JsonObject}.*/ 4307 public static javascriptDialogClosed fromJSON(JsonObject jo) 4308 { return singleton.fromJSON(jo); } 4309 4310 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4311 public static NestedDescriptor<javascriptDialogClosed> descriptor() 4312 { return singleton.descriptor(); } 4313 } 4314 4315 /** 4316 * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to 4317 * open. 4318 * 4319 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4320 */ 4321 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4322 public static class javascriptDialogOpening 4323 extends BrowserEvent<javascriptDialogOpening> 4324 implements java.io.Serializable 4325 { 4326 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4327 protected static final long serialVersionUID = 1; 4328 4329 private static final NestedHelper<Page.javascriptDialogOpening> singleton = 4330 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4331 Page$$javascriptDialogOpening$$.singleton; 4332 4333 /** Frame url. */ 4334 public final String url; 4335 4336 /** 4337 * Frame id. 4338 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4339 */ 4340 public final String frameId; 4341 4342 /** Message that will be displayed by the dialog. */ 4343 public final String message; 4344 4345 /** 4346 * Dialog type. 4347 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=DialogType DATA-F=type DATA-FILE-ID=CDP.EL2> 4348 * @see BaseType#enumStrList(String) 4349 */ 4350 public final String type; 4351 4352 /** 4353 * True iff browser is capable showing or acting on the given dialog. When browser has no 4354 * dialog handler for given target, calling alert while Page domain is engaged will stall 4355 * the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog. 4356 */ 4357 public final boolean hasBrowserHandler; 4358 4359 /** 4360 * Default dialog prompt. 4361 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 4362 */ 4363 public final String defaultPrompt; 4364 4365 /** Constructor. Please review this class' fields for documentation. */ 4366 public javascriptDialogOpening( 4367 ReadOnlyList<Boolean> isPresent, String url, String frameId, String message, 4368 String type, boolean hasBrowserHandler, String defaultPrompt 4369 ) 4370 { 4371 super(singleton, Domains.Page, "javascriptDialogOpening", 6); 4372 4373 this.url = url; 4374 this.frameId = frameId; 4375 this.message = message; 4376 this.type = type; 4377 this.hasBrowserHandler = hasBrowserHandler; 4378 this.defaultPrompt = defaultPrompt; 4379 4380 this.isPresent = (isPresent == null) 4381 ? singleton.generateIsPresentList(this) 4382 : THROWS.check(isPresent, 6, "Page.javascriptDialogOpening"); 4383 } 4384 4385 /** Creates an instance of this class from a {@link JsonObject}.*/ 4386 public static javascriptDialogOpening fromJSON(JsonObject jo) 4387 { return singleton.fromJSON(jo); } 4388 4389 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4390 public static NestedDescriptor<javascriptDialogOpening> descriptor() 4391 { return singleton.descriptor(); } 4392 } 4393 4394 /** 4395 * Fired for lifecycle events (navigation, load, paint, etc) in the current 4396 * target (including local frames). 4397 * 4398 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4399 */ 4400 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4401 public static class lifecycleEvent 4402 extends BrowserEvent<lifecycleEvent> 4403 implements java.io.Serializable 4404 { 4405 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4406 protected static final long serialVersionUID = 1; 4407 4408 private static final NestedHelper<Page.lifecycleEvent> singleton = 4409 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4410 Page$$lifecycleEvent$$.singleton; 4411 4412 /** Id of the frame. */ 4413 public final String frameId; 4414 4415 /** Loader identifier. Empty string if the request is fetched from worker. */ 4416 public final String loaderId; 4417 4418 /** <CODE>[No Description Provided by Google]</CODE> */ 4419 public final String name; 4420 4421 /** <CODE>[No Description Provided by Google]</CODE> */ 4422 public final Number timestamp; 4423 4424 /** Constructor. Please review this class' fields for documentation. */ 4425 public lifecycleEvent( 4426 ReadOnlyList<Boolean> isPresent, String frameId, String loaderId, String name, 4427 Number timestamp 4428 ) 4429 { 4430 super(singleton, Domains.Page, "lifecycleEvent", 4); 4431 4432 this.frameId = frameId; 4433 this.loaderId = loaderId; 4434 this.name = name; 4435 this.timestamp = timestamp; 4436 4437 this.isPresent = (isPresent == null) 4438 ? singleton.generateIsPresentList(this) 4439 : THROWS.check(isPresent, 4, "Page.lifecycleEvent"); 4440 } 4441 4442 /** Creates an instance of this class from a {@link JsonObject}.*/ 4443 public static lifecycleEvent fromJSON(JsonObject jo) 4444 { return singleton.fromJSON(jo); } 4445 4446 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4447 public static NestedDescriptor<lifecycleEvent> descriptor() 4448 { return singleton.descriptor(); } 4449 } 4450 4451 /** 4452 * <CODE>[No Description Provided by Google]</CODE> 4453 * 4454 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4455 */ 4456 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4457 public static class loadEventFired 4458 extends BrowserEvent<loadEventFired> 4459 implements java.io.Serializable 4460 { 4461 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4462 protected static final long serialVersionUID = 1; 4463 4464 private static final NestedHelper<Page.loadEventFired> singleton = 4465 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4466 Page$$loadEventFired$$.singleton; 4467 4468 /** <CODE>[No Description Provided by Google]</CODE> */ 4469 public final Number timestamp; 4470 4471 /** Constructor. Please review this class' fields for documentation. */ 4472 public loadEventFired(ReadOnlyList<Boolean> isPresent, Number timestamp) 4473 { 4474 super(singleton, Domains.Page, "loadEventFired", 1); 4475 4476 this.timestamp = timestamp; 4477 4478 this.isPresent = (isPresent == null) 4479 ? singleton.generateIsPresentList(this) 4480 : THROWS.check(isPresent, 1, "Page.loadEventFired"); 4481 } 4482 4483 /** Creates an instance of this class from a {@link JsonObject}.*/ 4484 public static loadEventFired fromJSON(JsonObject jo) 4485 { return singleton.fromJSON(jo); } 4486 4487 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4488 public static NestedDescriptor<loadEventFired> descriptor() 4489 { return singleton.descriptor(); } 4490 } 4491 4492 /** 4493 * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. 4494 * 4495 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4496 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4497 */ 4498 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4499 public static class navigatedWithinDocument 4500 extends BrowserEvent<navigatedWithinDocument> 4501 implements java.io.Serializable 4502 { 4503 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4504 protected static final long serialVersionUID = 1; 4505 4506 private static final NestedHelper<Page.navigatedWithinDocument> singleton = 4507 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4508 Page$$navigatedWithinDocument$$.singleton; 4509 4510 /** Id of the frame. */ 4511 public final String frameId; 4512 4513 /** Frame's new url. */ 4514 public final String url; 4515 4516 /** 4517 * Navigation type 4518 * <EMBED CLASS='external-html' DATA-D=Page DATA-C=navigatedWithinDocument DATA-F=navigationType DATA-FILE-ID=CDP.EL1> 4519 * @see BaseType#enumStrList(String) 4520 */ 4521 public final String navigationType; 4522 4523 /** Constructor. Please review this class' fields for documentation. */ 4524 public navigatedWithinDocument 4525 (ReadOnlyList<Boolean> isPresent, String frameId, String url, String navigationType) 4526 { 4527 super(singleton, Domains.Page, "navigatedWithinDocument", 3); 4528 4529 this.frameId = frameId; 4530 this.url = url; 4531 this.navigationType = navigationType; 4532 4533 this.isPresent = (isPresent == null) 4534 ? singleton.generateIsPresentList(this) 4535 : THROWS.check(isPresent, 3, "Page.navigatedWithinDocument"); 4536 } 4537 4538 /** Creates an instance of this class from a {@link JsonObject}.*/ 4539 public static navigatedWithinDocument fromJSON(JsonObject jo) 4540 { return singleton.fromJSON(jo); } 4541 4542 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4543 public static NestedDescriptor<navigatedWithinDocument> descriptor() 4544 { return singleton.descriptor(); } 4545 } 4546 4547 /** 4548 * Compressed image data requested by the <CODE>startScreencast</CODE>. 4549 * 4550 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4551 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4552 */ 4553 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4554 public static class screencastFrame 4555 extends BrowserEvent<screencastFrame> 4556 implements java.io.Serializable 4557 { 4558 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4559 protected static final long serialVersionUID = 1; 4560 4561 private static final NestedHelper<Page.screencastFrame> singleton = 4562 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4563 Page$$screencastFrame$$.singleton; 4564 4565 /** Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON) */ 4566 public final String data; 4567 4568 /** Screencast frame metadata. */ 4569 public final Page.ScreencastFrameMetadata metadata; 4570 4571 /** Frame number. */ 4572 public final int sessionId; 4573 4574 /** Constructor. Please review this class' fields for documentation. */ 4575 public screencastFrame( 4576 ReadOnlyList<Boolean> isPresent, String data, ScreencastFrameMetadata metadata, 4577 int sessionId 4578 ) 4579 { 4580 super(singleton, Domains.Page, "screencastFrame", 3); 4581 4582 this.data = data; 4583 this.metadata = metadata; 4584 this.sessionId = sessionId; 4585 4586 this.isPresent = (isPresent == null) 4587 ? singleton.generateIsPresentList(this) 4588 : THROWS.check(isPresent, 3, "Page.screencastFrame"); 4589 } 4590 4591 /** Creates an instance of this class from a {@link JsonObject}.*/ 4592 public static screencastFrame fromJSON(JsonObject jo) 4593 { return singleton.fromJSON(jo); } 4594 4595 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4596 public static NestedDescriptor<screencastFrame> descriptor() 4597 { return singleton.descriptor(); } 4598 } 4599 4600 /** 4601 * Fired when the page with currently enabled screencast was shown or hidden. 4602 * 4603 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4604 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4605 */ 4606 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4607 public static class screencastVisibilityChanged 4608 extends BrowserEvent<screencastVisibilityChanged> 4609 implements java.io.Serializable 4610 { 4611 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4612 protected static final long serialVersionUID = 1; 4613 4614 private static final NestedHelper<Page.screencastVisibilityChanged> singleton = 4615 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4616 Page$$screencastVisibilityChanged$$.singleton; 4617 4618 /** True if the page is visible. */ 4619 public final boolean visible; 4620 4621 /** Constructor. Please review this class' fields for documentation. */ 4622 public screencastVisibilityChanged(ReadOnlyList<Boolean> isPresent, boolean visible) 4623 { 4624 super(singleton, Domains.Page, "screencastVisibilityChanged", 1); 4625 4626 this.visible = visible; 4627 4628 this.isPresent = (isPresent == null) 4629 ? singleton.generateIsPresentList(this) 4630 : THROWS.check(isPresent, 1, "Page.screencastVisibilityChanged"); 4631 } 4632 4633 /** Creates an instance of this class from a {@link JsonObject}.*/ 4634 public static screencastVisibilityChanged fromJSON(JsonObject jo) 4635 { return singleton.fromJSON(jo); } 4636 4637 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4638 public static NestedDescriptor<screencastVisibilityChanged> descriptor() 4639 { return singleton.descriptor(); } 4640 } 4641 4642 /** 4643 * Fired when a new window is going to be opened, via window.open(), link click, form submission, 4644 * etc. 4645 * 4646 * <EMBED CLASS=globalDefs DATA-DOMAIN=Page DATA-API=BrowserAPI> 4647 */ 4648 @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI") 4649 public static class windowOpen 4650 extends BrowserEvent<windowOpen> 4651 implements java.io.Serializable 4652 { 4653 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */ 4654 protected static final long serialVersionUID = 1; 4655 4656 private static final NestedHelper<Page.windowOpen> singleton = 4657 Torello.Browser.BrowserAPI.NestedHelpers.Events. 4658 Page$$windowOpen$$.singleton; 4659 4660 /** The URL for the new window. */ 4661 public final String url; 4662 4663 /** Window name. */ 4664 public final String windowName; 4665 4666 /** An array of enabled window features. */ 4667 public final String[] windowFeatures; 4668 4669 /** Whether or not it was triggered by user gesture. */ 4670 public final boolean userGesture; 4671 4672 /** Constructor. Please review this class' fields for documentation. */ 4673 public windowOpen( 4674 ReadOnlyList<Boolean> isPresent, String url, String windowName, 4675 String[] windowFeatures, boolean userGesture 4676 ) 4677 { 4678 super(singleton, Domains.Page, "windowOpen", 4); 4679 4680 this.url = url; 4681 this.windowName = windowName; 4682 this.windowFeatures = windowFeatures; 4683 this.userGesture = userGesture; 4684 4685 this.isPresent = (isPresent == null) 4686 ? singleton.generateIsPresentList(this) 4687 : THROWS.check(isPresent, 4, "Page.windowOpen"); 4688 } 4689 4690 /** Creates an instance of this class from a {@link JsonObject}.*/ 4691 public static windowOpen fromJSON(JsonObject jo) 4692 { return singleton.fromJSON(jo); } 4693 4694 /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/ 4695 public static NestedDescriptor<windowOpen> descriptor() 4696 { return singleton.descriptor(); } 4697 } 4698 4699 4700 4701 4702 // ******************************************************************************************** 4703 // ******************************************************************************************** 4704 // Commands 4705 // ******************************************************************************************** 4706 // ******************************************************************************************** 4707 4708 4709 /** 4710 * Seeds compilation cache for given url. Compilation cache does not survive 4711 * cross-process navigation. 4712 * 4713 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4714 * 4715 * @param url - 4716 * 4717 * @param data Base64-encoded data (Encoded as a base64 string when passed over JSON) 4718 * 4719 * @return An instance of <CODE>{@link Script}<Void></CODE> 4720 * 4721 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 4722 * browser receives the invocation-request. 4723 * 4724 * <BR /><BR /><DIV CLASS=JDHint> 4725 * This Browser-Function <I>does not have</I> a return-value. You may choose to 4726 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 4727 * the Browser Function has run to completion. 4728 * </DIV> 4729 */ 4730 public static Script<Void> addCompilationCache(String url, String data) 4731 { 4732 // Convert all Method Parameters into a JSON Request-Object (as a String) 4733 final String requestJSON = WriteJSON.get( 4734 Page$$Commands.addCompilationCache$$, "Page.addCompilationCache", 4735 url, data 4736 ); 4737 4738 return Script.NO_RET(Domains.Page, "addCompilationCache", requestJSON); 4739 } 4740 4741 /** 4742 * Deprecated, please use addScriptToEvaluateOnNewDocument instead. 4743 * 4744 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 4745 * 4746 * @param scriptSource - 4747 * 4748 * @return An instance of <CODE>{@link Script}<String></CODE> 4749 * 4750 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 4751 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 4752 * <CODE><String></CODE> will be returned 4753 * 4754 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 4755 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 4756 * be retrieved.</I> 4757 * 4758 * <BR /><BR /><DIV CLASS=JDHint> 4759 * This Browser Function's {@code Promise} returns: 4760 * <CODE>String (<B>identifier</B>)</CODE> 4761 * <BR /> 4762 * Identifier of the added script. 4763 * </DIV> 4764 */ 4765 public static Script<String> addScriptToEvaluateOnLoad(String scriptSource) 4766 { 4767 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 4768 final String requestJSON = WriteJSON.get( 4769 CDPTypes.STRING, "scriptSource", false, "Page.addScriptToEvaluateOnLoad", 4770 scriptSource 4771 ); 4772 4773 return new Script<>( 4774 Domains.Page, "addScriptToEvaluateOnLoad", requestJSON, 4775 jo -> ReadJSON.getString(jo, "identifier", true, false), 4776 String.class 4777 ); 4778 } 4779 4780 /** 4781 * Evaluates given script in every frame upon creation (before loading frame's scripts). 4782 * 4783 * @param source - 4784 * 4785 * @param worldName 4786 * If specified, creates an isolated world with the given name and evaluates given script in it. 4787 * This world name will be used as the ExecutionContextDescription::name when the corresponding 4788 * event is emitted. 4789 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 4790 * 4791 * @param includeCommandLineAPI 4792 * Specifies whether command line API should be available to the script, defaults 4793 * to false. 4794 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 4795 * 4796 * @param runImmediately 4797 * If true, runs the script immediately on existing execution contexts or worlds. 4798 * Default: false. 4799 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 4800 * 4801 * @return An instance of <CODE>{@link Script}<String></CODE> 4802 * 4803 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 4804 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 4805 * <CODE><String></CODE> will be returned 4806 * 4807 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 4808 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 4809 * be retrieved.</I> 4810 * 4811 * <BR /><BR /><DIV CLASS=JDHint> 4812 * This Browser Function's {@code Promise} returns: 4813 * <CODE>String (<B>identifier</B>)</CODE> 4814 * <BR /> 4815 * Identifier of the added script. 4816 * </DIV> 4817 */ 4818 public static Script<String> addScriptToEvaluateOnNewDocument 4819 (String source, String worldName, Boolean includeCommandLineAPI, Boolean runImmediately) 4820 { 4821 // Convert all Method Parameters into a JSON Request-Object (as a String) 4822 final String requestJSON = WriteJSON.get( 4823 Page$$Commands.addScriptToEvaluateOnNewDocument$$, 4824 "Page.addScriptToEvaluateOnNewDocument", 4825 source, worldName, includeCommandLineAPI, runImmediately 4826 ); 4827 4828 return new Script<>( 4829 Domains.Page, "addScriptToEvaluateOnNewDocument", requestJSON, 4830 jo -> ReadJSON.getString(jo, "identifier", true, false), 4831 String.class 4832 ); 4833 } 4834 4835 /** 4836 * Brings page to front (activates tab). 4837 * 4838 * @return An instance of <CODE>{@link Script}<Void></CODE> 4839 * 4840 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 4841 * browser receives the invocation-request. 4842 * 4843 * <BR /><BR /><DIV CLASS=JDHint> 4844 * This Browser-Function <I>does not have</I> a return-value. You may choose to 4845 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 4846 * the Browser Function has run to completion. 4847 * </DIV> 4848 */ 4849 public static Script<Void> bringToFront() 4850 { 4851 // Ultra-Simple Request JSON - Because this method has no parameters 4852 final String requestJSON = "{\"method\":\"Page.bringToFront\"}"; 4853 4854 return Script.NO_RET(Domains.Page, "bringToFront", requestJSON); 4855 } 4856 4857 /** 4858 * Capture page screenshot. 4859 * 4860 * <BR /><BR /><DIV CLASS=JDHint> 4861 * 👍 Because of the sheer number of input parameters to this method, there is a 4862 * a {@link CommandBuilder} variant to this method which may be invoked instead. 4863 * 4864 * <BR /><BR /> 4865 * Please View: {@link #captureScreenshot()} 4866 * </DIV> 4867 * 4868 * @param format Image compression format (defaults to png). 4869 * <BR />Acceptable Values: ["jpeg", "png", "webp"] 4870 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 4871 * 4872 * @param quality Compression quality from range [0..100] (jpeg only). 4873 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 4874 * 4875 * @param clip Capture the screenshot of a given region only. 4876 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 4877 * 4878 * @param fromSurface Capture the screenshot from the surface, rather than the view. Defaults to true. 4879 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 4880 * 4881 * @param captureBeyondViewport Capture the screenshot beyond the viewport. Defaults to false. 4882 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 4883 * 4884 * @param optimizeForSpeed Optimize image encoding for speed, not for resulting size (defaults to false) 4885 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 4886 * 4887 * @return An instance of <CODE>{@link Script}<String></CODE> 4888 * 4889 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 4890 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 4891 * <CODE><String></CODE> will be returned 4892 * 4893 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 4894 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 4895 * be retrieved.</I> 4896 * 4897 * <BR /><BR /><DIV CLASS=JDHint> 4898 * This Browser Function's {@code Promise} returns: 4899 * <CODE>String (<B>data</B>)</CODE> 4900 * <BR /> 4901 * Base64-encoded image data. (Encoded as a base64 string when passed over JSON) 4902 * </DIV> 4903 */ 4904 public static Script<String> captureScreenshot( 4905 String format, Integer quality, Viewport clip, Boolean fromSurface, 4906 Boolean captureBeyondViewport, Boolean optimizeForSpeed 4907 ) 4908 { 4909 // Convert all Method Parameters into a JSON Request-Object (as a String) 4910 final String requestJSON = WriteJSON.get( 4911 Page$$Commands.captureScreenshot$$, "Page.captureScreenshot", 4912 format, quality, clip, fromSurface, captureBeyondViewport, optimizeForSpeed 4913 ); 4914 4915 return new Script<>( 4916 Domains.Page, "captureScreenshot", requestJSON, 4917 jo -> ReadJSON.getString(jo, "data", true, false), 4918 String.class 4919 ); 4920 } 4921 4922 /** 4923 * Returns a snapshot of the page as a string. For MHTML format, the serialization includes 4924 * iframes, shadow DOM, external resources, and element-inline styles. 4925 * 4926 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4927 * 4928 * @param format Format (defaults to mhtml). 4929 * <BR />Acceptable Values: ["mhtml"] 4930 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 4931 * 4932 * @return An instance of <CODE>{@link Script}<String></CODE> 4933 * 4934 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 4935 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 4936 * <CODE><String></CODE> will be returned 4937 * 4938 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 4939 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 4940 * be retrieved.</I> 4941 * 4942 * <BR /><BR /><DIV CLASS=JDHint> 4943 * This Browser Function's {@code Promise} returns: 4944 * <CODE>String (<B>data</B>)</CODE> 4945 * <BR /> 4946 * Serialized page data. 4947 * </DIV> 4948 */ 4949 public static Script<String> captureSnapshot(String format) 4950 { 4951 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 4952 final String requestJSON = WriteJSON.get 4953 (CDPTypes.STRING, "format", true, "Page.captureSnapshot", format); 4954 4955 return new Script<>( 4956 Domains.Page, "captureSnapshot", requestJSON, 4957 jo -> ReadJSON.getString(jo, "data", true, false), 4958 String.class 4959 ); 4960 } 4961 4962 /** 4963 * Clears seeded compilation cache. 4964 * 4965 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 4966 * 4967 * @return An instance of <CODE>{@link Script}<Void></CODE> 4968 * 4969 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 4970 * browser receives the invocation-request. 4971 * 4972 * <BR /><BR /><DIV CLASS=JDHint> 4973 * This Browser-Function <I>does not have</I> a return-value. You may choose to 4974 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 4975 * the Browser Function has run to completion. 4976 * </DIV> 4977 */ 4978 public static Script<Void> clearCompilationCache() 4979 { 4980 // Ultra-Simple Request JSON - Because this method has no parameters 4981 final String requestJSON = "{\"method\":\"Page.clearCompilationCache\"}"; 4982 4983 return Script.NO_RET(Domains.Page, "clearCompilationCache", requestJSON); 4984 } 4985 4986 /** 4987 * Clears the overridden device metrics. 4988 * 4989 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 4990 * 4991 * @return An instance of <CODE>{@link Script}<Void></CODE> 4992 * 4993 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 4994 * browser receives the invocation-request. 4995 * 4996 * <BR /><BR /><DIV CLASS=JDHint> 4997 * This Browser-Function <I>does not have</I> a return-value. You may choose to 4998 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 4999 * the Browser Function has run to completion. 5000 * </DIV> 5001 */ 5002 public static Script<Void> clearDeviceMetricsOverride() 5003 { 5004 // Ultra-Simple Request JSON - Because this method has no parameters 5005 final String requestJSON = "{\"method\":\"Page.clearDeviceMetricsOverride\"}"; 5006 5007 return Script.NO_RET(Domains.Page, "clearDeviceMetricsOverride", requestJSON); 5008 } 5009 5010 /** 5011 * Clears the overridden Device Orientation. 5012 * 5013 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 5014 * 5015 * @return An instance of <CODE>{@link Script}<Void></CODE> 5016 * 5017 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5018 * browser receives the invocation-request. 5019 * 5020 * <BR /><BR /><DIV CLASS=JDHint> 5021 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5022 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5023 * the Browser Function has run to completion. 5024 * </DIV> 5025 */ 5026 public static Script<Void> clearDeviceOrientationOverride() 5027 { 5028 // Ultra-Simple Request JSON - Because this method has no parameters 5029 final String requestJSON = "{\"method\":\"Page.clearDeviceOrientationOverride\"}"; 5030 5031 return Script.NO_RET(Domains.Page, "clearDeviceOrientationOverride", requestJSON); 5032 } 5033 5034 /** 5035 * Clears the overridden Geolocation Position and Error. 5036 * 5037 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 5038 * 5039 * @return An instance of <CODE>{@link Script}<Void></CODE> 5040 * 5041 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5042 * browser receives the invocation-request. 5043 * 5044 * <BR /><BR /><DIV CLASS=JDHint> 5045 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5046 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5047 * the Browser Function has run to completion. 5048 * </DIV> 5049 */ 5050 public static Script<Void> clearGeolocationOverride() 5051 { 5052 // Ultra-Simple Request JSON - Because this method has no parameters 5053 final String requestJSON = "{\"method\":\"Page.clearGeolocationOverride\"}"; 5054 5055 return Script.NO_RET(Domains.Page, "clearGeolocationOverride", requestJSON); 5056 } 5057 5058 /** 5059 * Tries to close page, running its beforeunload hooks, if any. 5060 * 5061 * @return An instance of <CODE>{@link Script}<Void></CODE> 5062 * 5063 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5064 * browser receives the invocation-request. 5065 * 5066 * <BR /><BR /><DIV CLASS=JDHint> 5067 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5068 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5069 * the Browser Function has run to completion. 5070 * </DIV> 5071 */ 5072 public static Script<Void> close() 5073 { 5074 // Ultra-Simple Request JSON - Because this method has no parameters 5075 final String requestJSON = "{\"method\":\"Page.close\"}"; 5076 5077 return Script.NO_RET(Domains.Page, "close", requestJSON); 5078 } 5079 5080 /** 5081 * Crashes renderer on the IO thread, generates minidumps. 5082 * 5083 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5084 * 5085 * @return An instance of <CODE>{@link Script}<Void></CODE> 5086 * 5087 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5088 * browser receives the invocation-request. 5089 * 5090 * <BR /><BR /><DIV CLASS=JDHint> 5091 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5092 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5093 * the Browser Function has run to completion. 5094 * </DIV> 5095 */ 5096 public static Script<Void> crash() 5097 { 5098 // Ultra-Simple Request JSON - Because this method has no parameters 5099 final String requestJSON = "{\"method\":\"Page.crash\"}"; 5100 5101 return Script.NO_RET(Domains.Page, "crash", requestJSON); 5102 } 5103 5104 /** 5105 * Creates an isolated world for the given frame. 5106 * 5107 * @param frameId Id of the frame in which the isolated world should be created. 5108 * 5109 * @param worldName An optional name which is reported in the Execution Context. 5110 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5111 * 5112 * @param grantUniveralAccess 5113 * Whether or not universal access should be granted to the isolated world. This is a powerful 5114 * option, use with caution. 5115 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5116 * 5117 * @return An instance of <CODE>{@link Script}<Integer></CODE> 5118 * 5119 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5120 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5121 * <CODE><Integer></CODE> will be returned 5122 * 5123 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5124 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5125 * be retrieved.</I> 5126 * 5127 * <BR /><BR /><DIV CLASS=JDHint> 5128 * This Browser Function's {@code Promise} returns: 5129 * <CODE>Integer (<B>executionContextId</B>)</CODE> 5130 * <BR /> 5131 * Execution context of the isolated world. 5132 * </DIV> 5133 */ 5134 public static Script<Integer> createIsolatedWorld 5135 (String frameId, String worldName, Boolean grantUniveralAccess) 5136 { 5137 // Convert all Method Parameters into a JSON Request-Object (as a String) 5138 final String requestJSON = WriteJSON.get( 5139 Page$$Commands.createIsolatedWorld$$, "Page.createIsolatedWorld", 5140 frameId, worldName, grantUniveralAccess 5141 ); 5142 5143 return new Script<>( 5144 Domains.Page, "createIsolatedWorld", requestJSON, 5145 jo -> ReadBoxedJSON.getInteger(jo, "executionContextId", JFlag.RD_N | JFlag.RD_M, DV.NULL_INT), 5146 Integer.class 5147 ); 5148 } 5149 5150 /** 5151 * Deletes browser cookie with given name, domain and path. 5152 * 5153 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 5154 * 5155 * @param cookieName Name of the cookie to remove. 5156 * 5157 * @param url URL to match cooke domain and path. 5158 * 5159 * @return An instance of <CODE>{@link Script}<Void></CODE> 5160 * 5161 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5162 * browser receives the invocation-request. 5163 * 5164 * <BR /><BR /><DIV CLASS=JDHint> 5165 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5166 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5167 * the Browser Function has run to completion. 5168 * </DIV> 5169 */ 5170 public static Script<Void> deleteCookie(String cookieName, String url) 5171 { 5172 // Convert all Method Parameters into a JSON Request-Object (as a String) 5173 final String requestJSON = WriteJSON.get( 5174 Page$$Commands.deleteCookie$$, "Page.deleteCookie", 5175 cookieName, url 5176 ); 5177 5178 return Script.NO_RET(Domains.Page, "deleteCookie", requestJSON); 5179 } 5180 5181 /** 5182 * Disables page domain notifications. 5183 * 5184 * @return An instance of <CODE>{@link Script}<Void></CODE> 5185 * 5186 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5187 * browser receives the invocation-request. 5188 * 5189 * <BR /><BR /><DIV CLASS=JDHint> 5190 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5191 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5192 * the Browser Function has run to completion. 5193 * </DIV> 5194 */ 5195 public static Script<Void> disable() 5196 { 5197 // Ultra-Simple Request JSON - Because this method has no parameters 5198 final String requestJSON = "{\"method\":\"Page.disable\"}"; 5199 5200 return Script.NO_RET(Domains.Page, "disable", requestJSON); 5201 } 5202 5203 /** 5204 * Enables page domain notifications. 5205 * 5206 * @param enableFileChooserOpenedEvent 5207 * If true, the <CODE>Page.fileChooserOpened</CODE> event will be emitted regardless of the state set by 5208 * <CODE>Page.setInterceptFileChooserDialog</CODE> command (default: false). 5209 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 5210 * 5211 * @return An instance of <CODE>{@link Script}<Void></CODE> 5212 * 5213 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5214 * browser receives the invocation-request. 5215 * 5216 * <BR /><BR /><DIV CLASS=JDHint> 5217 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5218 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5219 * the Browser Function has run to completion. 5220 * </DIV> 5221 */ 5222 public static Script<Void> enable(Boolean enableFileChooserOpenedEvent) 5223 { 5224 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 5225 final String requestJSON = WriteJSON.get( 5226 CDPTypes.BOXED_BOOLEAN, "enableFileChooserOpenedEvent", true, "Page.enable", 5227 enableFileChooserOpenedEvent 5228 ); 5229 5230 return Script.NO_RET(Domains.Page, "enable", requestJSON); 5231 } 5232 5233 /** 5234 * Generates a report for testing. 5235 * 5236 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5237 * 5238 * @param message Message to be displayed in the report. 5239 * 5240 * @param group Specifies the endpoint group to deliver the report to. 5241 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5242 * 5243 * @return An instance of <CODE>{@link Script}<Void></CODE> 5244 * 5245 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5246 * browser receives the invocation-request. 5247 * 5248 * <BR /><BR /><DIV CLASS=JDHint> 5249 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5250 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5251 * the Browser Function has run to completion. 5252 * </DIV> 5253 */ 5254 public static Script<Void> generateTestReport(String message, String group) 5255 { 5256 // Convert all Method Parameters into a JSON Request-Object (as a String) 5257 final String requestJSON = WriteJSON.get( 5258 Page$$Commands.generateTestReport$$, "Page.generateTestReport", 5259 message, group 5260 ); 5261 5262 return Script.NO_RET(Domains.Page, "generateTestReport", requestJSON); 5263 } 5264 5265 /** 5266 * <CODE>[No Description Provided by Google]</CODE> 5267 * 5268 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5269 * 5270 * @param frameId - 5271 * 5272 * @return An instance of <CODE>{@link Script}<{@link Page.AdScriptAncestry}></CODE> 5273 * 5274 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5275 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5276 * <CODE><{@link Page.AdScriptAncestry}></CODE> will be returned 5277 * 5278 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5279 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5280 * be retrieved.</I> 5281 * 5282 * <BR /><BR /><DIV CLASS=JDHint> 5283 * This Browser Function's {@code Promise} returns: 5284 * <CODE>{@link Page.AdScriptAncestry} (<B>adScriptAncestry</B>)</CODE> 5285 * <BR /> 5286 * The ancestry chain of ad script identifiers leading to this frame's 5287 * creation, along with the root script's filterlist rule. The ancestry 5288 * chain is ordered from the most immediate script (in the frame creation 5289 * stack) to more distant ancestors (that created the immediately preceding 5290 * script). Only sent if frame is labelled as an ad and ids are available. 5291 * </DIV> 5292 */ 5293 public static Script<Page.AdScriptAncestry> getAdScriptAncestry(String frameId) 5294 { 5295 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 5296 final String requestJSON = WriteJSON.get 5297 (CDPTypes.STRING, "frameId", false, "Page.getAdScriptAncestry", frameId); 5298 5299 return new Script<>( 5300 Domains.Page, "getAdScriptAncestry", requestJSON, 5301 Page$$Commands::getAdScriptAncestry, 5302 Page.AdScriptAncestry.class 5303 ); 5304 } 5305 5306 /** 5307 * Returns the unique (PWA) app id. 5308 * Only returns values if the feature flag 'WebAppEnableManifestId' is enabled 5309 * 5310 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5311 * 5312 * @return An instance of <CODE>{@link Script}<{@link getAppId$$RET}></CODE> 5313 * 5314 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5315 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5316 * <CODE><{@link getAppId$$RET}></CODE> will be returned 5317 * 5318 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5319 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5320 * be retrieved.</I> 5321 * 5322 * <BR /><BR /><DIV CLASS=JDHint> 5323 * This Browser Function's {@code Promise} returns:{@link getAppId$$RET} 5324 * A dedicated return type implies that the browser may return more than 1 datum 5325 * </DIV> 5326 */ 5327 public static Script<getAppId$$RET> getAppId() 5328 { 5329 // Ultra-Simple Request JSON - Because this method has no parameters 5330 final String requestJSON = "{\"method\":\"Page.getAppId\"}"; 5331 5332 return new Script<>( 5333 Domains.Page, "getAppId", requestJSON, 5334 getAppId$$RET::fromJSON, 5335 getAppId$$RET.class 5336 ); 5337 } 5338 5339 /** 5340 * Gets the processed manifest for this current document. 5341 * This API always waits for the manifest to be loaded. 5342 * If manifestId is provided, and it does not match the manifest of the 5343 * current document, this API errors out. 5344 * If there is not a loaded page, this API errors out immediately. 5345 * 5346 * @param manifestId - 5347 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5348 * 5349 * @return An instance of <CODE>{@link Script}<{@link getAppManifest$$RET}></CODE> 5350 * 5351 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5352 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5353 * <CODE><{@link getAppManifest$$RET}></CODE> will be returned 5354 * 5355 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5356 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5357 * be retrieved.</I> 5358 * 5359 * <BR /><BR /><DIV CLASS=JDHint> 5360 * This Browser Function's {@code Promise} returns:{@link getAppManifest$$RET} 5361 * A dedicated return type implies that the browser may return more than 1 datum 5362 * </DIV> 5363 */ 5364 public static Script<getAppManifest$$RET> getAppManifest(String manifestId) 5365 { 5366 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 5367 final String requestJSON = WriteJSON.get 5368 (CDPTypes.STRING, "manifestId", true, "Page.getAppManifest", manifestId); 5369 5370 return new Script<>( 5371 Domains.Page, "getAppManifest", requestJSON, 5372 getAppManifest$$RET::fromJSON, 5373 getAppManifest$$RET.class 5374 ); 5375 } 5376 5377 /** 5378 * Returns present frame tree structure. 5379 * 5380 * @return An instance of <CODE>{@link Script}<{@link Page.FrameTree}></CODE> 5381 * 5382 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5383 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5384 * <CODE><{@link Page.FrameTree}></CODE> will be returned 5385 * 5386 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5387 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5388 * be retrieved.</I> 5389 * 5390 * <BR /><BR /><DIV CLASS=JDHint> 5391 * This Browser Function's {@code Promise} returns: 5392 * <CODE>{@link Page.FrameTree} (<B>frameTree</B>)</CODE> 5393 * <BR /> 5394 * Present frame tree structure. 5395 * </DIV> 5396 */ 5397 public static Script<Page.FrameTree> getFrameTree() 5398 { 5399 // Ultra-Simple Request JSON - Because this method has no parameters 5400 final String requestJSON = "{\"method\":\"Page.getFrameTree\"}"; 5401 5402 return new Script<>( 5403 Domains.Page, "getFrameTree", requestJSON, 5404 Page$$Commands::getFrameTree, 5405 Page.FrameTree.class 5406 ); 5407 } 5408 5409 /** 5410 * <CODE>[No Description Provided by Google]</CODE> 5411 * 5412 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5413 * 5414 * @return An instance of <CODE>{@link Script}<{@link Page.InstallabilityError}[]></CODE> 5415 * 5416 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5417 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5418 * <CODE><{@link Page.InstallabilityError}[]></CODE> will be returned 5419 * 5420 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5421 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5422 * be retrieved.</I> 5423 * 5424 * <BR /><BR /><DIV CLASS=JDHint> 5425 * This Browser Function's {@code Promise} returns: 5426 * <CODE>{@link Page.InstallabilityError}[] (<B>installabilityErrors</B>)</CODE> 5427 * </DIV> 5428 */ 5429 public static Script<Page.InstallabilityError[]> getInstallabilityErrors() 5430 { 5431 // Ultra-Simple Request JSON - Because this method has no parameters 5432 final String requestJSON = "{\"method\":\"Page.getInstallabilityErrors\"}"; 5433 5434 return new Script<>( 5435 Domains.Page, "getInstallabilityErrors", requestJSON, 5436 Page$$Commands::getInstallabilityErrors, 5437 Page.InstallabilityError[].class 5438 ); 5439 } 5440 5441 /** 5442 * Returns metrics relating to the layouting of the page, such as viewport bounds/scale. 5443 * 5444 * @return An instance of <CODE>{@link Script}<{@link getLayoutMetrics$$RET}></CODE> 5445 * 5446 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5447 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5448 * <CODE><{@link getLayoutMetrics$$RET}></CODE> will be returned 5449 * 5450 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5451 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5452 * be retrieved.</I> 5453 * 5454 * <BR /><BR /><DIV CLASS=JDHint> 5455 * This Browser Function's {@code Promise} returns:{@link getLayoutMetrics$$RET} 5456 * A dedicated return type implies that the browser may return more than 1 datum 5457 * </DIV> 5458 */ 5459 public static Script<getLayoutMetrics$$RET> getLayoutMetrics() 5460 { 5461 // Ultra-Simple Request JSON - Because this method has no parameters 5462 final String requestJSON = "{\"method\":\"Page.getLayoutMetrics\"}"; 5463 5464 return new Script<>( 5465 Domains.Page, "getLayoutMetrics", requestJSON, 5466 getLayoutMetrics$$RET::fromJSON, 5467 getLayoutMetrics$$RET.class 5468 ); 5469 } 5470 5471 /** 5472 * Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation. 5473 * 5474 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 5475 * 5476 * @return An instance of <CODE>{@link Script}<String></CODE> 5477 * 5478 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5479 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5480 * <CODE><String></CODE> will be returned 5481 * 5482 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5483 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5484 * be retrieved.</I> 5485 * 5486 * <BR /><BR /><DIV CLASS=JDHint> 5487 * This Browser Function's {@code Promise} returns: 5488 * <CODE>String (<B>primaryIcon</B>)</CODE> 5489 * </DIV> 5490 */ 5491 public static Script<String> getManifestIcons() 5492 { 5493 // Ultra-Simple Request JSON - Because this method has no parameters 5494 final String requestJSON = "{\"method\":\"Page.getManifestIcons\"}"; 5495 5496 return new Script<>( 5497 Domains.Page, "getManifestIcons", requestJSON, 5498 jo -> ReadJSON.getString(jo, "primaryIcon", true, false), 5499 String.class 5500 ); 5501 } 5502 5503 /** 5504 * Returns navigation history for the current page. 5505 * 5506 * @return An instance of <CODE>{@link Script}<{@link getNavigationHistory$$RET}></CODE> 5507 * 5508 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5509 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5510 * <CODE><{@link getNavigationHistory$$RET}></CODE> will be returned 5511 * 5512 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5513 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5514 * be retrieved.</I> 5515 * 5516 * <BR /><BR /><DIV CLASS=JDHint> 5517 * This Browser Function's {@code Promise} returns:{@link getNavigationHistory$$RET} 5518 * A dedicated return type implies that the browser may return more than 1 datum 5519 * </DIV> 5520 */ 5521 public static Script<getNavigationHistory$$RET> getNavigationHistory() 5522 { 5523 // Ultra-Simple Request JSON - Because this method has no parameters 5524 final String requestJSON = "{\"method\":\"Page.getNavigationHistory\"}"; 5525 5526 return new Script<>( 5527 Domains.Page, "getNavigationHistory", requestJSON, 5528 getNavigationHistory$$RET::fromJSON, 5529 getNavigationHistory$$RET.class 5530 ); 5531 } 5532 5533 /** 5534 * Get Origin Trials on given frame. 5535 * 5536 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5537 * 5538 * @param frameId - 5539 * 5540 * @return An instance of <CODE>{@link Script}<{@link Page.OriginTrial}[]></CODE> 5541 * 5542 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5543 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5544 * <CODE><{@link Page.OriginTrial}[]></CODE> will be returned 5545 * 5546 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5547 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5548 * be retrieved.</I> 5549 * 5550 * <BR /><BR /><DIV CLASS=JDHint> 5551 * This Browser Function's {@code Promise} returns: 5552 * <CODE>{@link Page.OriginTrial}[] (<B>originTrials</B>)</CODE> 5553 * </DIV> 5554 */ 5555 public static Script<Page.OriginTrial[]> getOriginTrials(String frameId) 5556 { 5557 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 5558 final String requestJSON = WriteJSON.get 5559 (CDPTypes.STRING, "frameId", false, "Page.getOriginTrials", frameId); 5560 5561 return new Script<>( 5562 Domains.Page, "getOriginTrials", requestJSON, 5563 Page$$Commands::getOriginTrials, 5564 Page.OriginTrial[].class 5565 ); 5566 } 5567 5568 /** 5569 * Get Permissions Policy state on given frame. 5570 * 5571 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5572 * 5573 * @param frameId - 5574 * 5575 * @return An instance of <CODE>{@link Script} 5576 * <{@link Page.PermissionsPolicyFeatureState}[]></CODE> 5577 * 5578 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5579 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5580 * <CODE><{@link Page.PermissionsPolicyFeatureState}[]></CODE> will be returned 5581 * 5582 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5583 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5584 * be retrieved.</I> 5585 * 5586 * <BR /><BR /><DIV CLASS=JDHint> 5587 * This Browser Function's {@code Promise} returns: 5588 * <CODE>{@link Page.PermissionsPolicyFeatureState}[] (<B>states</B>)</CODE> 5589 * </DIV> 5590 */ 5591 public static Script<Page.PermissionsPolicyFeatureState[]> getPermissionsPolicyState 5592 (String frameId) 5593 { 5594 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 5595 final String requestJSON = WriteJSON.get 5596 (CDPTypes.STRING, "frameId", false, "Page.getPermissionsPolicyState", frameId); 5597 5598 return new Script<>( 5599 Domains.Page, "getPermissionsPolicyState", requestJSON, 5600 Page$$Commands::getPermissionsPolicyState, 5601 Page.PermissionsPolicyFeatureState[].class 5602 ); 5603 } 5604 5605 /** 5606 * Returns content of the given resource. 5607 * 5608 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5609 * 5610 * @param frameId Frame id to get resource for. 5611 * 5612 * @param url URL of the resource to get content for. 5613 * 5614 * @return An instance of <CODE>{@link Script}<{@link getResourceContent$$RET}></CODE> 5615 * 5616 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5617 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5618 * <CODE><{@link getResourceContent$$RET}></CODE> will be returned 5619 * 5620 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5621 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5622 * be retrieved.</I> 5623 * 5624 * <BR /><BR /><DIV CLASS=JDHint> 5625 * This Browser Function's {@code Promise} returns:{@link getResourceContent$$RET} 5626 * A dedicated return type implies that the browser may return more than 1 datum 5627 * </DIV> 5628 */ 5629 public static Script<getResourceContent$$RET> getResourceContent(String frameId, String url) 5630 { 5631 // Convert all Method Parameters into a JSON Request-Object (as a String) 5632 final String requestJSON = WriteJSON.get( 5633 Page$$Commands.getResourceContent$$, "Page.getResourceContent", 5634 frameId, url 5635 ); 5636 5637 return new Script<>( 5638 Domains.Page, "getResourceContent", requestJSON, 5639 getResourceContent$$RET::fromJSON, 5640 getResourceContent$$RET.class 5641 ); 5642 } 5643 5644 /** 5645 * Returns present frame / resource tree structure. 5646 * 5647 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5648 * 5649 * @return An instance of <CODE>{@link Script}<{@link Page.FrameResourceTree}></CODE> 5650 * 5651 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5652 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5653 * <CODE><{@link Page.FrameResourceTree}></CODE> will be returned 5654 * 5655 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5656 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5657 * be retrieved.</I> 5658 * 5659 * <BR /><BR /><DIV CLASS=JDHint> 5660 * This Browser Function's {@code Promise} returns: 5661 * <CODE>{@link Page.FrameResourceTree} (<B>frameTree</B>)</CODE> 5662 * <BR /> 5663 * Present frame / resource tree structure. 5664 * </DIV> 5665 */ 5666 public static Script<Page.FrameResourceTree> getResourceTree() 5667 { 5668 // Ultra-Simple Request JSON - Because this method has no parameters 5669 final String requestJSON = "{\"method\":\"Page.getResourceTree\"}"; 5670 5671 return new Script<>( 5672 Domains.Page, "getResourceTree", requestJSON, 5673 Page$$Commands::getResourceTree, 5674 Page.FrameResourceTree.class 5675 ); 5676 } 5677 5678 /** 5679 * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). 5680 * 5681 * @param accept Whether to accept or dismiss the dialog. 5682 * 5683 * @param promptText 5684 * The text to enter into the dialog prompt before accepting. Used only if this is a prompt 5685 * dialog. 5686 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5687 * 5688 * @return An instance of <CODE>{@link Script}<Void></CODE> 5689 * 5690 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5691 * browser receives the invocation-request. 5692 * 5693 * <BR /><BR /><DIV CLASS=JDHint> 5694 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5695 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5696 * the Browser Function has run to completion. 5697 * </DIV> 5698 */ 5699 public static Script<Void> handleJavaScriptDialog(boolean accept, String promptText) 5700 { 5701 // Convert all Method Parameters into a JSON Request-Object (as a String) 5702 final String requestJSON = WriteJSON.get( 5703 Page$$Commands.handleJavaScriptDialog$$, "Page.handleJavaScriptDialog", 5704 accept, promptText 5705 ); 5706 5707 return Script.NO_RET(Domains.Page, "handleJavaScriptDialog", requestJSON); 5708 } 5709 5710 /** 5711 * Navigates current page to the given URL. 5712 * 5713 * <BR /><BR /><DIV CLASS=JDHint> 5714 * 👍 Because of the sheer number of input parameters to this method, there is a 5715 * a {@link CommandBuilder} variant to this method which may be invoked instead. 5716 * 5717 * <BR /><BR /> 5718 * Please View: {@link #navigate()} 5719 * </DIV> 5720 * 5721 * @param url URL to navigate the page to. 5722 * 5723 * @param referrer Referrer URL. 5724 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5725 * 5726 * @param transitionType Intended transition type. 5727 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5728 * 5729 * @param frameId Frame id to navigate, if not specified navigates the top frame. 5730 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5731 * 5732 * @param referrerPolicy Referrer-policy used for the navigation. 5733 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 5734 * 5735 * @return An instance of <CODE>{@link Script}<{@link navigate$$RET}></CODE> 5736 * 5737 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5738 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5739 * <CODE><{@link navigate$$RET}></CODE> will be returned 5740 * 5741 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5742 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5743 * be retrieved.</I> 5744 * 5745 * <BR /><BR /><DIV CLASS=JDHint> 5746 * This Browser Function's {@code Promise} returns:{@link navigate$$RET} 5747 * A dedicated return type implies that the browser may return more than 1 datum 5748 * </DIV> 5749 */ 5750 public static Script<navigate$$RET> navigate 5751 (String url, String referrer, String transitionType, String frameId, String referrerPolicy) 5752 { 5753 // Convert all Method Parameters into a JSON Request-Object (as a String) 5754 final String requestJSON = WriteJSON.get( 5755 Page$$Commands.navigate$$, "Page.navigate", 5756 url, referrer, transitionType, frameId, referrerPolicy 5757 ); 5758 5759 return new Script<>( 5760 Domains.Page, "navigate", requestJSON, 5761 navigate$$RET::fromJSON, 5762 navigate$$RET.class 5763 ); 5764 } 5765 5766 /** 5767 * Navigates current page to the given history entry. 5768 * 5769 * @param entryId Unique id of the entry to navigate to. 5770 * 5771 * @return An instance of <CODE>{@link Script}<Void></CODE> 5772 * 5773 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5774 * browser receives the invocation-request. 5775 * 5776 * <BR /><BR /><DIV CLASS=JDHint> 5777 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5778 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5779 * the Browser Function has run to completion. 5780 * </DIV> 5781 */ 5782 public static Script<Void> navigateToHistoryEntry(int entryId) 5783 { 5784 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 5785 final String requestJSON = WriteJSON.get 5786 (CDPTypes.PRIMITIVE_INT, "entryId", false, "Page.navigateToHistoryEntry", entryId); 5787 5788 return Script.NO_RET(Domains.Page, "navigateToHistoryEntry", requestJSON); 5789 } 5790 5791 /** 5792 * Print page as PDF. 5793 * 5794 * <BR /><BR /><DIV CLASS=JDHint> 5795 * 👍 Because of the sheer number of input parameters to this method, there is a 5796 * a {@link CommandBuilder} variant to this method which may be invoked instead. 5797 * 5798 * <BR /><BR /> 5799 * Please View: {@link #printToPDF()} 5800 * </DIV> 5801 * 5802 * @param landscape Paper orientation. Defaults to false. 5803 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5804 * 5805 * @param displayHeaderFooter Display header and footer. Defaults to false. 5806 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5807 * 5808 * @param printBackground Print background graphics. Defaults to false. 5809 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5810 * 5811 * @param scale Scale of the webpage rendering. Defaults to 1. 5812 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5813 * 5814 * @param paperWidth Paper width in inches. Defaults to 8.5 inches. 5815 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5816 * 5817 * @param paperHeight Paper height in inches. Defaults to 11 inches. 5818 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5819 * 5820 * @param marginTop Top margin in inches. Defaults to 1cm (~0.4 inches). 5821 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5822 * 5823 * @param marginBottom Bottom margin in inches. Defaults to 1cm (~0.4 inches). 5824 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5825 * 5826 * @param marginLeft Left margin in inches. Defaults to 1cm (~0.4 inches). 5827 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5828 * 5829 * @param marginRight Right margin in inches. Defaults to 1cm (~0.4 inches). 5830 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5831 * 5832 * @param pageRanges 5833 * Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are 5834 * printed in the document order, not in the order specified, and no 5835 * more than once. 5836 * Defaults to empty string, which implies the entire document is printed. 5837 * The page numbers are quietly capped to actual page count of the 5838 * document, and ranges beyond the end of the document are ignored. 5839 * If this results in no pages to print, an error is reported. 5840 * It is an error to specify a range with start greater than end. 5841 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5842 * 5843 * @param headerTemplate 5844 * HTML template for the print header. Should be valid HTML markup with following 5845 * classes used to inject printing values into them: 5846 * - <CODE>date</CODE>: formatted print date 5847 * - <CODE>title</CODE>: document title 5848 * - <CODE>url</CODE>: document location 5849 * - <CODE>pageNumber</CODE>: current page number 5850 * - <CODE>totalPages</CODE>: total pages in the document 5851 * 5852 * For example, <CODE><span class=title></span></CODE> would generate span containing the title. 5853 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5854 * 5855 * @param footerTemplate HTML template for the print footer. Should use the same format as the <CODE>headerTemplate</CODE>. 5856 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5857 * 5858 * @param preferCSSPageSize 5859 * Whether or not to prefer page size as defined by css. Defaults to false, 5860 * in which case the content will be scaled to fit the paper size. 5861 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5862 * 5863 * @param transferMode return as stream 5864 * <BR />Acceptable Values: ["ReturnAsBase64", "ReturnAsStream"] 5865 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 5866 * 5867 * @param generateTaggedPDF Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice. 5868 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 5869 * 5870 * @param generateDocumentOutline Whether or not to embed the document outline into the PDF. 5871 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 5872 * 5873 * @return An instance of <CODE>{@link Script}<{@link printToPDF$$RET}></CODE> 5874 * 5875 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5876 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 5877 * <CODE><{@link printToPDF$$RET}></CODE> will be returned 5878 * 5879 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5880 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5881 * be retrieved.</I> 5882 * 5883 * <BR /><BR /><DIV CLASS=JDHint> 5884 * This Browser Function's {@code Promise} returns:{@link printToPDF$$RET} 5885 * A dedicated return type implies that the browser may return more than 1 datum 5886 * </DIV> 5887 */ 5888 public static Script<printToPDF$$RET> printToPDF( 5889 Boolean landscape, Boolean displayHeaderFooter, Boolean printBackground, Number scale, 5890 Number paperWidth, Number paperHeight, Number marginTop, Number marginBottom, 5891 Number marginLeft, Number marginRight, String pageRanges, String headerTemplate, 5892 String footerTemplate, Boolean preferCSSPageSize, String transferMode, 5893 Boolean generateTaggedPDF, Boolean generateDocumentOutline 5894 ) 5895 { 5896 // Convert all Method Parameters into a JSON Request-Object (as a String) 5897 final String requestJSON = WriteJSON.get( 5898 Page$$Commands.printToPDF$$, "Page.printToPDF", 5899 landscape, displayHeaderFooter, printBackground, scale, paperWidth, paperHeight, 5900 marginTop, marginBottom, marginLeft, marginRight, pageRanges, headerTemplate, 5901 footerTemplate, preferCSSPageSize, transferMode, generateTaggedPDF, 5902 generateDocumentOutline 5903 ); 5904 5905 return new Script<>( 5906 Domains.Page, "printToPDF", requestJSON, 5907 printToPDF$$RET::fromJSON, 5908 printToPDF$$RET.class 5909 ); 5910 } 5911 5912 /** 5913 * Requests backend to produce compilation cache for the specified scripts. 5914 * <CODE>scripts</CODE> are appended to the list of scripts for which the cache 5915 * would be produced. The list may be reset during page navigation. 5916 * When script with a matching URL is encountered, the cache is optionally 5917 * produced upon backend discretion, based on internal heuristics. 5918 * See also: <CODE>Page.compilationCacheProduced</CODE>. 5919 * 5920 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5921 * 5922 * @param scripts - 5923 * 5924 * @return An instance of <CODE>{@link Script}<Void></CODE> 5925 * 5926 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5927 * browser receives the invocation-request. 5928 * 5929 * <BR /><BR /><DIV CLASS=JDHint> 5930 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5931 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5932 * the Browser Function has run to completion. 5933 * </DIV> 5934 */ 5935 public static Script<Void> produceCompilationCache(CompilationCacheParams[] scripts) 5936 { 5937 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 5938 final String requestJSON = WriteJSON.get( 5939 CDPTypes.CDP_TYPE_ARRAY_1D, "scripts", false, "Page.produceCompilationCache", 5940 (Object) scripts 5941 ); 5942 5943 return Script.NO_RET(Domains.Page, "produceCompilationCache", requestJSON); 5944 } 5945 5946 /** 5947 * Reloads given page optionally ignoring the cache. 5948 * 5949 * @param ignoreCache If true, browser cache is ignored (as if the user pressed Shift+refresh). 5950 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5951 * 5952 * @param scriptToEvaluateOnLoad 5953 * If set, the script will be injected into all frames of the inspected page after reload. 5954 * Argument will be ignored if reloading dataURL origin. 5955 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 5956 * 5957 * @param loaderId 5958 * If set, an error will be thrown if the target page's main frame's 5959 * loader id does not match the provided id. This prevents accidentally 5960 * reloading an unintended target in case there's a racing navigation. 5961 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 5962 * 5963 * @return An instance of <CODE>{@link Script}<Void></CODE> 5964 * 5965 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5966 * browser receives the invocation-request. 5967 * 5968 * <BR /><BR /><DIV CLASS=JDHint> 5969 * This Browser-Function <I>does not have</I> a return-value. You may choose to 5970 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 5971 * the Browser Function has run to completion. 5972 * </DIV> 5973 */ 5974 public static Script<Void> reload 5975 (Boolean ignoreCache, String scriptToEvaluateOnLoad, String loaderId) 5976 { 5977 // Convert all Method Parameters into a JSON Request-Object (as a String) 5978 final String requestJSON = WriteJSON.get( 5979 Page$$Commands.reload$$, "Page.reload", 5980 ignoreCache, scriptToEvaluateOnLoad, loaderId 5981 ); 5982 5983 return Script.NO_RET(Domains.Page, "reload", requestJSON); 5984 } 5985 5986 /** 5987 * Deprecated, please use removeScriptToEvaluateOnNewDocument instead. 5988 * 5989 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 5990 * 5991 * @param identifier - 5992 * 5993 * @return An instance of <CODE>{@link Script}<Void></CODE> 5994 * 5995 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5996 * browser receives the invocation-request. 5997 * 5998 * <BR /><BR /><DIV CLASS=JDHint> 5999 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6000 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6001 * the Browser Function has run to completion. 6002 * </DIV> 6003 */ 6004 public static Script<Void> removeScriptToEvaluateOnLoad(String identifier) 6005 { 6006 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6007 final String requestJSON = WriteJSON.get( 6008 CDPTypes.STRING, "identifier", false, "Page.removeScriptToEvaluateOnLoad", 6009 identifier 6010 ); 6011 6012 return Script.NO_RET(Domains.Page, "removeScriptToEvaluateOnLoad", requestJSON); 6013 } 6014 6015 /** 6016 * Removes given script from the list. 6017 * 6018 * @param identifier - 6019 * 6020 * @return An instance of <CODE>{@link Script}<Void></CODE> 6021 * 6022 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6023 * browser receives the invocation-request. 6024 * 6025 * <BR /><BR /><DIV CLASS=JDHint> 6026 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6027 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6028 * the Browser Function has run to completion. 6029 * </DIV> 6030 */ 6031 public static Script<Void> removeScriptToEvaluateOnNewDocument(String identifier) 6032 { 6033 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6034 final String requestJSON = WriteJSON.get( 6035 CDPTypes.STRING, "identifier", false, "Page.removeScriptToEvaluateOnNewDocument", 6036 identifier 6037 ); 6038 6039 return Script.NO_RET(Domains.Page, "removeScriptToEvaluateOnNewDocument", requestJSON); 6040 } 6041 6042 /** 6043 * Resets navigation history for the current page. 6044 * 6045 * @return An instance of <CODE>{@link Script}<Void></CODE> 6046 * 6047 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6048 * browser receives the invocation-request. 6049 * 6050 * <BR /><BR /><DIV CLASS=JDHint> 6051 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6052 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6053 * the Browser Function has run to completion. 6054 * </DIV> 6055 */ 6056 public static Script<Void> resetNavigationHistory() 6057 { 6058 // Ultra-Simple Request JSON - Because this method has no parameters 6059 final String requestJSON = "{\"method\":\"Page.resetNavigationHistory\"}"; 6060 6061 return Script.NO_RET(Domains.Page, "resetNavigationHistory", requestJSON); 6062 } 6063 6064 /** 6065 * Acknowledges that a screencast frame has been received by the frontend. 6066 * 6067 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6068 * 6069 * @param sessionId Frame number. 6070 * 6071 * @return An instance of <CODE>{@link Script}<Void></CODE> 6072 * 6073 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6074 * browser receives the invocation-request. 6075 * 6076 * <BR /><BR /><DIV CLASS=JDHint> 6077 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6078 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6079 * the Browser Function has run to completion. 6080 * </DIV> 6081 */ 6082 public static Script<Void> screencastFrameAck(int sessionId) 6083 { 6084 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6085 final String requestJSON = WriteJSON.get 6086 (CDPTypes.PRIMITIVE_INT, "sessionId", false, "Page.screencastFrameAck", sessionId); 6087 6088 return Script.NO_RET(Domains.Page, "screencastFrameAck", requestJSON); 6089 } 6090 6091 /** 6092 * Searches for given string in resource content. 6093 * 6094 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6095 * 6096 * <BR /><BR /><DIV CLASS=JDHint> 6097 * 👍 Because of the sheer number of input parameters to this method, there is a 6098 * a {@link CommandBuilder} variant to this method which may be invoked instead. 6099 * 6100 * <BR /><BR /> 6101 * Please View: {@link #searchInResource()} 6102 * </DIV> 6103 * 6104 * @param frameId Frame id for resource to search in. 6105 * 6106 * @param url URL of the resource to search in. 6107 * 6108 * @param query String to search for. 6109 * 6110 * @param caseSensitive If true, search is case sensitive. 6111 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6112 * 6113 * @param isRegex If true, treats string parameter as regex. 6114 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6115 * 6116 * @return An instance of <CODE>{@link Script}<{@link Debugger.SearchMatch}[]></CODE> 6117 * 6118 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 6119 * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise} 6120 * <CODE><{@link Debugger.SearchMatch}[]></CODE> will be returned 6121 * 6122 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 6123 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 6124 * be retrieved.</I> 6125 * 6126 * <BR /><BR /><DIV CLASS=JDHint> 6127 * This Browser Function's {@code Promise} returns: 6128 * <CODE>{@link Debugger.SearchMatch}[] (<B>result</B>)</CODE> 6129 * <BR /> 6130 * List of search matches. 6131 * </DIV> 6132 */ 6133 public static Script<Debugger.SearchMatch[]> searchInResource 6134 (String frameId, String url, String query, Boolean caseSensitive, Boolean isRegex) 6135 { 6136 // Convert all Method Parameters into a JSON Request-Object (as a String) 6137 final String requestJSON = WriteJSON.get( 6138 Page$$Commands.searchInResource$$, "Page.searchInResource", 6139 frameId, url, query, caseSensitive, isRegex 6140 ); 6141 6142 return new Script<>( 6143 Domains.Page, "searchInResource", requestJSON, 6144 Page$$Commands::searchInResource, 6145 Debugger.SearchMatch[].class 6146 ); 6147 } 6148 6149 /** 6150 * Enable Chrome's experimental ad filter on all sites. 6151 * 6152 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6153 * 6154 * @param enabled Whether to block ads. 6155 * 6156 * @return An instance of <CODE>{@link Script}<Void></CODE> 6157 * 6158 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6159 * browser receives the invocation-request. 6160 * 6161 * <BR /><BR /><DIV CLASS=JDHint> 6162 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6163 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6164 * the Browser Function has run to completion. 6165 * </DIV> 6166 */ 6167 public static Script<Void> setAdBlockingEnabled(boolean enabled) 6168 { 6169 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6170 final String requestJSON = WriteJSON.get 6171 (CDPTypes.PRIMITIVE_BOOLEAN, "enabled", false, "Page.setAdBlockingEnabled", enabled); 6172 6173 return Script.NO_RET(Domains.Page, "setAdBlockingEnabled", requestJSON); 6174 } 6175 6176 /** 6177 * Enable page Content Security Policy by-passing. 6178 * 6179 * @param enabled Whether to bypass page CSP. 6180 * 6181 * @return An instance of <CODE>{@link Script}<Void></CODE> 6182 * 6183 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6184 * browser receives the invocation-request. 6185 * 6186 * <BR /><BR /><DIV CLASS=JDHint> 6187 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6188 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6189 * the Browser Function has run to completion. 6190 * </DIV> 6191 */ 6192 public static Script<Void> setBypassCSP(boolean enabled) 6193 { 6194 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6195 final String requestJSON = WriteJSON.get 6196 (CDPTypes.PRIMITIVE_BOOLEAN, "enabled", false, "Page.setBypassCSP", enabled); 6197 6198 return Script.NO_RET(Domains.Page, "setBypassCSP", requestJSON); 6199 } 6200 6201 /** 6202 * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, 6203 * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media 6204 * query results). 6205 * 6206 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 6207 * 6208 * <BR /><BR /><DIV CLASS=JDHint> 6209 * 👍 Because of the sheer number of input parameters to this method, there is a 6210 * a {@link CommandBuilder} variant to this method which may be invoked instead. 6211 * 6212 * <BR /><BR /> 6213 * Please View: {@link #setDeviceMetricsOverride()} 6214 * </DIV> 6215 * 6216 * @param width Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. 6217 * 6218 * @param height Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. 6219 * 6220 * @param deviceScaleFactor Overriding device scale factor value. 0 disables the override. 6221 * 6222 * @param mobile 6223 * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text 6224 * autosizing and more. 6225 * 6226 * @param scale Scale to apply to resulting view image. 6227 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6228 * 6229 * @param screenWidth Overriding screen width value in pixels (minimum 0, maximum 10000000). 6230 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6231 * 6232 * @param screenHeight Overriding screen height value in pixels (minimum 0, maximum 10000000). 6233 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6234 * 6235 * @param positionX Overriding view X position on screen in pixels (minimum 0, maximum 10000000). 6236 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6237 * 6238 * @param positionY Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). 6239 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6240 * 6241 * @param dontSetVisibleSize Do not set visible view size, rely upon explicit setVisibleSize call. 6242 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6243 * 6244 * @param screenOrientation Screen orientation override. 6245 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6246 * 6247 * @param viewport The viewport dimensions and scale. If not set, the override is cleared. 6248 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6249 * 6250 * @return An instance of <CODE>{@link Script}<Void></CODE> 6251 * 6252 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6253 * browser receives the invocation-request. 6254 * 6255 * <BR /><BR /><DIV CLASS=JDHint> 6256 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6257 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6258 * the Browser Function has run to completion. 6259 * </DIV> 6260 */ 6261 public static Script<Void> setDeviceMetricsOverride( 6262 int width, int height, Number deviceScaleFactor, boolean mobile, Number scale, 6263 Integer screenWidth, Integer screenHeight, Integer positionX, Integer positionY, 6264 Boolean dontSetVisibleSize, Emulation.ScreenOrientation screenOrientation, 6265 Viewport viewport 6266 ) 6267 { 6268 // Convert all Method Parameters into a JSON Request-Object (as a String) 6269 final String requestJSON = WriteJSON.get( 6270 Page$$Commands.setDeviceMetricsOverride$$, "Page.setDeviceMetricsOverride", 6271 width, height, deviceScaleFactor, mobile, scale, screenWidth, screenHeight, positionX, 6272 positionY, dontSetVisibleSize, screenOrientation, viewport 6273 ); 6274 6275 return Script.NO_RET(Domains.Page, "setDeviceMetricsOverride", requestJSON); 6276 } 6277 6278 /** 6279 * Overrides the Device Orientation. 6280 * 6281 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 6282 * 6283 * @param alpha Mock alpha 6284 * 6285 * @param beta Mock beta 6286 * 6287 * @param gamma Mock gamma 6288 * 6289 * @return An instance of <CODE>{@link Script}<Void></CODE> 6290 * 6291 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6292 * browser receives the invocation-request. 6293 * 6294 * <BR /><BR /><DIV CLASS=JDHint> 6295 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6296 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6297 * the Browser Function has run to completion. 6298 * </DIV> 6299 */ 6300 public static Script<Void> setDeviceOrientationOverride 6301 (Number alpha, Number beta, Number gamma) 6302 { 6303 // Convert all Method Parameters into a JSON Request-Object (as a String) 6304 final String requestJSON = WriteJSON.get( 6305 Page$$Commands.setDeviceOrientationOverride$$, "Page.setDeviceOrientationOverride", 6306 alpha, beta, gamma 6307 ); 6308 6309 return Script.NO_RET(Domains.Page, "setDeviceOrientationOverride", requestJSON); 6310 } 6311 6312 /** 6313 * Sets given markup as the document's HTML. 6314 * 6315 * @param frameId Frame id to set HTML for. 6316 * 6317 * @param html HTML content to set. 6318 * 6319 * @return An instance of <CODE>{@link Script}<Void></CODE> 6320 * 6321 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6322 * browser receives the invocation-request. 6323 * 6324 * <BR /><BR /><DIV CLASS=JDHint> 6325 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6326 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6327 * the Browser Function has run to completion. 6328 * </DIV> 6329 */ 6330 public static Script<Void> setDocumentContent(String frameId, String html) 6331 { 6332 // Convert all Method Parameters into a JSON Request-Object (as a String) 6333 final String requestJSON = WriteJSON.get( 6334 Page$$Commands.setDocumentContent$$, "Page.setDocumentContent", 6335 frameId, html 6336 ); 6337 6338 return Script.NO_RET(Domains.Page, "setDocumentContent", requestJSON); 6339 } 6340 6341 /** 6342 * Set the behavior when downloading a file. 6343 * 6344 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 6345 * 6346 * @param behavior 6347 * Whether to allow all or deny all download requests, or use default Chrome behavior if 6348 * available (otherwise deny). 6349 * <BR />Acceptable Values: ["allow", "default", "deny"] 6350 * 6351 * @param downloadPath The default path to save downloaded files to. This is required if behavior is set to 'allow' 6352 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6353 * 6354 * @return An instance of <CODE>{@link Script}<Void></CODE> 6355 * 6356 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6357 * browser receives the invocation-request. 6358 * 6359 * <BR /><BR /><DIV CLASS=JDHint> 6360 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6361 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6362 * the Browser Function has run to completion. 6363 * </DIV> 6364 */ 6365 public static Script<Void> setDownloadBehavior(String behavior, String downloadPath) 6366 { 6367 // Convert all Method Parameters into a JSON Request-Object (as a String) 6368 final String requestJSON = WriteJSON.get( 6369 Page$$Commands.setDownloadBehavior$$, "Page.setDownloadBehavior", 6370 behavior, downloadPath 6371 ); 6372 6373 return Script.NO_RET(Domains.Page, "setDownloadBehavior", requestJSON); 6374 } 6375 6376 /** 6377 * Set generic font families. 6378 * 6379 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6380 * 6381 * @param fontFamilies Specifies font families to set. If a font family is not specified, it won't be changed. 6382 * 6383 * @param forScripts Specifies font families to set for individual scripts. 6384 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6385 * 6386 * @return An instance of <CODE>{@link Script}<Void></CODE> 6387 * 6388 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6389 * browser receives the invocation-request. 6390 * 6391 * <BR /><BR /><DIV CLASS=JDHint> 6392 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6393 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6394 * the Browser Function has run to completion. 6395 * </DIV> 6396 */ 6397 public static Script<Void> setFontFamilies 6398 (FontFamilies fontFamilies, ScriptFontFamilies[] forScripts) 6399 { 6400 // Convert all Method Parameters into a JSON Request-Object (as a String) 6401 final String requestJSON = WriteJSON.get( 6402 Page$$Commands.setFontFamilies$$, "Page.setFontFamilies", 6403 fontFamilies, forScripts 6404 ); 6405 6406 return Script.NO_RET(Domains.Page, "setFontFamilies", requestJSON); 6407 } 6408 6409 /** 6410 * Set default font sizes. 6411 * 6412 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6413 * 6414 * @param fontSizes Specifies font sizes to set. If a font size is not specified, it won't be changed. 6415 * 6416 * @return An instance of <CODE>{@link Script}<Void></CODE> 6417 * 6418 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6419 * browser receives the invocation-request. 6420 * 6421 * <BR /><BR /><DIV CLASS=JDHint> 6422 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6423 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6424 * the Browser Function has run to completion. 6425 * </DIV> 6426 */ 6427 public static Script<Void> setFontSizes(FontSizes fontSizes) 6428 { 6429 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6430 final String requestJSON = WriteJSON.get 6431 (CDPTypes.CDP_TYPE, "fontSizes", false, "Page.setFontSizes", fontSizes); 6432 6433 return Script.NO_RET(Domains.Page, "setFontSizes", requestJSON); 6434 } 6435 6436 /** 6437 * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position 6438 * unavailable. 6439 * 6440 * <BR /><B CLASS=Dep-Top>DEPRECATED</B> 6441 * 6442 * @param latitude Mock latitude 6443 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6444 * 6445 * @param longitude Mock longitude 6446 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6447 * 6448 * @param accuracy Mock accuracy 6449 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6450 * 6451 * @return An instance of <CODE>{@link Script}<Void></CODE> 6452 * 6453 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6454 * browser receives the invocation-request. 6455 * 6456 * <BR /><BR /><DIV CLASS=JDHint> 6457 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6458 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6459 * the Browser Function has run to completion. 6460 * </DIV> 6461 */ 6462 public static Script<Void> setGeolocationOverride 6463 (Number latitude, Number longitude, Number accuracy) 6464 { 6465 // Convert all Method Parameters into a JSON Request-Object (as a String) 6466 final String requestJSON = WriteJSON.get( 6467 Page$$Commands.setGeolocationOverride$$, "Page.setGeolocationOverride", 6468 latitude, longitude, accuracy 6469 ); 6470 6471 return Script.NO_RET(Domains.Page, "setGeolocationOverride", requestJSON); 6472 } 6473 6474 /** 6475 * Intercept file chooser requests and transfer control to protocol clients. 6476 * When file chooser interception is enabled, native file chooser dialog is not shown. 6477 * Instead, a protocol event <CODE>Page.fileChooserOpened</CODE> is emitted. 6478 * 6479 * @param enabled - 6480 * 6481 * @param cancel 6482 * If true, cancels the dialog by emitting relevant events (if any) 6483 * in addition to not showing it if the interception is enabled 6484 * (default: false). 6485 * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B> 6486 * 6487 * @return An instance of <CODE>{@link Script}<Void></CODE> 6488 * 6489 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6490 * browser receives the invocation-request. 6491 * 6492 * <BR /><BR /><DIV CLASS=JDHint> 6493 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6494 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6495 * the Browser Function has run to completion. 6496 * </DIV> 6497 */ 6498 public static Script<Void> setInterceptFileChooserDialog(boolean enabled, Boolean cancel) 6499 { 6500 // Convert all Method Parameters into a JSON Request-Object (as a String) 6501 final String requestJSON = WriteJSON.get( 6502 Page$$Commands.setInterceptFileChooserDialog$$, "Page.setInterceptFileChooserDialog", 6503 enabled, cancel 6504 ); 6505 6506 return Script.NO_RET(Domains.Page, "setInterceptFileChooserDialog", requestJSON); 6507 } 6508 6509 /** 6510 * Controls whether page will emit lifecycle events. 6511 * 6512 * @param enabled If true, starts emitting lifecycle events. 6513 * 6514 * @return An instance of <CODE>{@link Script}<Void></CODE> 6515 * 6516 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6517 * browser receives the invocation-request. 6518 * 6519 * <BR /><BR /><DIV CLASS=JDHint> 6520 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6521 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6522 * the Browser Function has run to completion. 6523 * </DIV> 6524 */ 6525 public static Script<Void> setLifecycleEventsEnabled(boolean enabled) 6526 { 6527 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6528 final String requestJSON = WriteJSON.get( 6529 CDPTypes.PRIMITIVE_BOOLEAN, "enabled", false, "Page.setLifecycleEventsEnabled", 6530 enabled 6531 ); 6532 6533 return Script.NO_RET(Domains.Page, "setLifecycleEventsEnabled", requestJSON); 6534 } 6535 6536 /** 6537 * Enable/disable prerendering manually. 6538 * 6539 * This command is a short-term solution for https://crbug.com/1440085. 6540 * See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA 6541 * for more details. 6542 * 6543 * TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets. 6544 * 6545 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6546 * 6547 * @param isAllowed - 6548 * 6549 * @return An instance of <CODE>{@link Script}<Void></CODE> 6550 * 6551 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6552 * browser receives the invocation-request. 6553 * 6554 * <BR /><BR /><DIV CLASS=JDHint> 6555 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6556 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6557 * the Browser Function has run to completion. 6558 * </DIV> 6559 */ 6560 public static Script<Void> setPrerenderingAllowed(boolean isAllowed) 6561 { 6562 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6563 final String requestJSON = WriteJSON.get( 6564 CDPTypes.PRIMITIVE_BOOLEAN, "isAllowed", false, "Page.setPrerenderingAllowed", 6565 isAllowed 6566 ); 6567 6568 return Script.NO_RET(Domains.Page, "setPrerenderingAllowed", requestJSON); 6569 } 6570 6571 /** 6572 * Extensions for Custom Handlers API: 6573 * https://html.spec.whatwg.org/multipage/system-state.html#rph-automation 6574 * 6575 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6576 * 6577 * @param mode - 6578 * <BR />Acceptable Values: ["autoAccept", "autoReject", "none"] 6579 * 6580 * @return An instance of <CODE>{@link Script}<Void></CODE> 6581 * 6582 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6583 * browser receives the invocation-request. 6584 * 6585 * <BR /><BR /><DIV CLASS=JDHint> 6586 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6587 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6588 * the Browser Function has run to completion. 6589 * </DIV> 6590 */ 6591 public static Script<Void> setRPHRegistrationMode(String mode) 6592 { 6593 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6594 final String requestJSON = WriteJSON.get 6595 (CDPTypes.STRING, "mode", false, "Page.setRPHRegistrationMode", mode); 6596 6597 return Script.NO_RET(Domains.Page, "setRPHRegistrationMode", requestJSON); 6598 } 6599 6600 /** 6601 * Sets the Secure Payment Confirmation transaction mode. 6602 * https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode 6603 * 6604 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6605 * 6606 * @param mode - 6607 * <BR />Acceptable Values: ["autoAccept", "autoChooseToAuthAnotherWay", "autoOptOut", "autoReject", "none"] 6608 * 6609 * @return An instance of <CODE>{@link Script}<Void></CODE> 6610 * 6611 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6612 * browser receives the invocation-request. 6613 * 6614 * <BR /><BR /><DIV CLASS=JDHint> 6615 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6616 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6617 * the Browser Function has run to completion. 6618 * </DIV> 6619 */ 6620 public static Script<Void> setSPCTransactionMode(String mode) 6621 { 6622 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6623 final String requestJSON = WriteJSON.get 6624 (CDPTypes.STRING, "mode", false, "Page.setSPCTransactionMode", mode); 6625 6626 return Script.NO_RET(Domains.Page, "setSPCTransactionMode", requestJSON); 6627 } 6628 6629 /** 6630 * Toggles mouse event-based touch event emulation. 6631 * 6632 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B> 6633 * 6634 * @param enabled Whether the touch event emulation should be enabled. 6635 * 6636 * @param configuration Touch/gesture events configuration. Default: current platform. 6637 * <BR />Acceptable Values: ["desktop", "mobile"] 6638 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6639 * 6640 * @return An instance of <CODE>{@link Script}<Void></CODE> 6641 * 6642 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6643 * browser receives the invocation-request. 6644 * 6645 * <BR /><BR /><DIV CLASS=JDHint> 6646 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6647 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6648 * the Browser Function has run to completion. 6649 * </DIV> 6650 */ 6651 public static Script<Void> setTouchEmulationEnabled(boolean enabled, String configuration) 6652 { 6653 // Convert all Method Parameters into a JSON Request-Object (as a String) 6654 final String requestJSON = WriteJSON.get( 6655 Page$$Commands.setTouchEmulationEnabled$$, "Page.setTouchEmulationEnabled", 6656 enabled, configuration 6657 ); 6658 6659 return Script.NO_RET(Domains.Page, "setTouchEmulationEnabled", requestJSON); 6660 } 6661 6662 /** 6663 * Tries to update the web lifecycle state of the page. 6664 * It will transition the page to the given state according to: 6665 * https://github.com/WICG/web-lifecycle/ 6666 * 6667 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6668 * 6669 * @param state Target lifecycle state 6670 * <BR />Acceptable Values: ["active", "frozen"] 6671 * 6672 * @return An instance of <CODE>{@link Script}<Void></CODE> 6673 * 6674 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6675 * browser receives the invocation-request. 6676 * 6677 * <BR /><BR /><DIV CLASS=JDHint> 6678 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6679 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6680 * the Browser Function has run to completion. 6681 * </DIV> 6682 */ 6683 public static Script<Void> setWebLifecycleState(String state) 6684 { 6685 // Build the JSON Request-Object (as a String); only 1 Parameter is passed 6686 final String requestJSON = WriteJSON.get 6687 (CDPTypes.STRING, "state", false, "Page.setWebLifecycleState", state); 6688 6689 return Script.NO_RET(Domains.Page, "setWebLifecycleState", requestJSON); 6690 } 6691 6692 /** 6693 * Starts sending each frame using the <CODE>screencastFrame</CODE> event. 6694 * 6695 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6696 * 6697 * <BR /><BR /><DIV CLASS=JDHint> 6698 * 👍 Because of the sheer number of input parameters to this method, there is a 6699 * a {@link CommandBuilder} variant to this method which may be invoked instead. 6700 * 6701 * <BR /><BR /> 6702 * Please View: {@link #startScreencast()} 6703 * </DIV> 6704 * 6705 * @param format Image compression format. 6706 * <BR />Acceptable Values: ["jpeg", "png"] 6707 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6708 * 6709 * @param quality Compression quality from range [0..100]. 6710 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6711 * 6712 * @param maxWidth Maximum screenshot width. 6713 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6714 * 6715 * @param maxHeight Maximum screenshot height. 6716 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6717 * 6718 * @param everyNthFrame Send every n-th frame. 6719 * <BR /><B CLASS=Opt-Top>OPTIONAL</B> 6720 * 6721 * @return An instance of <CODE>{@link Script}<Void></CODE> 6722 * 6723 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6724 * browser receives the invocation-request. 6725 * 6726 * <BR /><BR /><DIV CLASS=JDHint> 6727 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6728 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6729 * the Browser Function has run to completion. 6730 * </DIV> 6731 */ 6732 public static Script<Void> startScreencast( 6733 String format, Integer quality, Integer maxWidth, Integer maxHeight, 6734 Integer everyNthFrame 6735 ) 6736 { 6737 // Convert all Method Parameters into a JSON Request-Object (as a String) 6738 final String requestJSON = WriteJSON.get( 6739 Page$$Commands.startScreencast$$, "Page.startScreencast", 6740 format, quality, maxWidth, maxHeight, everyNthFrame 6741 ); 6742 6743 return Script.NO_RET(Domains.Page, "startScreencast", requestJSON); 6744 } 6745 6746 /** 6747 * Force the page stop all navigations and pending resource fetches. 6748 * 6749 * @return An instance of <CODE>{@link Script}<Void></CODE> 6750 * 6751 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6752 * browser receives the invocation-request. 6753 * 6754 * <BR /><BR /><DIV CLASS=JDHint> 6755 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6756 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6757 * the Browser Function has run to completion. 6758 * </DIV> 6759 */ 6760 public static Script<Void> stopLoading() 6761 { 6762 // Ultra-Simple Request JSON - Because this method has no parameters 6763 final String requestJSON = "{\"method\":\"Page.stopLoading\"}"; 6764 6765 return Script.NO_RET(Domains.Page, "stopLoading", requestJSON); 6766 } 6767 6768 /** 6769 * Stops sending each frame in the <CODE>screencastFrame</CODE>. 6770 * 6771 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6772 * 6773 * @return An instance of <CODE>{@link Script}<Void></CODE> 6774 * 6775 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6776 * browser receives the invocation-request. 6777 * 6778 * <BR /><BR /><DIV CLASS=JDHint> 6779 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6780 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6781 * the Browser Function has run to completion. 6782 * </DIV> 6783 */ 6784 public static Script<Void> stopScreencast() 6785 { 6786 // Ultra-Simple Request JSON - Because this method has no parameters 6787 final String requestJSON = "{\"method\":\"Page.stopScreencast\"}"; 6788 6789 return Script.NO_RET(Domains.Page, "stopScreencast", requestJSON); 6790 } 6791 6792 /** 6793 * Pauses page execution. Can be resumed using generic RunTime.runIfWaitingForDebugger. 6794 * 6795 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6796 * 6797 * @return An instance of <CODE>{@link Script}<Void></CODE> 6798 * 6799 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6800 * browser receives the invocation-request. 6801 * 6802 * <BR /><BR /><DIV CLASS=JDHint> 6803 * This Browser-Function <I>does not have</I> a return-value. You may choose to 6804 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that 6805 * the Browser Function has run to completion. 6806 * </DIV> 6807 */ 6808 public static Script<Void> waitForDebugger() 6809 { 6810 // Ultra-Simple Request JSON - Because this method has no parameters 6811 final String requestJSON = "{\"method\":\"Page.waitForDebugger\"}"; 6812 6813 return Script.NO_RET(Domains.Page, "waitForDebugger", requestJSON); 6814 } 6815 6816 6817 // ******************************************************************************************** 6818 // ******************************************************************************************** 6819 // CommandBuilder Getter-Methods 6820 // ******************************************************************************************** 6821 // ******************************************************************************************** 6822 6823 6824 /** 6825 * Creates a buider for conveniently assigning parameters to this method. 6826 * 6827 * <BR /><BR /><DIV CLASS=JDHint> 6828 * Note that the original method expects 6 parameters, and can be cumbersome. 6829 * </DIV> 6830 * 6831 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 6832 * @see #captureScreenshot 6833 */ 6834 public static CommandBuilder<String> captureScreenshot() 6835 { return CommandBuilder.builder(Page$$Commands.captureScreenshot$$); } 6836 6837 /** 6838 * Creates a buider for conveniently assigning parameters to this method. 6839 * 6840 * <BR /><BR /><DIV CLASS=JDHint> 6841 * Note that the original method expects 5 parameters, and can be cumbersome. 6842 * </DIV> 6843 * 6844 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 6845 * @see #navigate 6846 */ 6847 public static CommandBuilder<navigate$$RET> navigate() 6848 { return CommandBuilder.builder(Page$$Commands.navigate$$); } 6849 6850 /** 6851 * Creates a buider for conveniently assigning parameters to this method. 6852 * 6853 * <BR /><BR /><DIV CLASS=JDHint> 6854 * Note that the original method expects 17 parameters, and can be cumbersome. 6855 * </DIV> 6856 * 6857 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 6858 * @see #printToPDF 6859 */ 6860 public static CommandBuilder<printToPDF$$RET> printToPDF() 6861 { return CommandBuilder.builder(Page$$Commands.printToPDF$$); } 6862 6863 /** 6864 * Creates a buider for conveniently assigning parameters to this method. 6865 * 6866 * <BR /><BR /><DIV CLASS=JDHint> 6867 * Note that the original method expects 5 parameters, and can be cumbersome. 6868 * </DIV> 6869 * 6870 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 6871 * @see #searchInResource 6872 */ 6873 public static CommandBuilder<Debugger.SearchMatch[]> searchInResource() 6874 { return CommandBuilder.builder(Page$$Commands.searchInResource$$); } 6875 6876 /** 6877 * Creates a buider for conveniently assigning parameters to this method. 6878 * 6879 * <BR /><BR /><DIV CLASS=JDHint> 6880 * Note that the original method expects 12 parameters, and can be cumbersome. 6881 * </DIV> 6882 * 6883 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 6884 * @see #setDeviceMetricsOverride 6885 */ 6886 public static CommandBuilder<Void> setDeviceMetricsOverride() 6887 { return CommandBuilder.builder(Page$$Commands.setDeviceMetricsOverride$$); } 6888 6889 /** 6890 * Creates a buider for conveniently assigning parameters to this method. 6891 * 6892 * <BR /><BR /><DIV CLASS=JDHint> 6893 * Note that the original method expects 5 parameters, and can be cumbersome. 6894 * </DIV> 6895 * 6896 * @return {@link CommandBuilder} instance, for assigning parameter values, one by one. 6897 * @see #startScreencast 6898 */ 6899 public static CommandBuilder<Void> startScreencast() 6900 { return CommandBuilder.builder(Page$$Commands.startScreencast$$); } 6901 6902 6903}