chromedp/cdp/util/util.go

1266 lines
30 KiB
Go
Raw Normal View History

2017-01-24 15:09:23 +00:00
package util
// AUTOGENERATED. DO NOT EDIT.
import (
"errors"
. "github.com/knq/chromedp/cdp"
"github.com/knq/chromedp/cdp/accessibility"
"github.com/knq/chromedp/cdp/animation"
"github.com/knq/chromedp/cdp/applicationcache"
"github.com/knq/chromedp/cdp/cachestorage"
"github.com/knq/chromedp/cdp/css"
"github.com/knq/chromedp/cdp/database"
"github.com/knq/chromedp/cdp/debugger"
"github.com/knq/chromedp/cdp/dom"
"github.com/knq/chromedp/cdp/domdebugger"
"github.com/knq/chromedp/cdp/domstorage"
"github.com/knq/chromedp/cdp/emulation"
"github.com/knq/chromedp/cdp/heapprofiler"
"github.com/knq/chromedp/cdp/indexeddb"
"github.com/knq/chromedp/cdp/inspector"
iodom "github.com/knq/chromedp/cdp/io"
"github.com/knq/chromedp/cdp/layertree"
logdom "github.com/knq/chromedp/cdp/log"
"github.com/knq/chromedp/cdp/memory"
"github.com/knq/chromedp/cdp/network"
"github.com/knq/chromedp/cdp/page"
"github.com/knq/chromedp/cdp/profiler"
"github.com/knq/chromedp/cdp/runtime"
"github.com/knq/chromedp/cdp/schema"
"github.com/knq/chromedp/cdp/security"
"github.com/knq/chromedp/cdp/serviceworker"
"github.com/knq/chromedp/cdp/systeminfo"
"github.com/knq/chromedp/cdp/target"
"github.com/knq/chromedp/cdp/tethering"
"github.com/knq/chromedp/cdp/tracing"
"github.com/mailru/easyjson"
)
type empty struct{}
var emptyVal = &empty{}
// UnmarshalMessage unmarshals the message result or params.
func UnmarshalMessage(msg *Message) (interface{}, error) {
var v easyjson.Unmarshaler
switch msg.Method {
case CommandInspectorEnable:
return emptyVal, nil
case CommandInspectorDisable:
return emptyVal, nil
case EventInspectorDetached:
v = new(inspector.EventDetached)
case EventInspectorTargetCrashed:
v = new(inspector.EventTargetCrashed)
case CommandMemoryGetDOMCounters:
v = new(memory.GetDOMCountersReturns)
case CommandMemorySetPressureNotificationsSuppressed:
return emptyVal, nil
case CommandMemorySimulatePressureNotification:
return emptyVal, nil
case CommandPageEnable:
return emptyVal, nil
case CommandPageDisable:
return emptyVal, nil
case CommandPageAddScriptToEvaluateOnLoad:
v = new(page.AddScriptToEvaluateOnLoadReturns)
case CommandPageRemoveScriptToEvaluateOnLoad:
return emptyVal, nil
case CommandPageSetAutoAttachToCreatedPages:
return emptyVal, nil
case CommandPageReload:
return emptyVal, nil
case CommandPageNavigate:
v = new(page.NavigateReturns)
case CommandPageStopLoading:
return emptyVal, nil
case CommandPageGetNavigationHistory:
v = new(page.GetNavigationHistoryReturns)
case CommandPageNavigateToHistoryEntry:
return emptyVal, nil
case CommandPageGetResourceTree:
v = new(page.GetResourceTreeReturns)
case CommandPageGetResourceContent:
v = new(page.GetResourceContentReturns)
case CommandPageSearchInResource:
v = new(page.SearchInResourceReturns)
case CommandPageSetDocumentContent:
return emptyVal, nil
case CommandPageCaptureScreenshot:
v = new(page.CaptureScreenshotReturns)
case CommandPageStartScreencast:
return emptyVal, nil
case CommandPageStopScreencast:
return emptyVal, nil
case CommandPageScreencastFrameAck:
return emptyVal, nil
case CommandPageHandleJavaScriptDialog:
return emptyVal, nil
case CommandPageSetColorPickerEnabled:
return emptyVal, nil
case CommandPageConfigureOverlay:
return emptyVal, nil
case CommandPageGetAppManifest:
v = new(page.GetAppManifestReturns)
case CommandPageRequestAppBanner:
return emptyVal, nil
case CommandPageSetControlNavigations:
return emptyVal, nil
case CommandPageProcessNavigation:
return emptyVal, nil
case CommandPageGetLayoutMetrics:
v = new(page.GetLayoutMetricsReturns)
case EventPageDomContentEventFired:
v = new(page.EventDomContentEventFired)
case EventPageLoadEventFired:
v = new(page.EventLoadEventFired)
case EventPageFrameAttached:
v = new(page.EventFrameAttached)
case EventPageFrameNavigated:
v = new(page.EventFrameNavigated)
case EventPageFrameDetached:
v = new(page.EventFrameDetached)
case EventPageFrameStartedLoading:
v = new(page.EventFrameStartedLoading)
case EventPageFrameStoppedLoading:
v = new(page.EventFrameStoppedLoading)
case EventPageFrameScheduledNavigation:
v = new(page.EventFrameScheduledNavigation)
case EventPageFrameClearedScheduledNavigation:
v = new(page.EventFrameClearedScheduledNavigation)
case EventPageFrameResized:
v = new(page.EventFrameResized)
case EventPageJavascriptDialogOpening:
v = new(page.EventJavascriptDialogOpening)
case EventPageJavascriptDialogClosed:
v = new(page.EventJavascriptDialogClosed)
case EventPageScreencastFrame:
v = new(page.EventScreencastFrame)
case EventPageScreencastVisibilityChanged:
v = new(page.EventScreencastVisibilityChanged)
case EventPageColorPicked:
v = new(page.EventColorPicked)
case EventPageInterstitialShown:
v = new(page.EventInterstitialShown)
case EventPageInterstitialHidden:
v = new(page.EventInterstitialHidden)
case EventPageNavigationRequested:
v = new(page.EventNavigationRequested)
case CommandRenderingSetShowPaintRects:
return emptyVal, nil
case CommandRenderingSetShowDebugBorders:
return emptyVal, nil
case CommandRenderingSetShowFPSCounter:
return emptyVal, nil
case CommandRenderingSetShowScrollBottleneckRects:
return emptyVal, nil
case CommandRenderingSetShowViewportSizeOnResize:
return emptyVal, nil
case CommandEmulationSetDeviceMetricsOverride:
return emptyVal, nil
case CommandEmulationClearDeviceMetricsOverride:
return emptyVal, nil
case CommandEmulationForceViewport:
return emptyVal, nil
case CommandEmulationResetViewport:
return emptyVal, nil
case CommandEmulationResetPageScaleFactor:
return emptyVal, nil
case CommandEmulationSetPageScaleFactor:
return emptyVal, nil
case CommandEmulationSetVisibleSize:
return emptyVal, nil
case CommandEmulationSetScriptExecutionDisabled:
return emptyVal, nil
case CommandEmulationSetGeolocationOverride:
return emptyVal, nil
case CommandEmulationClearGeolocationOverride:
return emptyVal, nil
case CommandEmulationSetTouchEmulationEnabled:
return emptyVal, nil
case CommandEmulationSetEmulatedMedia:
return emptyVal, nil
case CommandEmulationSetCPUThrottlingRate:
return emptyVal, nil
case CommandEmulationCanEmulate:
v = new(emulation.CanEmulateReturns)
case CommandEmulationSetVirtualTimePolicy:
return emptyVal, nil
case EventEmulationVirtualTimeBudgetExpired:
v = new(emulation.EventVirtualTimeBudgetExpired)
case CommandSecurityEnable:
return emptyVal, nil
case CommandSecurityDisable:
return emptyVal, nil
case CommandSecurityShowCertificateViewer:
return emptyVal, nil
case EventSecuritySecurityStateChanged:
v = new(security.EventSecurityStateChanged)
case CommandNetworkEnable:
return emptyVal, nil
case CommandNetworkDisable:
return emptyVal, nil
case CommandNetworkSetUserAgentOverride:
return emptyVal, nil
case CommandNetworkSetExtraHTTPHeaders:
return emptyVal, nil
case CommandNetworkGetResponseBody:
v = new(network.GetResponseBodyReturns)
case CommandNetworkAddBlockedURL:
return emptyVal, nil
case CommandNetworkRemoveBlockedURL:
return emptyVal, nil
case CommandNetworkReplayXHR:
return emptyVal, nil
case CommandNetworkSetMonitoringXHREnabled:
return emptyVal, nil
case CommandNetworkCanClearBrowserCache:
v = new(network.CanClearBrowserCacheReturns)
case CommandNetworkClearBrowserCache:
return emptyVal, nil
case CommandNetworkCanClearBrowserCookies:
v = new(network.CanClearBrowserCookiesReturns)
case CommandNetworkClearBrowserCookies:
return emptyVal, nil
case CommandNetworkGetCookies:
v = new(network.GetCookiesReturns)
case CommandNetworkGetAllCookies:
v = new(network.GetAllCookiesReturns)
case CommandNetworkDeleteCookie:
return emptyVal, nil
case CommandNetworkSetCookie:
v = new(network.SetCookieReturns)
case CommandNetworkCanEmulateNetworkConditions:
v = new(network.CanEmulateNetworkConditionsReturns)
case CommandNetworkEmulateNetworkConditions:
return emptyVal, nil
case CommandNetworkSetCacheDisabled:
return emptyVal, nil
case CommandNetworkSetBypassServiceWorker:
return emptyVal, nil
case CommandNetworkSetDataSizeLimitsForTest:
return emptyVal, nil
case CommandNetworkGetCertificate:
v = new(network.GetCertificateReturns)
case EventNetworkResourceChangedPriority:
v = new(network.EventResourceChangedPriority)
case EventNetworkRequestWillBeSent:
v = new(network.EventRequestWillBeSent)
case EventNetworkRequestServedFromCache:
v = new(network.EventRequestServedFromCache)
case EventNetworkResponseReceived:
v = new(network.EventResponseReceived)
case EventNetworkDataReceived:
v = new(network.EventDataReceived)
case EventNetworkLoadingFinished:
v = new(network.EventLoadingFinished)
case EventNetworkLoadingFailed:
v = new(network.EventLoadingFailed)
case EventNetworkWebSocketWillSendHandshakeRequest:
v = new(network.EventWebSocketWillSendHandshakeRequest)
case EventNetworkWebSocketHandshakeResponseReceived:
v = new(network.EventWebSocketHandshakeResponseReceived)
case EventNetworkWebSocketCreated:
v = new(network.EventWebSocketCreated)
case EventNetworkWebSocketClosed:
v = new(network.EventWebSocketClosed)
case EventNetworkWebSocketFrameReceived:
v = new(network.EventWebSocketFrameReceived)
case EventNetworkWebSocketFrameError:
v = new(network.EventWebSocketFrameError)
case EventNetworkWebSocketFrameSent:
v = new(network.EventWebSocketFrameSent)
case EventNetworkEventSourceMessageReceived:
v = new(network.EventEventSourceMessageReceived)
case CommandDatabaseEnable:
return emptyVal, nil
case CommandDatabaseDisable:
return emptyVal, nil
case CommandDatabaseGetDatabaseTableNames:
v = new(database.GetDatabaseTableNamesReturns)
case CommandDatabaseExecuteSQL:
v = new(database.ExecuteSQLReturns)
case EventDatabaseAddDatabase:
v = new(database.EventAddDatabase)
case CommandIndexedDBEnable:
return emptyVal, nil
case CommandIndexedDBDisable:
return emptyVal, nil
case CommandIndexedDBRequestDatabaseNames:
v = new(indexeddb.RequestDatabaseNamesReturns)
case CommandIndexedDBRequestDatabase:
v = new(indexeddb.RequestDatabaseReturns)
case CommandIndexedDBRequestData:
v = new(indexeddb.RequestDataReturns)
case CommandIndexedDBClearObjectStore:
return emptyVal, nil
case CommandCacheStorageRequestCacheNames:
v = new(cachestorage.RequestCacheNamesReturns)
case CommandCacheStorageRequestEntries:
v = new(cachestorage.RequestEntriesReturns)
case CommandCacheStorageDeleteCache:
return emptyVal, nil
case CommandCacheStorageDeleteEntry:
return emptyVal, nil
case CommandDOMStorageEnable:
return emptyVal, nil
case CommandDOMStorageDisable:
return emptyVal, nil
case CommandDOMStorageClear:
return emptyVal, nil
case CommandDOMStorageGetDOMStorageItems:
v = new(domstorage.GetDOMStorageItemsReturns)
case CommandDOMStorageSetDOMStorageItem:
return emptyVal, nil
case CommandDOMStorageRemoveDOMStorageItem:
return emptyVal, nil
case EventDOMStorageDomStorageItemsCleared:
v = new(domstorage.EventDomStorageItemsCleared)
case EventDOMStorageDomStorageItemRemoved:
v = new(domstorage.EventDomStorageItemRemoved)
case EventDOMStorageDomStorageItemAdded:
v = new(domstorage.EventDomStorageItemAdded)
case EventDOMStorageDomStorageItemUpdated:
v = new(domstorage.EventDomStorageItemUpdated)
case CommandApplicationCacheGetFramesWithManifests:
v = new(applicationcache.GetFramesWithManifestsReturns)
case CommandApplicationCacheEnable:
return emptyVal, nil
case CommandApplicationCacheGetManifestForFrame:
v = new(applicationcache.GetManifestForFrameReturns)
case CommandApplicationCacheGetApplicationCacheForFrame:
v = new(applicationcache.GetApplicationCacheForFrameReturns)
case EventApplicationCacheApplicationCacheStatusUpdated:
v = new(applicationcache.EventApplicationCacheStatusUpdated)
case EventApplicationCacheNetworkStateUpdated:
v = new(applicationcache.EventNetworkStateUpdated)
case CommandDOMEnable:
return emptyVal, nil
case CommandDOMDisable:
return emptyVal, nil
case CommandDOMGetDocument:
v = new(dom.GetDocumentReturns)
case CommandDOMCollectClassNamesFromSubtree:
v = new(dom.CollectClassNamesFromSubtreeReturns)
case CommandDOMRequestChildNodes:
return emptyVal, nil
case CommandDOMQuerySelector:
v = new(dom.QuerySelectorReturns)
case CommandDOMQuerySelectorAll:
v = new(dom.QuerySelectorAllReturns)
case CommandDOMSetNodeName:
v = new(dom.SetNodeNameReturns)
case CommandDOMSetNodeValue:
return emptyVal, nil
case CommandDOMRemoveNode:
return emptyVal, nil
case CommandDOMSetAttributeValue:
return emptyVal, nil
case CommandDOMSetAttributesAsText:
return emptyVal, nil
case CommandDOMRemoveAttribute:
return emptyVal, nil
case CommandDOMGetOuterHTML:
v = new(dom.GetOuterHTMLReturns)
case CommandDOMSetOuterHTML:
return emptyVal, nil
case CommandDOMPerformSearch:
v = new(dom.PerformSearchReturns)
case CommandDOMGetSearchResults:
v = new(dom.GetSearchResultsReturns)
case CommandDOMDiscardSearchResults:
return emptyVal, nil
case CommandDOMRequestNode:
v = new(dom.RequestNodeReturns)
case CommandDOMSetInspectMode:
return emptyVal, nil
case CommandDOMHighlightRect:
return emptyVal, nil
case CommandDOMHighlightQuad:
return emptyVal, nil
case CommandDOMHighlightNode:
return emptyVal, nil
case CommandDOMHideHighlight:
return emptyVal, nil
case CommandDOMHighlightFrame:
return emptyVal, nil
case CommandDOMPushNodeByPathToFrontend:
v = new(dom.PushNodeByPathToFrontendReturns)
case CommandDOMPushNodesByBackendIdsToFrontend:
v = new(dom.PushNodesByBackendIdsToFrontendReturns)
case CommandDOMSetInspectedNode:
return emptyVal, nil
case CommandDOMResolveNode:
v = new(dom.ResolveNodeReturns)
case CommandDOMGetAttributes:
v = new(dom.GetAttributesReturns)
case CommandDOMCopyTo:
v = new(dom.CopyToReturns)
case CommandDOMMoveTo:
v = new(dom.MoveToReturns)
case CommandDOMUndo:
return emptyVal, nil
case CommandDOMRedo:
return emptyVal, nil
case CommandDOMMarkUndoableState:
return emptyVal, nil
case CommandDOMFocus:
return emptyVal, nil
case CommandDOMSetFileInputFiles:
return emptyVal, nil
case CommandDOMGetBoxModel:
v = new(dom.GetBoxModelReturns)
case CommandDOMGetNodeForLocation:
v = new(dom.GetNodeForLocationReturns)
case CommandDOMGetRelayoutBoundary:
v = new(dom.GetRelayoutBoundaryReturns)
case CommandDOMGetHighlightObjectForTest:
v = new(dom.GetHighlightObjectForTestReturns)
case EventDOMDocumentUpdated:
v = new(dom.EventDocumentUpdated)
case EventDOMInspectNodeRequested:
v = new(dom.EventInspectNodeRequested)
case EventDOMSetChildNodes:
v = new(dom.EventSetChildNodes)
case EventDOMAttributeModified:
v = new(dom.EventAttributeModified)
case EventDOMAttributeRemoved:
v = new(dom.EventAttributeRemoved)
case EventDOMInlineStyleInvalidated:
v = new(dom.EventInlineStyleInvalidated)
case EventDOMCharacterDataModified:
v = new(dom.EventCharacterDataModified)
case EventDOMChildNodeCountUpdated:
v = new(dom.EventChildNodeCountUpdated)
case EventDOMChildNodeInserted:
v = new(dom.EventChildNodeInserted)
case EventDOMChildNodeRemoved:
v = new(dom.EventChildNodeRemoved)
case EventDOMShadowRootPushed:
v = new(dom.EventShadowRootPushed)
case EventDOMShadowRootPopped:
v = new(dom.EventShadowRootPopped)
case EventDOMPseudoElementAdded:
v = new(dom.EventPseudoElementAdded)
case EventDOMPseudoElementRemoved:
v = new(dom.EventPseudoElementRemoved)
case EventDOMDistributedNodesUpdated:
v = new(dom.EventDistributedNodesUpdated)
case EventDOMNodeHighlightRequested:
v = new(dom.EventNodeHighlightRequested)
case CommandCSSEnable:
return emptyVal, nil
case CommandCSSDisable:
return emptyVal, nil
case CommandCSSGetMatchedStylesForNode:
v = new(css.GetMatchedStylesForNodeReturns)
case CommandCSSGetInlineStylesForNode:
v = new(css.GetInlineStylesForNodeReturns)
case CommandCSSGetComputedStyleForNode:
v = new(css.GetComputedStyleForNodeReturns)
case CommandCSSGetPlatformFontsForNode:
v = new(css.GetPlatformFontsForNodeReturns)
case CommandCSSGetStyleSheetText:
v = new(css.GetStyleSheetTextReturns)
case CommandCSSCollectClassNames:
v = new(css.CollectClassNamesReturns)
case CommandCSSSetStyleSheetText:
v = new(css.SetStyleSheetTextReturns)
case CommandCSSSetRuleSelector:
v = new(css.SetRuleSelectorReturns)
case CommandCSSSetKeyframeKey:
v = new(css.SetKeyframeKeyReturns)
case CommandCSSSetStyleTexts:
v = new(css.SetStyleTextsReturns)
case CommandCSSSetMediaText:
v = new(css.SetMediaTextReturns)
case CommandCSSCreateStyleSheet:
v = new(css.CreateStyleSheetReturns)
case CommandCSSAddRule:
v = new(css.AddRuleReturns)
case CommandCSSForcePseudoState:
return emptyVal, nil
case CommandCSSGetMediaQueries:
v = new(css.GetMediaQueriesReturns)
case CommandCSSSetEffectivePropertyValueForNode:
return emptyVal, nil
case CommandCSSGetBackgroundColors:
v = new(css.GetBackgroundColorsReturns)
case CommandCSSGetLayoutTreeAndStyles:
v = new(css.GetLayoutTreeAndStylesReturns)
case CommandCSSStartRuleUsageTracking:
return emptyVal, nil
case CommandCSSStopRuleUsageTracking:
v = new(css.StopRuleUsageTrackingReturns)
case EventCSSMediaQueryResultChanged:
v = new(css.EventMediaQueryResultChanged)
case EventCSSFontsUpdated:
v = new(css.EventFontsUpdated)
case EventCSSStyleSheetChanged:
v = new(css.EventStyleSheetChanged)
case EventCSSStyleSheetAdded:
v = new(css.EventStyleSheetAdded)
case EventCSSStyleSheetRemoved:
v = new(css.EventStyleSheetRemoved)
case CommandIORead:
v = new(iodom.ReadReturns)
case CommandIOClose:
return emptyVal, nil
case CommandDOMDebuggerSetDOMBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerRemoveDOMBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerSetEventListenerBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerRemoveEventListenerBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerSetInstrumentationBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerRemoveInstrumentationBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerSetXHRBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerRemoveXHRBreakpoint:
return emptyVal, nil
case CommandDOMDebuggerGetEventListeners:
v = new(domdebugger.GetEventListenersReturns)
case CommandTargetSetDiscoverTargets:
return emptyVal, nil
case CommandTargetSetAutoAttach:
return emptyVal, nil
case CommandTargetSetAttachToFrames:
return emptyVal, nil
case CommandTargetSetRemoteLocations:
return emptyVal, nil
case CommandTargetSendMessageToTarget:
return emptyVal, nil
case CommandTargetGetTargetInfo:
v = new(target.GetTargetInfoReturns)
case CommandTargetActivateTarget:
return emptyVal, nil
case CommandTargetCloseTarget:
v = new(target.CloseTargetReturns)
case CommandTargetAttachToTarget:
v = new(target.AttachToTargetReturns)
case CommandTargetDetachFromTarget:
return emptyVal, nil
case CommandTargetCreateBrowserContext:
v = new(target.CreateBrowserContextReturns)
case CommandTargetDisposeBrowserContext:
v = new(target.DisposeBrowserContextReturns)
case CommandTargetCreateTarget:
v = new(target.CreateTargetReturns)
case CommandTargetGetTargets:
v = new(target.GetTargetsReturns)
case EventTargetTargetCreated:
v = new(target.EventTargetCreated)
case EventTargetTargetDestroyed:
v = new(target.EventTargetDestroyed)
case EventTargetAttachedToTarget:
v = new(target.EventAttachedToTarget)
case EventTargetDetachedFromTarget:
v = new(target.EventDetachedFromTarget)
case EventTargetReceivedMessageFromTarget:
v = new(target.EventReceivedMessageFromTarget)
case CommandServiceWorkerEnable:
return emptyVal, nil
case CommandServiceWorkerDisable:
return emptyVal, nil
case CommandServiceWorkerUnregister:
return emptyVal, nil
case CommandServiceWorkerUpdateRegistration:
return emptyVal, nil
case CommandServiceWorkerStartWorker:
return emptyVal, nil
case CommandServiceWorkerSkipWaiting:
return emptyVal, nil
case CommandServiceWorkerStopWorker:
return emptyVal, nil
case CommandServiceWorkerInspectWorker:
return emptyVal, nil
case CommandServiceWorkerSetForceUpdateOnPageLoad:
return emptyVal, nil
case CommandServiceWorkerDeliverPushMessage:
return emptyVal, nil
case CommandServiceWorkerDispatchSyncEvent:
return emptyVal, nil
case EventServiceWorkerWorkerRegistrationUpdated:
v = new(serviceworker.EventWorkerRegistrationUpdated)
case EventServiceWorkerWorkerVersionUpdated:
v = new(serviceworker.EventWorkerVersionUpdated)
case EventServiceWorkerWorkerErrorReported:
v = new(serviceworker.EventWorkerErrorReported)
case CommandInputDispatchKeyEvent:
return emptyVal, nil
case CommandInputDispatchMouseEvent:
return emptyVal, nil
case CommandInputDispatchTouchEvent:
return emptyVal, nil
case CommandInputEmulateTouchFromMouseEvent:
return emptyVal, nil
case CommandInputSynthesizePinchGesture:
return emptyVal, nil
case CommandInputSynthesizeScrollGesture:
return emptyVal, nil
case CommandInputSynthesizeTapGesture:
return emptyVal, nil
case CommandLayerTreeEnable:
return emptyVal, nil
case CommandLayerTreeDisable:
return emptyVal, nil
case CommandLayerTreeCompositingReasons:
v = new(layertree.CompositingReasonsReturns)
case CommandLayerTreeMakeSnapshot:
v = new(layertree.MakeSnapshotReturns)
case CommandLayerTreeLoadSnapshot:
v = new(layertree.LoadSnapshotReturns)
case CommandLayerTreeReleaseSnapshot:
return emptyVal, nil
case CommandLayerTreeProfileSnapshot:
v = new(layertree.ProfileSnapshotReturns)
case CommandLayerTreeReplaySnapshot:
v = new(layertree.ReplaySnapshotReturns)
case CommandLayerTreeSnapshotCommandLog:
v = new(layertree.SnapshotCommandLogReturns)
case EventLayerTreeLayerTreeDidChange:
v = new(layertree.EventLayerTreeDidChange)
case EventLayerTreeLayerPainted:
v = new(layertree.EventLayerPainted)
case CommandDeviceOrientationSetDeviceOrientationOverride:
return emptyVal, nil
case CommandDeviceOrientationClearDeviceOrientationOverride:
return emptyVal, nil
case CommandTracingStart:
return emptyVal, nil
case CommandTracingEnd:
return emptyVal, nil
case CommandTracingGetCategories:
v = new(tracing.GetCategoriesReturns)
case CommandTracingRequestMemoryDump:
v = new(tracing.RequestMemoryDumpReturns)
case CommandTracingRecordClockSyncMarker:
return emptyVal, nil
case EventTracingDataCollected:
v = new(tracing.EventDataCollected)
case EventTracingTracingComplete:
v = new(tracing.EventTracingComplete)
case EventTracingBufferUsage:
v = new(tracing.EventBufferUsage)
case CommandAnimationEnable:
return emptyVal, nil
case CommandAnimationDisable:
return emptyVal, nil
case CommandAnimationGetPlaybackRate:
v = new(animation.GetPlaybackRateReturns)
case CommandAnimationSetPlaybackRate:
return emptyVal, nil
case CommandAnimationGetCurrentTime:
v = new(animation.GetCurrentTimeReturns)
case CommandAnimationSetPaused:
return emptyVal, nil
case CommandAnimationSetTiming:
return emptyVal, nil
case CommandAnimationSeekAnimations:
return emptyVal, nil
case CommandAnimationReleaseAnimations:
return emptyVal, nil
case CommandAnimationResolveAnimation:
v = new(animation.ResolveAnimationReturns)
case EventAnimationAnimationCreated:
v = new(animation.EventAnimationCreated)
case EventAnimationAnimationStarted:
v = new(animation.EventAnimationStarted)
case EventAnimationAnimationCanceled:
v = new(animation.EventAnimationCanceled)
case CommandAccessibilityGetPartialAXTree:
v = new(accessibility.GetPartialAXTreeReturns)
case CommandStorageClearDataForOrigin:
return emptyVal, nil
case CommandLogEnable:
return emptyVal, nil
case CommandLogDisable:
return emptyVal, nil
case CommandLogClear:
return emptyVal, nil
case CommandLogStartViolationsReport:
return emptyVal, nil
case CommandLogStopViolationsReport:
return emptyVal, nil
case EventLogEntryAdded:
v = new(logdom.EventEntryAdded)
case CommandSystemInfoGetInfo:
v = new(systeminfo.GetInfoReturns)
case CommandTetheringBind:
return emptyVal, nil
case CommandTetheringUnbind:
return emptyVal, nil
case EventTetheringAccepted:
v = new(tethering.EventAccepted)
case CommandSchemaGetDomains:
v = new(schema.GetDomainsReturns)
case CommandRuntimeEvaluate:
v = new(runtime.EvaluateReturns)
case CommandRuntimeAwaitPromise:
v = new(runtime.AwaitPromiseReturns)
case CommandRuntimeCallFunctionOn:
v = new(runtime.CallFunctionOnReturns)
case CommandRuntimeGetProperties:
v = new(runtime.GetPropertiesReturns)
case CommandRuntimeReleaseObject:
return emptyVal, nil
case CommandRuntimeReleaseObjectGroup:
return emptyVal, nil
case CommandRuntimeRunIfWaitingForDebugger:
return emptyVal, nil
case CommandRuntimeEnable:
return emptyVal, nil
case CommandRuntimeDisable:
return emptyVal, nil
case CommandRuntimeDiscardConsoleEntries:
return emptyVal, nil
case CommandRuntimeSetCustomObjectFormatterEnabled:
return emptyVal, nil
case CommandRuntimeCompileScript:
v = new(runtime.CompileScriptReturns)
case CommandRuntimeRunScript:
v = new(runtime.RunScriptReturns)
case EventRuntimeExecutionContextCreated:
v = new(runtime.EventExecutionContextCreated)
case EventRuntimeExecutionContextDestroyed:
v = new(runtime.EventExecutionContextDestroyed)
case EventRuntimeExecutionContextsCleared:
v = new(runtime.EventExecutionContextsCleared)
case EventRuntimeExceptionThrown:
v = new(runtime.EventExceptionThrown)
case EventRuntimeExceptionRevoked:
v = new(runtime.EventExceptionRevoked)
case EventRuntimeConsoleAPICalled:
v = new(runtime.EventConsoleAPICalled)
case EventRuntimeInspectRequested:
v = new(runtime.EventInspectRequested)
case CommandDebuggerEnable:
return emptyVal, nil
case CommandDebuggerDisable:
return emptyVal, nil
case CommandDebuggerSetBreakpointsActive:
return emptyVal, nil
case CommandDebuggerSetSkipAllPauses:
return emptyVal, nil
case CommandDebuggerSetBreakpointByURL:
v = new(debugger.SetBreakpointByURLReturns)
case CommandDebuggerSetBreakpoint:
v = new(debugger.SetBreakpointReturns)
case CommandDebuggerRemoveBreakpoint:
return emptyVal, nil
case CommandDebuggerGetPossibleBreakpoints:
v = new(debugger.GetPossibleBreakpointsReturns)
case CommandDebuggerContinueToLocation:
return emptyVal, nil
case CommandDebuggerStepOver:
return emptyVal, nil
case CommandDebuggerStepInto:
return emptyVal, nil
case CommandDebuggerStepOut:
return emptyVal, nil
case CommandDebuggerPause:
return emptyVal, nil
case CommandDebuggerResume:
return emptyVal, nil
case CommandDebuggerSearchInContent:
v = new(debugger.SearchInContentReturns)
case CommandDebuggerSetScriptSource:
v = new(debugger.SetScriptSourceReturns)
case CommandDebuggerRestartFrame:
v = new(debugger.RestartFrameReturns)
case CommandDebuggerGetScriptSource:
v = new(debugger.GetScriptSourceReturns)
case CommandDebuggerSetPauseOnExceptions:
return emptyVal, nil
case CommandDebuggerEvaluateOnCallFrame:
v = new(debugger.EvaluateOnCallFrameReturns)
case CommandDebuggerSetVariableValue:
return emptyVal, nil
case CommandDebuggerSetAsyncCallStackDepth:
return emptyVal, nil
case CommandDebuggerSetBlackboxPatterns:
return emptyVal, nil
case CommandDebuggerSetBlackboxedRanges:
return emptyVal, nil
case EventDebuggerScriptParsed:
v = new(debugger.EventScriptParsed)
case EventDebuggerScriptFailedToParse:
v = new(debugger.EventScriptFailedToParse)
case EventDebuggerBreakpointResolved:
v = new(debugger.EventBreakpointResolved)
case EventDebuggerPaused:
v = new(debugger.EventPaused)
case EventDebuggerResumed:
v = new(debugger.EventResumed)
case CommandProfilerEnable:
return emptyVal, nil
case CommandProfilerDisable:
return emptyVal, nil
case CommandProfilerSetSamplingInterval:
return emptyVal, nil
case CommandProfilerStart:
return emptyVal, nil
case CommandProfilerStop:
v = new(profiler.StopReturns)
case EventProfilerConsoleProfileStarted:
v = new(profiler.EventConsoleProfileStarted)
case EventProfilerConsoleProfileFinished:
v = new(profiler.EventConsoleProfileFinished)
case CommandHeapProfilerEnable:
return emptyVal, nil
case CommandHeapProfilerDisable:
return emptyVal, nil
case CommandHeapProfilerStartTrackingHeapObjects:
return emptyVal, nil
case CommandHeapProfilerStopTrackingHeapObjects:
return emptyVal, nil
case CommandHeapProfilerTakeHeapSnapshot:
return emptyVal, nil
case CommandHeapProfilerCollectGarbage:
return emptyVal, nil
case CommandHeapProfilerGetObjectByHeapObjectID:
v = new(heapprofiler.GetObjectByHeapObjectIDReturns)
case CommandHeapProfilerAddInspectedHeapObject:
return emptyVal, nil
case CommandHeapProfilerGetHeapObjectID:
v = new(heapprofiler.GetHeapObjectIDReturns)
case CommandHeapProfilerStartSampling:
return emptyVal, nil
case CommandHeapProfilerStopSampling:
v = new(heapprofiler.StopSamplingReturns)
case EventHeapProfilerAddHeapSnapshotChunk:
v = new(heapprofiler.EventAddHeapSnapshotChunk)
case EventHeapProfilerResetProfiles:
v = new(heapprofiler.EventResetProfiles)
case EventHeapProfilerReportHeapSnapshotProgress:
v = new(heapprofiler.EventReportHeapSnapshotProgress)
case EventHeapProfilerLastSeenObjectID:
v = new(heapprofiler.EventLastSeenObjectID)
case EventHeapProfilerHeapStatsUpdate:
v = new(heapprofiler.EventHeapStatsUpdate)
}
var buf easyjson.RawMessage
switch {
case msg.Params != nil:
buf = msg.Params
case msg.Result != nil:
buf = msg.Result
default:
return nil, errors.New("msg missing params or result")
}
err := easyjson.Unmarshal(buf, v)
if err != nil {
return nil, err
}
return v, nil
}