5\5d55Q5\5vl5Hv55X5c5i5o5r5zv5*y5t535է555655555555 5!5u3575<5J5N5X5 `5i52o5u5x555585c55O5_5Yr5z555Ҝ55E6@g6gChCjCmCzpC rCrCuCkxDezD}D D DD D. D D D D D D8 D _ _*( _5 _5 8c 6 9cA7 :c9 ;c; =cy@ >cB dE dcJ d,K dL dN dO dO ddIP edլ fd gd xi yi zi# {i  |i[ }i ~i i i i! ig' iO. i 0 i4 iz8 i; i? iI i N iO iX iOa i7b ic ie ih ibi ik i9m io iq i1r is iCu iv iRx i{ iS} i( iǎ iِ i i i i i i i{ iQ i& i iڙ i͚ iL i i+ i i۪ i i iZ i/ i iٯ i i iv i6 i i i i in iC i i% i i i i iT i i i iO i i i i i i i k k kE k k k k k kD k k k. k  k k k kY k) kW k k k kj k k kc k kZ k k kJ k k kc" k# k) k- kf. k. ki/ k/ k0 k 1 k?2 k3 k4 kh6 k7 k8 k: k< k> k3A kC kD k:F kG k~H kI k[I kI k5J kJ kK kK kK k[L lL l M lyM lM l4N lN lO l_O lO l7P lP lP lCQ lQ lQ l&R lR S iiiiisitiuitiuitisiii|i|iiiiiiii|iiiiifkPNG  IHDRa%IDATxb:)(LL<'UTCQdF`Zl|n7}p{/&Go~qr)AqN?eE5[zvv֏q>; rZ$J_r7I%h; _j_\!^t^V:o]o&  ˛OtP3qɮ*{9 1`i.C W.8jQ54އ#1F 4l

$i18n{message}

$i18n{message}

$i18n{fileName}

$i18n{message}

// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the app API. var appNatives = requireNative('app'); var process = requireNative('process'); var extensionId = process.GetExtensionId(); var logActivity = requireNative('activityLogger'); function wrapForLogging(fun) { if (!extensionId) return fun; // nothing interesting to log without an extension return function() { // TODO(ataly): We need to make sure we use the right prototype for // fun.apply. Array slice can either be rewritten or similarly defined. logActivity.LogAPICall(extensionId, "app." + fun.name, $Array.slice(arguments)); return $Function.apply(fun, this, arguments); }; } // This becomes chrome.app var app = { getIsInstalled: wrapForLogging(appNatives.GetIsInstalled), getDetails: wrapForLogging(appNatives.GetDetails), runningState: wrapForLogging(appNatives.GetRunningState) }; // Tricky; "getIsInstalled" is actually exposed as the getter "isInstalled", // but we don't have a way to express this in the schema JSON (nor is it // worth it for this one special case). // // So, define it manually, and let the getIsInstalled function act as its // documentation. var isInstalled = wrapForLogging(appNatives.GetIsInstalled); $Object.defineProperty( app, 'isInstalled', { __proto__: null, configurable: true, enumerable: true, get: function() { return isInstalled(); }, }); // Called by app_bindings.cc. function onInstallStateResponse(state, callbackId) { var callback = callbacks[callbackId]; delete callbacks[callbackId]; if (typeof callback == 'function') { try { callback(state); } catch (e) { console.error('Exception in chrome.app.installState response handler: ' + e.stack); } } } // TODO(kalman): move this stuff to its own custom bindings. var callbacks = { __proto__: null }; var nextCallbackId = 1; function getInstallState(callback) { var callbackId = nextCallbackId++; callbacks[callbackId] = callback; appNatives.GetInstallState(callbackId); } $Object.defineProperty( app, 'installState', { __proto__: null, configurable: true, enumerable: true, value: wrapForLogging(getInstallState), writable: true, }); exports.$set('binding', app); exports.$set('onInstallStateResponse', onInstallStateResponse); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom bindings for the automation API. var AutomationNode = require('automationNode').AutomationNode; var AutomationRootNode = require('automationNode').AutomationRootNode; var automation = apiBridge || require('binding').Binding.create('automation'); var automationInternal = getInternalApi ? getInternalApi('automationInternal') : require('binding').Binding.create('automationInternal').generate(); var exceptionHandler = require('uncaught_exception_handler'); var logging = requireNative('logging'); var nativeAutomationInternal = requireNative('automationInternal'); var DestroyAccessibilityTree = nativeAutomationInternal.DestroyAccessibilityTree; var GetIntAttribute = nativeAutomationInternal.GetIntAttribute; var StartCachingAccessibilityTrees = nativeAutomationInternal.StartCachingAccessibilityTrees; var AddTreeChangeObserver = nativeAutomationInternal.AddTreeChangeObserver; var RemoveTreeChangeObserver = nativeAutomationInternal.RemoveTreeChangeObserver; var GetFocusNative = nativeAutomationInternal.GetFocus; var jsLastError = bindingUtil ? undefined : require('lastError'); function hasLastError() { return bindingUtil ? bindingUtil.hasLastError() : jsLastError.hasError(chrome); } /** * A namespace to export utility functions to other files in automation. */ window.automationUtil = function() {}; // TODO(aboxhall): Look into using WeakMap var idToCallback = {}; var desktopId = undefined; automationUtil.storeTreeCallback = function(id, callback) { if (!callback) return; var targetTree = AutomationRootNode.get(id); if (!targetTree) { // If we haven't cached the tree, hold the callback until the tree is // populated by the initial onAccessibilityEvent call. if (id in idToCallback) idToCallback[id].push(callback); else idToCallback[id] = [callback]; } else { callback(targetTree); } }; /** * Global list of tree change observers. * @type {Object} */ automationUtil.treeChangeObserverMap = {}; /** * The id of the next tree change observer. * @type {number} */ automationUtil.nextTreeChangeObserverId = 1; /** * @type {AutomationNode} The current focused node. This is only updated * when calling automationUtil.updateFocusedNode. */ automationUtil.focusedNode = null; /** * Gets the currently focused AutomationNode. * @return {AutomationNode} */ automationUtil.getFocus = function() { if (desktopId === undefined) return; var focusedNodeInfo = GetFocusNative(desktopId); if (!focusedNodeInfo) return null; var tree = AutomationRootNode.getOrCreate(focusedNodeInfo.treeId); if (tree) return privates(tree).impl.get(focusedNodeInfo.nodeId); }; /** * Update automationUtil.focusedNode to be the node that currently has focus. */ automationUtil.updateFocusedNode = function() { automationUtil.focusedNode = automationUtil.getFocus(); }; /** * Updates the focus on blur. */ automationUtil.updateFocusedNodeOnBlur = function() { var focus = automationUtil.getFocus(); automationUtil.focusedNode = focus ? focus.root : null; }; automation.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; // TODO(aboxhall, dtseng): Make this return the speced AutomationRootNode obj. apiFunctions.setHandleRequest('getTree', function getTree(tabID, callback) { StartCachingAccessibilityTrees(); // enableTab() ensures the renderer for the active or specified tab has // accessibility enabled, and fetches its ax tree id to use as // a key in the idToAutomationRootNode map. The callback to // enableTab is bound to the callback passed in to getTree(), so that once // the tree is available (either due to having been cached earlier, or after // an accessibility event occurs which causes the tree to be populated), the // callback can be called. var params = { tabID: tabID }; automationInternal.enableTab(params, function onEnable(id) { if (hasLastError()) { callback(); return; } automationUtil.storeTreeCallback(id, callback); }); }); var desktopTree = null; apiFunctions.setHandleRequest('getDesktop', function(callback) { StartCachingAccessibilityTrees(); if (desktopId !== undefined) desktopTree = AutomationRootNode.get(desktopId); if (!desktopTree) { automationInternal.enableDesktop(function(treeId) { if (hasLastError()) { AutomationRootNode.destroy(treeId); desktopId = undefined; callback(); return; } desktopId = treeId; desktopTree = AutomationRootNode.getOrCreate(desktopId); callback(desktopTree); // TODO(dtseng): Disable desktop tree once desktop object goes out of // scope. }); } else { callback(desktopTree); } }); apiFunctions.setHandleRequest('getFocus', function(callback) { callback(automationUtil.getFocus()); }); function removeTreeChangeObserver(observer) { for (var id in automationUtil.treeChangeObserverMap) { if (automationUtil.treeChangeObserverMap[id] == observer) { RemoveTreeChangeObserver(id); delete automationUtil.treeChangeObserverMap[id]; return; } } } apiFunctions.setHandleRequest('removeTreeChangeObserver', function(observer) { removeTreeChangeObserver(observer); }); function addTreeChangeObserver(filter, observer) { removeTreeChangeObserver(observer); var id = automationUtil.nextTreeChangeObserverId++; AddTreeChangeObserver(id, filter); automationUtil.treeChangeObserverMap[id] = observer; } apiFunctions.setHandleRequest('addTreeChangeObserver', function(filter, observer) { addTreeChangeObserver(filter, observer); }); apiFunctions.setHandleRequest('setDocumentSelection', function(params) { var anchorNodeImpl = privates(params.anchorObject).impl; var focusNodeImpl = privates(params.focusObject).impl; if (anchorNodeImpl.treeID !== focusNodeImpl.treeID) throw new Error('Selection anchor and focus must be in the same tree.'); if (anchorNodeImpl.treeID === desktopId) { throw new Error('Use AutomationNode.setSelection to set the selection ' + 'in the desktop tree.'); } automationInternal.performAction({ treeID: anchorNodeImpl.treeID, automationNodeID: anchorNodeImpl.id, actionType: 'setSelection'}, { focusNodeID: focusNodeImpl.id, anchorOffset: params.anchorOffset, focusOffset: params.focusOffset }); }); }); automationInternal.onChildTreeID.addListener(function(childTreeId) { var targetTree = AutomationRootNode.get(childTreeId); // If the tree is already loded, or if we previously requested it be loaded // (i.e. have a callback for it), don't try to do so again. if (targetTree || idToCallback[childTreeId]) return; // A WebView in the desktop tree has a different AX tree as its child. // When we encounter a WebView with a child AX tree id that we don't // currently have cached, explicitly request that AX tree from the // browser process and set up a callback when it loads to attach that // tree as a child of this node and fire appropriate events. automationUtil.storeTreeCallback(childTreeId, function(root) { privates(root).impl.dispatchEvent('loadComplete', 'page'); }, true); automationInternal.enableFrame(childTreeId); }); automationInternal.onTreeChange.addListener(function(observerID, treeID, nodeID, changeType) { var tree = AutomationRootNode.getOrCreate(treeID); if (!tree) return; var node = privates(tree).impl.get(nodeID); if (!node) return; var observer = automationUtil.treeChangeObserverMap[observerID]; if (!observer) return; try { observer({target: node, type: changeType}); } catch (e) { exceptionHandler.handle('Error in tree change observer for ' + changeType, e); } }); automationInternal.onNodesRemoved.addListener(function(treeID, nodeIDs) { var tree = AutomationRootNode.getOrCreate(treeID); if (!tree) return; for (var i = 0; i < nodeIDs.length; i++) { privates(tree).impl.remove(nodeIDs[i]); } }); /** * Dispatch accessibility events fired on individual nodes to its * corresponding AutomationNode. Handle focus events specially * (see below). */ automationInternal.onAccessibilityEvent.addListener(function(eventParams) { var id = eventParams.treeID; var targetTree = AutomationRootNode.getOrCreate(id); if (eventParams.eventType == 'blur') { // Work around an issue where Chrome sends us 'blur' events on the // root node when nothing has focus, we need to treat those as focus // events but otherwise not handle blur events specially. var node = privates(targetTree).impl.get(eventParams.targetID); if (!node) return; if (node == node.root) automationUtil.updateFocusedNodeOnBlur(); } else if (eventParams.eventType == 'mediaStartedPlaying' || eventParams.eventType == 'mediaStoppedPlaying') { // These events are global to the tree. eventParams.targetID = privates(targetTree).impl.id; } else { var previousFocusedNode = automationUtil.focusedNode; automationUtil.updateFocusedNode(); // Fire focus events if necessary. if (automationUtil.focusedNode && automationUtil.focusedNode != previousFocusedNode) { var eventParamsCopy = {}; for (var key in eventParams) eventParamsCopy[key] = eventParams[key]; eventParamsCopy['eventType'] = 'focus'; eventParamsCopy['treeID'] = privates(automationUtil.focusedNode.root).impl.treeID; eventParamsCopy['targetID'] = privates(automationUtil.focusedNode).impl.id; privates(automationUtil.focusedNode.root) .impl.onAccessibilityEvent(eventParamsCopy); } } // Note that focus type events have already been handled above if there was a // focused node. All other events, even non-focus events that triggered a // focus dispatch, still need to have their original event fired. if ((!automationUtil.focusedNode || eventParams.eventType != 'focus') && !privates(targetTree).impl.onAccessibilityEvent(eventParams)) return; // If we're not waiting on a callback to getTree(), we can early out here. if (!(id in idToCallback)) return; // We usually get a 'placeholder' tree first, which doesn't have any url // attribute or child nodes. If we've got that, wait for the full tree before // calling the callback. // TODO(dmazzoni): Don't send down placeholder (crbug.com/397553) if (id != desktopId && !targetTree.url && targetTree.children.length == 0) return; // If the tree wasn't available when getTree() was called, the callback will // have been cached in idToCallback, so call and delete it now that we // have the complete tree. for (var i = 0; i < idToCallback[id].length; i++) { var callback = idToCallback[id][i]; callback(targetTree); } delete idToCallback[id]; }); automationInternal.onAccessibilityTreeDestroyed.addListener(function(id) { // Destroy the AutomationRootNode. var targetTree = AutomationRootNode.get(id); if (targetTree) { privates(targetTree).impl.destroy(); AutomationRootNode.destroy(id); } else { logging.WARNING('no targetTree to destroy'); } // Destroy the native cache of the accessibility tree. DestroyAccessibilityTree(id); }); automationInternal.onAccessibilityTreeSerializationError.addListener( function(id) { automationInternal.enableFrame(id); }); automationInternal.onActionResult.addListener(function( treeID, requestID, result) { var targetTree = AutomationRootNode.get(treeID); if (!targetTree) return; privates(targetTree).impl.onActionResult(requestID, result); }); automationInternal.onGetTextLocationResult.addListener(function( textLocationParams) { var targetTree = AutomationRootNode.get(textLocationParams.treeID); if (!targetTree) return; privates(targetTree).impl.onGetTextLocationResult(textLocationParams); }); if (!apiBridge) exports.$set('binding', automation.generate()); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var utils = require('utils'); function AutomationEventImpl(type, target, eventFrom) { this.propagationStopped = false; this.type = type; this.target = target; this.eventPhase = Event.NONE; this.eventFrom = eventFrom; } AutomationEventImpl.prototype = { __proto__: null, stopPropagation: function() { this.propagationStopped = true; }, }; function AutomationEvent() { privates(AutomationEvent).constructPrivate(this, arguments); } utils.expose(AutomationEvent, AutomationEventImpl, { functions: [ 'stopPropagation', ], readonly: [ 'type', 'target', 'eventPhase', 'eventFrom', ], }); exports.$set('AutomationEvent', AutomationEvent); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var AutomationEvent = require('automationEvent').AutomationEvent; var automationInternal = getInternalApi ? getInternalApi('automationInternal') : require('binding').Binding.create('automationInternal').generate(); var exceptionHandler = require('uncaught_exception_handler'); var natives = requireNative('automationInternal'); var IsInteractPermitted = natives.IsInteractPermitted; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?number} The id of the root node. */ var GetRootID = natives.GetRootID; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?string} The title of the document. */ var GetDocTitle = natives.GetDocTitle; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?string} The url of the document. */ var GetDocURL = natives.GetDocURL; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?boolean} True if the document has finished loading. */ var GetDocLoaded = natives.GetDocLoaded; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?number} The loading progress, from 0.0 to 1.0 (fully loaded). */ var GetDocLoadingProgress = natives.GetDocLoadingProgress; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?number} The ID of the selection anchor object. */ var GetAnchorObjectID = natives.GetAnchorObjectID; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?number} The selection anchor offset. */ var GetAnchorOffset = natives.GetAnchorOffset; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?string} The selection anchor affinity. */ var GetAnchorAffinity = natives.GetAnchorAffinity; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?number} The ID of the selection focus object. */ var GetFocusObjectID = natives.GetFocusObjectID; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?number} The selection focus offset. */ var GetFocusOffset = natives.GetFocusOffset; /** * @param {string} axTreeID The id of the accessibility tree. * @return {?string} The selection focus affinity. */ var GetFocusAffinity = natives.GetFocusAffinity; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?number} The id of the node's parent, or undefined if it's the * root of its tree or if the tree or node wasn't found. */ var GetParentID = natives.GetParentID; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?number} The number of children of the node, or undefined if * the tree or node wasn't found. */ var GetChildCount = natives.GetChildCount; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {number} childIndex An index of a child of this node. * @return {?number} The id of the child at the given index, or undefined * if the tree or node or child at that index wasn't found. */ var GetChildIDAtIndex = natives.GetChildIDAtIndex; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?number} The ids of the children of the node, or undefined * if the tree or node wasn't found. */ var GetChildIds = natives.GetChildIDs; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?Object} An object mapping html attributes to values. */ var GetHtmlAttributes = natives.GetHtmlAttributes; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?number} The index of this node in its parent, or undefined if * the tree or node or node parent wasn't found. */ var GetIndexInParent = natives.GetIndexInParent; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?Object} An object with a string key for every state flag set, * or undefined if the tree or node or node parent wasn't found. */ var GetState = natives.GetState; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {string} The restriction, one of * "disabled", "readOnly" or undefined if enabled or other object not disabled */ var GetRestriction = natives.GetRestriction; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {string} The checked state, as undefined, "true", "false" or "mixed". */ var GetChecked = natives.GetChecked; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {string} The role of the node, or undefined if the tree or * node wasn't found. */ var GetRole = natives.GetRole; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?automation.Rect} The location of the node, or undefined if * the tree or node wasn't found. */ var GetLocation = natives.GetLocation; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {number} startIndex The start index of the range. * @param {number} endIndex The end index of the range. * @return {?automation.Rect} The bounding box of the subrange of this node, * or the location if there are no subranges, or undefined if * the tree or node wasn't found. */ var GetBoundsForRange = natives.GetBoundsForRange; /** * @param {number} left The left location of the text range. * @param {number} top The top location of the text range. * @param {number} width The width of text range. * @param {number} height The height of the text range. * @param {number} requestID The request id associated with the query * for this range. * @return {?automation.Rect} The bounding box of the subrange of this node, * specified by arguments provided to the function. */ var ComputeGlobalBounds = natives.ComputeGlobalBounds; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?automation.Rect} The unclipped location of the node, or * undefined if the tree or node wasn't found. */ var GetUnclippedLocation = natives.GetUnclippedLocation; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {!Array} The text offset where each line starts, or an empty * array if this node has no text content, or undefined if the tree or node * was not found. */ var GetLineStartOffsets = requireNative( 'automationInternal').GetLineStartOffsets; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of a string attribute. * @return {?string} The value of this attribute, or undefined if the tree, * node, or attribute wasn't found. */ var GetStringAttribute = natives.GetStringAttribute; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of an attribute. * @return {?boolean} The value of this attribute, or undefined if the tree, * node, or attribute wasn't found. */ var GetBoolAttribute = natives.GetBoolAttribute; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of an attribute. * @return {?number} The value of this attribute, or undefined if the tree, * node, or attribute wasn't found. */ var GetIntAttribute = natives.GetIntAttribute; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of an attribute. * @return {?Array} The ids of nodes who have a relationship pointing * to |nodeID| (a reverse relationship). */ var GetIntAttributeReverseRelations = natives.GetIntAttributeReverseRelations; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of an attribute. * @return {?number} The value of this attribute, or undefined if the tree, * node, or attribute wasn't found. */ var GetFloatAttribute = natives.GetFloatAttribute; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of an attribute. * @return {?Array} The value of this attribute, or undefined * if the tree, node, or attribute wasn't found. */ var GetIntListAttribute = natives.GetIntListAttribute; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of an attribute. * @return {?Array} The ids of nodes who have a relationship pointing * to |nodeID| (a reverse relationship). */ var GetIntListAttributeReverseRelations = natives.GetIntListAttributeReverseRelations; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} attr The name of an HTML attribute. * @return {?string} The value of this attribute, or undefined if the tree, * node, or attribute wasn't found. */ var GetHtmlAttribute = natives.GetHtmlAttribute; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {automation.NameFromType} The source of the node's name. */ var GetNameFrom = natives.GetNameFrom; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?string} The image annotation status, which may * include the annotation itself if completed successfully. */ var GetImageAnnotation = natives.GetImageAnnotation; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {boolean} */ var GetBold = natives.GetBold; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {boolean} */ var GetItalic = natives.GetItalic; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {boolean} */ var GetUnderline = natives.GetUnderline; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {boolean} */ var GetLineThrough = natives.GetLineThrough; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?Array} List of custom actions of the * node. */ var GetCustomActions = natives.GetCustomActions; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?Array} List of standard actions of the node. */ var GetStandardActions = natives.GetStandardActions; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {automation.NameFromType} The source of the node's name. */ var GetDefaultActionVerb = natives.GetDefaultActionVerb; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @param {string} searchStr * @param {boolean} backward * @return {{treeId: string, nodeId: number}} */ var GetNextTextMatch = natives.GetNextTextMatch; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?Array} A list of column header ids. * @return {?number} The id of the column header, if it exists. */ var GetTableCellColumnHeaders = natives.GetTableCellColumnHeaders; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {?Array} A list of row header ids. */ var GetTableCellRowHeaders = natives.GetTableCellRowHeaders; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {number} Column index for this cell. */ var GetTableCellColumnIndex = natives.GetTableCellColumnIndex; /** * @param {string} axTreeID The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {number} Row index for this cell. */ var GetTableCellRowIndex = natives.GetTableCellRowIndex; /** * @param {string} axTreeId The id of the accessibility tree. * @param {number} nodeID The id of a node. * @return {string} Detected language for this node. */ var GetDetectedLanguage = natives.GetDetectedLanguage; var logging = requireNative('logging'); var utils = require('utils'); /** * A single node in the Automation tree. * @param {AutomationRootNodeImpl} root The root of the tree. * @constructor */ function AutomationNodeImpl(root) { this.rootImpl = root; this.listeners = {__proto__: null}; } AutomationNodeImpl.prototype = { __proto__: null, treeID: '', id: -1, isRootNode: false, detach: function() { this.rootImpl = null; this.listeners = {__proto__: null}; }, get root() { return this.rootImpl && this.rootImpl.wrapper; }, get parent() { var info = GetParentID(this.treeID, this.id); if (!info) return; return AutomationRootNodeImpl.getNodeFromTree(info.treeId, info.nodeId); }, get htmlAttributes() { return GetHtmlAttributes(this.treeID, this.id) || {}; }, get state() { return GetState(this.treeID, this.id) || {}; }, get role() { return GetRole(this.treeID, this.id); }, get restriction() { return GetRestriction(this.treeID, this.id); }, get checked() { return GetChecked(this.treeID, this.id); }, get location() { return GetLocation(this.treeID, this.id); }, boundsForRange: function(startIndex, endIndex, callback) { if (!this.rootImpl) return; // Not yet initialized. if (this.rootImpl.treeID === undefined || this.id === undefined) { return; } if (!callback) return; if (!GetBoolAttribute(this.treeID, this.id, 'supportsTextLocation')) { try { callback( GetBoundsForRange(this.treeID, this.id, startIndex, endIndex)); return; } catch (e) { logging.WARNING('Error with bounds for range callback' + e); } return; } this.performAction_( 'getTextLocation', {startIndex: startIndex, endIndex: endIndex}, callback); return; }, get unclippedLocation() { var result = GetUnclippedLocation(this.treeID, this.id); if (result === undefined) result = GetLocation(this.treeID, this.id); return result; }, get indexInParent() { return GetIndexInParent(this.treeID, this.id); }, get lineStartOffsets() { return GetLineStartOffsets(this.treeID, this.id); }, get childTree() { var childTreeID = GetStringAttribute(this.treeID, this.id, 'childTreeId'); if (childTreeID) return AutomationRootNodeImpl.get(childTreeID); }, get firstChild() { if (GetChildCount(this.treeID, this.id) == 0) return undefined; var info = GetChildIDAtIndex(this.treeID, this.id, 0); if (info) return AutomationRootNodeImpl.getNodeFromTree(info.treeId, info.nodeId); }, get lastChild() { var count = GetChildCount(this.treeID, this.id); if (count == 0) return; var info = GetChildIDAtIndex(this.treeID, this.id, count - 1); if (info) return AutomationRootNodeImpl.getNodeFromTree(info.treeId, info.nodeId); }, get children() { var info = GetChildIds(this.treeID, this.id); if (!info) return []; var children = []; for (var i = 0; i < info.nodeIds.length; ++i) { var childID = info.nodeIds[i]; var child = AutomationRootNodeImpl.getNodeFromTree(info.treeId, childID); if (child) $Array.push(children, child); } return children; }, get previousSibling() { var parent = this.parent; if (!parent) return undefined; parent = privates(parent).impl; var indexInParent = GetIndexInParent(this.treeID, this.id); var info = GetChildIDAtIndex(parent.treeID, parent.id, indexInParent - 1); if (info) return AutomationRootNodeImpl.getNodeFromTree(info.treeId, info.nodeId); }, get nextSibling() { var parent = this.parent; if (!parent) return undefined; parent = privates(parent).impl; var indexInParent = GetIndexInParent(this.treeID, this.id); var info = GetChildIDAtIndex(parent.treeID, parent.id, indexInParent + 1); if (info) return AutomationRootNodeImpl.getNodeFromTree(info.treeId, info.nodeId); }, get nameFrom() { return GetNameFrom(this.treeID, this.id); }, get imageAnnotation() { return GetImageAnnotation(this.treeID, this.id); }, get bold() { return GetBold(this.treeID, this.id); }, get italic() { return GetItalic(this.treeID, this.id); }, get underline() { return GetUnderline(this.treeID, this.id); }, get lineThrough() { return GetLineThrough(this.treeID, this.id); }, get detectedLanguage() { return GetDetectedLanguage(this.treeID, this.id) }, get customActions() { return GetCustomActions(this.treeID, this.id); }, get standardActions() { return GetStandardActions(this.treeID, this.id); }, get defaultActionVerb() { return GetDefaultActionVerb(this.treeID, this.id); }, get tableCellColumnHeaders() { var ids = GetTableCellColumnHeaders(this.treeID, this.id); if (ids && this.rootImpl) { var result = []; for (var i = 0; i < ids.length; i++) result.push(this.rootImpl.get(ids[i])); return result; } }, get tableCellRowHeaders() { var id = GetTableCellRowHeaders(this.treeID, this.id); if (ids && this.rootImpl) { var result = []; for (var i = 0; i < ids.length; i++) result.push(this.rootImpl.get(ids[i])); return result; } }, get tableCellColumnIndex() { return GetTableCellColumnIndex(this.treeID, this.id); }, get tableCellRowIndex() { return GetTableCellRowIndex(this.treeID, this.id); }, doDefault: function() { this.performAction_('doDefault'); }, focus: function() { this.performAction_('focus'); }, getImageData: function(maxWidth, maxHeight) { this.performAction_('getImageData', { maxWidth: maxWidth, maxHeight: maxHeight }); }, hitTest: function(x, y, eventToFire) { this.hitTestInternal(x, y, eventToFire); }, hitTestWithReply: function(x, y, opt_callback) { this.hitTestInternal(x, y, 'hitTestResult', opt_callback); }, hitTestInternal: function(x, y, eventToFire, opt_callback) { // Convert from global to tree-relative coordinates. var location = GetLocation(this.treeID, GetRootID(this.treeID)); this.performAction_('hitTest', { x: Math.floor(x - location.left), y: Math.floor(y - location.top), eventToFire: eventToFire }, opt_callback); }, makeVisible: function() { this.performAction_('scrollToMakeVisible'); }, performCustomAction: function(customActionId) { this.performAction_('customAction', { customActionID: customActionId }); }, performStandardAction: function(action) { var standardActions = GetStandardActions(this.treeID, this.id); if (!standardActions || !standardActions.find(item => action == item)) { throw 'Inapplicable action for node: ' + action; } this.performAction_(action); }, replaceSelectedText: function(value) { if (this.state.editable) { this.performAction_('replaceSelectedText', { value: value}); } }, resumeMedia: function() { this.performAction_('resumeMedia'); }, scrollBackward: function(opt_callback) { this.performAction_('scrollBackward', {}, opt_callback); }, scrollForward: function(opt_callback) { this.performAction_('scrollForward', {}, opt_callback); }, scrollUp: function(opt_callback) { this.performAction_('scrollUp', {}, opt_callback); }, scrollDown: function(opt_callback) { this.performAction_('scrollDown', {}, opt_callback); }, scrollLeft: function(opt_callback) { this.performAction_('scrollLeft', {}, opt_callback); }, scrollRight: function(opt_callback) { this.performAction_('scrollRight', {}, opt_callback); }, setSelection: function(startIndex, endIndex) { if (this.state.editable) { this.performAction_('setSelection', { focusNodeID: this.id, anchorOffset: startIndex, focusOffset: endIndex }); } }, setSequentialFocusNavigationStartingPoint: function() { this.performAction_('setSequentialFocusNavigationStartingPoint'); }, setValue: function(value) { if (this.state.editable) { this.performAction_('setValue', { value: value}); } }, showContextMenu: function() { this.performAction_('showContextMenu'); }, startDuckingMedia: function() { this.performAction_('startDuckingMedia'); }, stopDuckingMedia: function() { this.performAction_('stopDuckingMedia'); }, suspendMedia: function() { this.performAction_('suspendMedia'); }, domQuerySelector: function(selector, callback) { if (!this.rootImpl) callback(); automationInternal.querySelector( { treeID: this.rootImpl.treeID, automationNodeID: this.id, selector: selector }, $Function.bind(this.domQuerySelectorCallback_, this, callback)); }, find: function(params) { return this.findInternal_(params); }, findAll: function(params) { return this.findInternal_(params, []); }, matches: function(params) { return this.matchInternal_(params); }, getNextTextMatch: function(searchStr, backward) { var info = GetNextTextMatch(this.treeID, this.id, searchStr, backward); if (!info) return; var impl = privates(AutomationRootNodeImpl.get(info.treeId)).impl; if (impl) return impl.get(info.nodeId); }, addEventListener: function(eventType, callback, capture) { this.removeEventListener(eventType, callback); if (!this.listeners[eventType]) this.listeners[eventType] = []; $Array.push(this.listeners[eventType], { __proto__: null, callback: callback, capture: !!capture, }); }, // TODO(dtseng/aboxhall): Check this impl against spec. removeEventListener: function(eventType, callback) { if (this.listeners[eventType]) { var listeners = this.listeners[eventType]; for (var i = 0; i < listeners.length; i++) { if (callback === listeners[i].callback) $Array.splice(listeners, i, 1); } } }, toJSON: function() { return { treeID: this.treeID, id: this.id, role: this.role, attributes: this.attributes }; }, dispatchEvent: function(eventType, eventFrom, mouseX, mouseY) { var path = []; var parent = this.parent; while (parent) { $Array.push(path, parent); parent = parent.parent; } var event = new AutomationEvent(eventType, this.wrapper, eventFrom); event.mouseX = mouseX; event.mouseY = mouseY; // Dispatch the event through the propagation path in three phases: // - capturing: starting from the root and going down to the target's parent // - targeting: dispatching the event on the target itself // - bubbling: starting from the target's parent, going back up to the root. // At any stage, a listener may call stopPropagation() on the event, which // will immediately stop event propagation through this path. if (this.dispatchEventAtCapturing_(event, path)) { if (this.dispatchEventAtTargeting_(event, path)) this.dispatchEventAtBubbling_(event, path); } }, toString: function() { var parentID = GetParentID(this.treeID, this.id); parentID = parentID ? parentID.nodeId : null; var childTreeID = GetStringAttribute(this.treeID, this.id, 'childTreeId'); var count = GetChildCount(this.treeID, this.id); var childIDs = []; for (var i = 0; i < count; ++i) { var childID = GetChildIDAtIndex(this.treeID, this.id, i).nodeId; $Array.push(childIDs, childID); } var name = GetStringAttribute(this.treeID, this.id, 'name'); var result = 'node id=' + this.id + ' role=' + this.role + ' state=' + $JSON.stringify(this.state) + ' parentID=' + parentID + ' childIds=' + $JSON.stringify(childIDs); if (childTreeID) result += ' childTreeID=' + childTreeID; if (name) result += ' name=' + name; return result; }, dispatchEventAtCapturing_: function(event, path) { privates(event).impl.eventPhase = Event.CAPTURING_PHASE; for (var i = path.length - 1; i >= 0; i--) { this.fireEventListeners_(path[i], event); if (privates(event).impl.propagationStopped) return false; } return true; }, dispatchEventAtTargeting_: function(event) { privates(event).impl.eventPhase = Event.AT_TARGET; this.fireEventListeners_(this.wrapper, event); return !privates(event).impl.propagationStopped; }, dispatchEventAtBubbling_: function(event, path) { privates(event).impl.eventPhase = Event.BUBBLING_PHASE; for (var i = 0; i < path.length; i++) { this.fireEventListeners_(path[i], event); if (privates(event).impl.propagationStopped) return false; } return true; }, fireEventListeners_: function(node, event) { var nodeImpl = privates(node).impl; if (!nodeImpl.rootImpl) return; var listeners = nodeImpl.listeners[event.type]; if (!listeners) return; var eventPhase = event.eventPhase; for (var i = 0; i < listeners.length; i++) { if (eventPhase == Event.CAPTURING_PHASE && !listeners[i].capture) continue; if (eventPhase == Event.BUBBLING_PHASE && listeners[i].capture) continue; try { listeners[i].callback(event); } catch (e) { exceptionHandler.handle('Error in event handler for ' + event.type + ' during phase ' + eventPhase, e); } } }, performAction_: function(actionType, opt_args, opt_callback) { if (!this.rootImpl) return; // Not yet initialized. if (this.rootImpl.treeID === undefined || this.id === undefined) { return; } // Check permissions. if (!IsInteractPermitted()) { throw new Error(actionType + ' requires {"desktop": true} or' + ' {"interact": true} in the "automation" manifest key.'); } var requestID = -1; if (opt_callback) { requestID = this.rootImpl.addActionResultCallback(opt_callback); } automationInternal.performAction({ treeID: this.rootImpl.treeID, automationNodeID: this.id, actionType: actionType, requestID: requestID}, opt_args || {}); }, domQuerySelectorCallback_: function(userCallback, resultAutomationNodeID) { // resultAutomationNodeID could be zero or undefined or (unlikely) null; // they all amount to the same thing here, which is that no node was // returned. if (!resultAutomationNodeID || !this.rootImpl) { userCallback(null); return; } var resultNode = this.rootImpl.get(resultAutomationNodeID); if (!resultNode) { logging.WARNING('Query selector result not in tree: ' + resultAutomationNodeID); userCallback(null); } userCallback(resultNode); }, findInternal_: function(params, opt_results) { var result = null; this.forAllDescendants_(function(node) { if (privates(node).impl.matchInternal_(params)) { if (opt_results) $Array.push(opt_results, node); else result = node; return !opt_results; } }); if (opt_results) return opt_results; return result; }, /** * Executes a closure for all of this node's descendants, in pre-order. * Early-outs if the closure returns true. * @param {Function(AutomationNode):boolean} closure Closure to be executed * for each node. Return true to early-out the traversal. */ forAllDescendants_: function(closure) { var stack = $Array.reverse(this.wrapper.children); while (stack.length > 0) { var node = $Array.pop(stack); if (closure(node)) return; var children = node.children; for (var i = children.length - 1; i >= 0; i--) $Array.push(stack, children[i]); } }, matchInternal_: function(params) { if ($Object.keys(params).length === 0) return false; if ('role' in params && this.role != params.role) return false; if ('state' in params) { for (var state in params.state) { if (params.state[state] != (state in this.state)) return false; } } if ('attributes' in params) { for (var attribute in params.attributes) { var attrValue = params.attributes[attribute]; if (typeof attrValue != 'object') { if (this[attribute] !== attrValue) return false; } else if (attrValue instanceof $RegExp.self) { if (typeof this[attribute] != 'string') return false; if (!attrValue.test(this[attribute])) return false; } else { // TODO(aboxhall): handle intlist case. return false; } } } return true; } }; var stringAttributes = [ 'accessKey', 'ariaInvalidValue', 'autoComplete', 'className', 'containerLiveRelevant', 'containerLiveStatus', 'description', 'display', 'fontFamily', 'htmlTag', 'imageDataUrl', 'innerHtml', 'language', 'liveRelevant', 'liveStatus', 'name', 'placeholder', 'roleDescription', 'textInputType', 'url', 'value']; var boolAttributes = [ 'busy', 'clickable', 'containerLiveAtomic', 'containerLiveBusy', 'liveAtomic', 'modal', 'scrollable', 'selected', 'supportsTextLocation' ]; var intAttributes = [ 'backgroundColor', 'color', 'colorValue', 'hierarchicalLevel', 'posInSet', 'scrollX', 'scrollXMax', 'scrollXMin', 'scrollY', 'scrollYMax', 'scrollYMin', 'setSize', 'ariaCellColumnIndex', 'tableCellColumnSpan', 'ariaCellRowIndex', 'tableCellRowSpan', 'tableColumnCount', 'ariaColumnCount', 'tableColumnIndex', 'tableRowCount', 'ariaRowCount', 'tableRowIndex', 'textSelEnd', 'textSelStart']; // Int attribute, relation property to expose, reverse relation to expose. var nodeRefAttributes = [ ['activedescendantId', 'activeDescendant', 'activeDescendantFor'], ['detailsId', 'details', 'detailsFor'], ['errorMessageId', 'errorMessage', 'errorMessageFor'], ['inPageLinkTargetId', 'inPageLinkTarget', null], ['nextFocusId', 'nextFocus', null], ['nextOnLineId', 'nextOnLine', null], ['previousFocusId', 'previousFocus', null], ['previousOnLineId', 'previousOnLine', null], ['tableColumnHeaderId', 'tableColumnHeader', null], ['tableHeaderId', 'tableHeader', null], ['tableRowHeaderId', 'tableRowHeader', null]]; var intListAttributes = [ 'lineBreaks', 'markerEnds', 'markerStarts', 'markerTypes', 'wordEnds', 'wordStarts']; // Intlist attribute, relation property to expose, reverse relation to expose. var nodeRefListAttributes = [ ['controlsIds', 'controls', 'controlledBy'], ['describedbyIds', 'describedBy', 'descriptionFor'], ['flowtoIds', 'flowTo', 'flowFrom'], ['labelledbyIds', 'labelledBy', 'labelFor']]; var floatAttributes = [ 'fontSize', 'maxValueForRange', 'minValueForRange', 'valueForRange']; var htmlAttributes = [ ['type', 'inputType']]; var publicAttributes = []; $Array.forEach(stringAttributes, function(attributeName) { $Array.push(publicAttributes, attributeName); $Object.defineProperty(AutomationNodeImpl.prototype, attributeName, { __proto__: null, get: function() { return GetStringAttribute(this.treeID, this.id, attributeName); } }); }); $Array.forEach(boolAttributes, function(attributeName) { $Array.push(publicAttributes, attributeName); $Object.defineProperty(AutomationNodeImpl.prototype, attributeName, { __proto__: null, get: function() { return GetBoolAttribute(this.treeID, this.id, attributeName); } }); }); $Array.forEach(intAttributes, function(attributeName) { $Array.push(publicAttributes, attributeName); $Object.defineProperty(AutomationNodeImpl.prototype, attributeName, { __proto__: null, get: function() { return GetIntAttribute(this.treeID, this.id, attributeName); } }); }); $Array.forEach(nodeRefAttributes, function(params) { var srcAttributeName = params[0]; var dstAttributeName = params[1]; var dstReverseAttributeName = params[2]; $Array.push(publicAttributes, dstAttributeName); $Object.defineProperty(AutomationNodeImpl.prototype, dstAttributeName, { __proto__: null, get: function() { var id = GetIntAttribute(this.treeID, this.id, srcAttributeName); if (id && this.rootImpl) return this.rootImpl.get(id); else return undefined; } }); if (dstReverseAttributeName) { $Array.push(publicAttributes, dstReverseAttributeName); $Object.defineProperty(AutomationNodeImpl.prototype, dstReverseAttributeName, { __proto__: null, get: function() { var ids = GetIntAttributeReverseRelations( this.treeID, this.id, srcAttributeName); if (!ids || !this.rootImpl) return undefined; var result = []; for (var i = 0; i < ids.length; ++i) { var node = this.rootImpl.get(ids[i]); if (node) $Array.push(result, node); } return result; } }); } }); $Array.forEach(intListAttributes, function(attributeName) { $Array.push(publicAttributes, attributeName); $Object.defineProperty(AutomationNodeImpl.prototype, attributeName, { __proto__: null, get: function() { return GetIntListAttribute(this.treeID, this.id, attributeName); } }); }); $Array.forEach(nodeRefListAttributes, function(params) { var srcAttributeName = params[0]; var dstAttributeName = params[1]; var dstReverseAttributeName = params[2]; $Array.push(publicAttributes, dstAttributeName); $Object.defineProperty(AutomationNodeImpl.prototype, dstAttributeName, { __proto__: null, get: function() { var ids = GetIntListAttribute(this.treeID, this.id, srcAttributeName); if (!ids || !this.rootImpl) return undefined; var result = []; for (var i = 0; i < ids.length; ++i) { var node = this.rootImpl.get(ids[i]); if (node) $Array.push(result, node); } return result; } }); if (dstReverseAttributeName) { $Array.push(publicAttributes, dstReverseAttributeName); $Object.defineProperty(AutomationNodeImpl.prototype, dstReverseAttributeName, { __proto__: null, get: function() { var ids = GetIntListAttributeReverseRelations( this.treeID, this.id, srcAttributeName); if (!ids || !this.rootImpl) return undefined; var result = []; for (var i = 0; i < ids.length; ++i) { var node = this.rootImpl.get(ids[i]); if (node) $Array.push(result, node); } return result; } }); } }); $Array.forEach(floatAttributes, function(attributeName) { $Array.push(publicAttributes, attributeName); $Object.defineProperty(AutomationNodeImpl.prototype, attributeName, { __proto__: null, get: function() { return GetFloatAttribute(this.treeID, this.id, attributeName); } }); }); $Array.forEach(htmlAttributes, function(params) { var srcAttributeName = params[0]; var dstAttributeName = params[1]; $Array.push(publicAttributes, dstAttributeName); $Object.defineProperty(AutomationNodeImpl.prototype, dstAttributeName, { __proto__: null, get: function() { return GetHtmlAttribute(this.treeID, this.id, srcAttributeName); } }); }); /** * AutomationRootNode. * * An AutomationRootNode is the javascript end of an AXTree living in the * browser. AutomationRootNode handles unserializing incremental updates from * the source AXTree. Each update contains node data that form a complete tree * after applying the update. * * A brief note about ids used through this class. The source AXTree assigns * unique ids per node and we use these ids to build a hash to the actual * AutomationNode object. * Thus, tree traversals amount to a lookup in our hash. * * The tree itself is identified by the accessibility tree id of the * renderer widget host. * @constructor */ function AutomationRootNodeImpl(treeID) { $Function.call(AutomationNodeImpl, this, this); this.treeID = treeID; this.axNodeDataCache_ = {__proto__: null}; } utils.defineProperty(AutomationRootNodeImpl, 'idToAutomationRootNode_', {__proto__: null}); utils.defineProperty(AutomationRootNodeImpl, 'get', function(treeID) { var result = AutomationRootNodeImpl.idToAutomationRootNode_[treeID]; return result || undefined; }); utils.defineProperty(AutomationRootNodeImpl, 'getOrCreate', function(treeID) { if (AutomationRootNodeImpl.idToAutomationRootNode_[treeID]) return AutomationRootNodeImpl.idToAutomationRootNode_[treeID]; var result = new AutomationRootNode(treeID); AutomationRootNodeImpl.idToAutomationRootNode_[treeID] = result; return result; }); utils.defineProperty( AutomationRootNodeImpl, 'getNodeFromTree', function(treeId, nodeId) { var tree = AutomationRootNodeImpl.get(treeId); if (!tree) return; var impl = privates(tree).impl; if (impl) return impl.get(nodeId); }); utils.defineProperty(AutomationRootNodeImpl, 'destroy', function(treeID) { delete AutomationRootNodeImpl.idToAutomationRootNode_[treeID]; }); /** * A counter keeping track of IDs to use for mapping action requests to * their callback function. */ AutomationRootNodeImpl.actionRequestCounter = 0; /** * A map from a request ID to the corresponding callback function to call * when the action response event is received. */ AutomationRootNodeImpl.actionRequestIDToCallback = {}; AutomationRootNodeImpl.prototype = { __proto__: AutomationNodeImpl.prototype, /** * @type {boolean} */ isRootNode: true, /** * @type {string} */ treeID: '', /** * A map from id to AutomationNode. * @type {Object.} * @private */ axNodeDataCache_: null, get id() { var result = GetRootID(this.treeID); // Don't return undefined, because the id is often passed directly // as an argument to a native binding that expects only a valid number. if (result === undefined) return -1; return result; }, get docUrl() { return GetDocURL(this.treeID); }, get docTitle() { return GetDocTitle(this.treeID); }, get docLoaded() { return GetDocLoaded(this.treeID); }, get docLoadingProgress() { return GetDocLoadingProgress(this.treeID); }, get anchorObject() { var id = GetAnchorObjectID(this.treeID); if (id && id != -1) return this.get(id); else return undefined; }, get anchorOffset() { var id = GetAnchorObjectID(this.treeID); if (id && id != -1) return GetAnchorOffset(this.treeID); }, get anchorAffinity() { var id = GetAnchorObjectID(this.treeID); if (id && id != -1) return GetAnchorAffinity(this.treeID); }, get focusObject() { var id = GetFocusObjectID(this.treeID); if (id && id != -1) return this.get(id); else return undefined; }, get focusOffset() { var id = GetFocusObjectID(this.treeID); if (id && id != -1) return GetFocusOffset(this.treeID); }, get focusAffinity() { var id = GetFocusObjectID(this.treeID); if (id && id != -1) return GetFocusAffinity(this.treeID); }, get: function(id) { if (id == undefined) return undefined; if (id == this.id) return this.wrapper; var obj = this.axNodeDataCache_[id]; if (obj) return obj; // Validate the backing AXTree has the specified node. if (!GetRole(this.treeID, id)) return; obj = new AutomationNode(this); privates(obj).impl.treeID = this.treeID; privates(obj).impl.id = id; this.axNodeDataCache_[id] = obj; return obj; }, remove: function(id) { if (this.axNodeDataCache_[id]) privates(this.axNodeDataCache_[id]).impl.detach(); delete this.axNodeDataCache_[id]; }, destroy: function() { this.dispatchEvent('destroyed', 'none'); for (var id in this.axNodeDataCache_) this.remove(id); this.detach(); }, onAccessibilityEvent: function(eventParams) { var targetNode = this.get(eventParams.targetID); if (targetNode) { var targetNodeImpl = privates(targetNode).impl; targetNodeImpl.dispatchEvent( eventParams.eventType, eventParams.eventFrom, eventParams.mouseX, eventParams.mouseY); if (eventParams.actionRequestID != -1) { this.onActionResult(eventParams.actionRequestID, targetNode); } } else { logging.WARNING('Got ' + eventParams.eventType + ' event on unknown node: ' + eventParams.targetID + '; this: ' + this.id); } return true; }, addActionResultCallback: function(callback) { AutomationRootNodeImpl.actionRequestIDToCallback[ ++AutomationRootNodeImpl.actionRequestCounter] = callback; return AutomationRootNodeImpl.actionRequestCounter; }, onGetTextLocationResult: function(textLocationParams) { let requestID = textLocationParams.requestID; if (requestID in AutomationRootNodeImpl.actionRequestIDToCallback) { let callback = AutomationRootNodeImpl.actionRequestIDToCallback[requestID]; try { if (textLocationParams.result) { callback(ComputeGlobalBounds( this.treeID, textLocationParams.nodeID, textLocationParams.left, textLocationParams.top, textLocationParams.width, textLocationParams.height)); } else { callback(undefined); } } catch (e) { logging.WARNING('Error with onGetTextLocationResult callback:' + e); } delete AutomationNodeImpl.actionRequestIDToCallback[requestID]; } }, onActionResult: function(requestID, result) { if (requestID in AutomationRootNodeImpl.actionRequestIDToCallback) { AutomationRootNodeImpl.actionRequestIDToCallback[requestID](result); delete AutomationRootNodeImpl.actionRequestIDToCallback[requestID]; } }, toString: function() { function toStringInternal(nodeImpl, indent) { if (!nodeImpl) return ''; var output = ''; if (nodeImpl.isRootNode) output += indent + 'tree id=' + nodeImpl.treeID + '\n'; output += indent + $Function.call(AutomationNodeImpl.prototype.toString, nodeImpl) + '\n'; indent += ' '; var children = nodeImpl.children; for (var i = 0; i < children.length; ++i) output += toStringInternal(privates(children[i]).impl, indent); return output; } return toStringInternal(this, ''); }, }; function AutomationNode() { privates(AutomationNode).constructPrivate(this, arguments); } utils.expose(AutomationNode, AutomationNodeImpl, { functions: [ 'doDefault', 'find', 'findAll', 'focus', 'getImageData', 'getNextTextMatch', 'hitTest', 'hitTestWithReply', 'makeVisible', 'matches', 'performCustomAction', 'performStandardAction', 'replaceSelectedText', 'resumeMedia', 'scrollBackward', 'scrollForward', 'scrollUp', 'scrollDown', 'scrollLeft', 'scrollRight', 'setSelection', 'setSequentialFocusNavigationStartingPoint', 'setValue', 'showContextMenu', 'startDuckingMedia', 'stopDuckingMedia', 'suspendMedia', 'addEventListener', 'removeEventListener', 'domQuerySelector', 'toString', 'boundsForRange', ], readonly: $Array.concat( publicAttributes, [ 'parent', 'firstChild', 'lastChild', 'children', 'previousSibling', 'nextSibling', 'isRootNode', 'role', 'checked', 'defaultActionVerb', 'restriction', 'state', 'location', 'imageAnnotation', 'indexInParent', 'lineStartOffsets', 'root', 'htmlAttributes', 'nameFrom', 'bold', 'italic', 'underline', 'lineThrough', 'detectedLanguage', 'customActions', 'standardActions', 'unclippedLocation', 'tableCellColumnHeaders', 'tableCellRowHeaders', 'tableCellColumnIndex', 'tableCellRowIndex', ]), }); function AutomationRootNode() { privates(AutomationRootNode).constructPrivate(this, arguments); } utils.expose(AutomationRootNode, AutomationRootNodeImpl, { superclass: AutomationNode, readonly: [ 'docTitle', 'docUrl', 'docLoaded', 'docLoadingProgress', 'anchorObject', 'anchorOffset', 'anchorAffinity', 'focusObject', 'focusOffset', 'focusAffinity', ], }); utils.defineProperty(AutomationRootNode, 'get', function(treeID) { return AutomationRootNodeImpl.get(treeID); }); utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { return AutomationRootNodeImpl.getOrCreate(treeID); }); utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { AutomationRootNodeImpl.destroy(treeID); }); exports.$set('AutomationNode', AutomationNode); exports.$set('AutomationRootNode', AutomationRootNode); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the browserAction API. var binding = apiBridge || require('binding').Binding.create('browserAction'); var setIcon = require('setIcon').setIcon; var getExtensionViews = requireNative('runtime').GetExtensionViews; var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; var jsLastError = bindingUtil ? undefined : require('lastError'); function hasLastError() { return bindingUtil ? bindingUtil.hasLastError() : jsLastError.hasError(chrome); } binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('setIcon', function(details, callback) { setIcon(details, function(args) { sendRequest('browserAction.setIcon', [args, callback], apiBridge ? undefined : this.definition.parameters, undefined); }.bind(this)); }); apiFunctions.setCustomCallback('openPopup', function(name, request, callback, response) { if (!callback) return; if (hasLastError()) { callback(); } else { var views = getExtensionViews(-1, -1, 'POPUP'); callback(views.length > 0 ? views[0] : null); } }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the Cast Streaming RtpStream API. var binding = apiBridge || require('binding').Binding.create('cast.streaming.rtpStream'); var natives = requireNative('cast_streaming_natives'); binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('destroy', function(transportId) { natives.DestroyCastRtpStream(transportId); }); apiFunctions.setHandleRequest('getSupportedParams', function(transportId) { return natives.GetSupportedParamsCastRtpStream(transportId); }); apiFunctions.setHandleRequest('start', function(transportId, params) { natives.StartCastRtpStream(transportId, params); }); apiFunctions.setHandleRequest('stop', function(transportId) { natives.StopCastRtpStream(transportId); }); apiFunctions.setHandleRequest('toggleLogging', function(transportId, enable) { natives.ToggleLogging(transportId, enable); }); apiFunctions.setHandleRequest('getRawEvents', function(transportId, extraData, callback) { natives.GetRawEvents(transportId, extraData, callback); }); apiFunctions.setHandleRequest('getStats', function(transportId, callback) { natives.GetStats(transportId, callback); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the Cast Streaming Session API. var binding = apiBridge || require('binding').Binding.create('cast.streaming.session'); var natives = requireNative('cast_streaming_natives'); binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('create', function(audioTrack, videoTrack, callback) { natives.CreateSession(audioTrack, videoTrack, callback); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the Cast Streaming UdpTransport API. var binding = apiBridge || require('binding').Binding.create('cast.streaming.udpTransport'); var natives = requireNative('cast_streaming_natives'); binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('destroy', function(transportId) { natives.DestroyCastUdpTransport(transportId); }); apiFunctions.setHandleRequest('setDestination', function(transportId, destination) { natives.SetDestinationCastUdpTransport(transportId, destination); }); apiFunctions.setHandleRequest('setOptions', function(transportId, options) { natives.SetOptionsCastUdpTransport(transportId, options); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the Cast Streaming Session API. var binding = apiBridge || require('binding').Binding.create('cast.streaming.receiverSession'); var natives = requireNative('cast_streaming_natives'); binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest( 'createAndBind', function(ap, vp, local, weidgth, height, fr, url, cb, op) { }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var Event = require('event_bindings').Event; var sendRequest = require('sendRequest').sendRequest; var validate = require('schemaUtils').validate; function extendSchema(schema) { var extendedSchema = $Array.slice(schema); $Array.unshift(extendedSchema, {'type': 'string'}); return extendedSchema; } // TODO(devlin): Maybe find a way to combine this and ContentSetting. function ChromeSetting(prefKey, valueSchema, schema) { var getFunctionParameters = function(name) { var f = $Array.filter( schema.functions, function(f) { return f.name === name; })[0]; return f.parameters; }; this.get = function(details, callback) { var getSchema = getFunctionParameters('get'); validate([details, callback], getSchema); return sendRequest('types.ChromeSetting.get', [prefKey, details, callback], extendSchema(getSchema)); }; this.set = function(details, callback) { // The set schema included in the Schema object is generic, since it varies // per-setting. However, this is only ever for a single setting, so we can // enforce the types more thoroughly. var rawSetSchema = getFunctionParameters('set'); var rawSettingParam = rawSetSchema[0]; var props = $Object.assign({}, rawSettingParam.properties); props.value = valueSchema; var modSettingParam = { name: rawSettingParam.name, type: rawSettingParam.type, properties: props, }; var modSetSchema = $Array.slice(rawSetSchema); modSetSchema[0] = modSettingParam; validate([details, callback], modSetSchema); return sendRequest('types.ChromeSetting.set', [prefKey, details, callback], extendSchema(modSetSchema)); }; this.clear = function(details, callback) { var clearSchema = getFunctionParameters('clear'); validate([details, callback], clearSchema); return sendRequest('types.ChromeSetting.clear', [prefKey, details, callback], extendSchema(clearSchema)); }; this.onChange = new Event('types.ChromeSetting.' + prefKey + '.onChange'); }; exports.$set('ChromeSetting', ChromeSetting); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var binding = apiBridge || require('binding').Binding.create('chromeWebViewInternal'); var contextMenusHandlers = require('contextMenusHandlers'); binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; var handlers = contextMenusHandlers.create(true /* isWebview */); apiFunctions.setHandleRequest( 'contextMenusCreate', handlers.requestHandlers.create); apiFunctions.setHandleRequest( 'contextMenusUpdate', handlers.requestHandlers.update); apiFunctions.setHandleRequest( 'contextMenusRemove', handlers.requestHandlers.remove); apiFunctions.setHandleRequest( 'contextMenusRemoveAll', handlers.requestHandlers.removeAll); }); if (!apiBridge) exports.$set('ChromeWebView', binding.generate()); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This module implements chrome-specific API. // See web_view_api_methods.js for details. var ChromeWebView = getInternalApi ? getInternalApi('chromeWebViewInternal') : require('chromeWebViewInternal').ChromeWebView; var ChromeWebViewSchema = requireNative('schema_registry').GetSchema('chromeWebViewInternal'); var CreateEvent = require('guestViewEvents').CreateEvent; var GuestViewInternalNatives = requireNative('guest_view_internal'); var idGeneratorNatives = requireNative('id_generator'); var registerElement = require('guestViewContainerElement').registerElement; var utils = require('utils'); var WebViewElement = require('webViewElement').WebViewElement; var WebViewImpl = require('webView').WebViewImpl; var WebViewAttributeNames = require('webViewConstants').WebViewAttributeNames; // This is the only "webViewInternal.onClicked" named event for this renderer. // // Since we need an event per , we define events with suffix // (subEventName) in each of the . Behind the scenes, this event is // registered as a ContextMenusEvent, with filter set to the webview's // |viewInstanceId|. Any time a ContextMenusEvent is dispatched, we re-dispatch // it to the subEvent's listeners. This way // .contextMenus.onClicked behave as a regular chrome Event type. var ContextMenusEvent = CreateEvent('chromeWebViewInternal.onClicked'); // See comment above. var ContextMenusHandlerEvent = CreateEvent('chromeWebViewInternal.onContextMenuShow'); var jsEvent; function createCustomEvent(name, schema, options, webviewId) { if (bindingUtil) return bindingUtil.createCustomEvent(name, undefined, false, false); if (!jsEvent) jsEvent = require('event_bindings').Event; return new jsEvent(name, schema, options, webviewId); } function GetUniqueSubEventName(eventName) { return eventName + '/' + idGeneratorNatives.GetNextId(); } // This event is exposed as .contextMenus.onClicked. function createContextMenusOnClickedEvent(webViewInstanceId, opt_eventName, opt_argSchemas, opt_eventOptions) { var subEventName = GetUniqueSubEventName(opt_eventName); var newEvent = createCustomEvent(subEventName, opt_argSchemas, opt_eventOptions, webViewInstanceId); var view = GuestViewInternalNatives.GetViewFromID(webViewInstanceId); if (view) { view.events.addScopedListener( ContextMenusEvent, $Function.bind(function() { // Re-dispatch to subEvent's listeners. $Function.apply(newEvent.dispatch, newEvent, $Array.slice(arguments)); }, newEvent), {instanceId: webViewInstanceId}); } return newEvent; } // This event is exposed as .contextMenus.onShow. function createContextMenusOnContextMenuEvent(webViewInstanceId, opt_eventName, opt_argSchemas, opt_eventOptions) { var subEventName = GetUniqueSubEventName(opt_eventName); var newEvent = createCustomEvent(subEventName, opt_argSchemas, opt_eventOptions, webViewInstanceId); var view = GuestViewInternalNatives.GetViewFromID(webViewInstanceId); if (view) { view.events.addScopedListener( ContextMenusHandlerEvent, $Function.bind(function(e) { var defaultPrevented = false; var event = { preventDefault: function() { defaultPrevented = true; } }; // Re-dispatch to subEvent's listeners. $Function.apply(newEvent.dispatch, newEvent, [event]); if (!defaultPrevented) { // TODO(lazyboy): Remove |items| parameter completely from // ChromeWebView.showContextMenu as we don't do anything useful with // it currently. var items = []; var guestInstanceId = GuestViewInternalNatives. GetViewFromID(webViewInstanceId).guest.getId(); ChromeWebView.showContextMenu(guestInstanceId, e.requestId, items); } }, newEvent), {instanceId: webViewInstanceId}); } return newEvent; } // ----------------------------------------------------------------------------- // WebViewContextMenusImpl object. // An instance of this class is exposed as .contextMenus. function WebViewContextMenusImpl(viewInstanceId) { this.viewInstanceId_ = viewInstanceId; } $Object.setPrototypeOf(WebViewContextMenusImpl.prototype, null); WebViewContextMenusImpl.prototype.create = function() { var args = $Array.concat([this.viewInstanceId_], $Array.slice(arguments)); return $Function.apply(ChromeWebView.contextMenusCreate, null, args); }; WebViewContextMenusImpl.prototype.remove = function() { var args = $Array.concat([this.viewInstanceId_], $Array.slice(arguments)); return $Function.apply(ChromeWebView.contextMenusRemove, null, args); }; WebViewContextMenusImpl.prototype.removeAll = function() { var args = $Array.concat([this.viewInstanceId_], $Array.slice(arguments)); return $Function.apply(ChromeWebView.contextMenusRemoveAll, null, args); }; WebViewContextMenusImpl.prototype.update = function() { var args = $Array.concat([this.viewInstanceId_], $Array.slice(arguments)); return $Function.apply(ChromeWebView.contextMenusUpdate, null, args); }; function WebViewContextMenus() { privates(WebViewContextMenus).constructPrivate(this, arguments); } utils.expose(WebViewContextMenus, WebViewContextMenusImpl, { functions: [ 'create', 'remove', 'removeAll', 'update', ], }); // ----------------------------------------------------------------------------- class ChromeWebViewImpl extends WebViewImpl { constructor(webviewElement) { super(webviewElement); this.setupContextMenus(); } } ChromeWebViewImpl.prototype.setupContextMenus = function() { if (!this.contextMenusOnContextMenuEvent_) { var eventName = 'chromeWebViewInternal.onContextMenuShow'; var eventSchema = utils.lookup(ChromeWebViewSchema.events, 'name', 'onShow'); var eventOptions = {supportsListeners: true, supportsLazyListeners: false}; this.contextMenusOnContextMenuEvent_ = createContextMenusOnContextMenuEvent( this.viewInstanceId, eventName, eventSchema, eventOptions); } var createContextMenus = $Function.bind(function() { return this.weakWrapper(function() { if (this.contextMenus_) { return this.contextMenus_; } this.contextMenus_ = new WebViewContextMenus(this.viewInstanceId); // Define 'onClicked' event property on |this.contextMenus_|. var getOnClickedEvent = $Function.bind(function() { return this.weakWrapper(function() { if (!this.contextMenusOnClickedEvent_) { var eventName = 'chromeWebViewInternal.onClicked'; var eventSchema = utils.lookup(ChromeWebViewSchema.events, 'name', 'onClicked'); var eventOptions = {supportsListeners: true, supportsLazyListeners: false}; var onClickedEvent = createContextMenusOnClickedEvent( this.viewInstanceId, eventName, eventSchema, eventOptions); this.contextMenusOnClickedEvent_ = onClickedEvent; return onClickedEvent; } return this.contextMenusOnClickedEvent_; }); }, this); $Object.defineProperty( this.contextMenus_, 'onClicked', {get: getOnClickedEvent(), enumerable: true}); $Object.defineProperty( this.contextMenus_, 'onShow', { get: this.weakWrapper(function() { return this.contextMenusOnContextMenuEvent_; }), enumerable: true }); return this.contextMenus_; }); }, this); // Expose .contextMenus object. $Object.defineProperty( this.element, 'contextMenus', { get: createContextMenus(), enumerable: true }); }; class ChromeWebViewElement extends WebViewElement { static get observedAttributes() { return WebViewAttributeNames; } constructor() { super(); privates(this).internal = new ChromeWebViewImpl(this); } } registerElement('WebView', ChromeWebViewElement); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the contentSettings API. var sendRequest = require('sendRequest').sendRequest; var validate = require('schemaUtils').validate; // Some content types have been removed and no longer correspond to a real // content setting. Instead, these always return a fixed dummy value, and issue // a warning when accessed. This maps the content type name to the dummy value. var DEPRECATED_CONTENT_TYPES = { __proto__: null, fullscreen: 'allow', mouselock: 'allow', }; function extendSchema(schema) { var extendedSchema = $Array.slice(schema); $Array.unshift(extendedSchema, {'type': 'string'}); return extendedSchema; } function ContentSetting(contentType, settingSchema, schema) { var getFunctionParameters = function(name) { var f = $Array.filter( schema.functions, function(f) { return f.name === name; })[0]; return f.parameters; }; this.get = function(details, callback) { var getSchema = getFunctionParameters('get'); validate([details, callback], getSchema); var dummySetting = DEPRECATED_CONTENT_TYPES[contentType]; if (dummySetting !== undefined) { console.warn('contentSettings.' + contentType + ' is deprecated; it will ' + 'always return \'' + dummySetting + '\'.'); $Function.apply(callback, undefined, [{setting: dummySetting}]); return; } return sendRequest('contentSettings.get', [contentType, details, callback], extendSchema(getSchema)); }; this.set = function(details, callback) { // We check if the setting is deprecated first, since the validation will // fail for deprecated types. if ($Object.hasOwnProperty(DEPRECATED_CONTENT_TYPES, contentType)) { console.warn('contentSettings.' + contentType + ' is deprecated; setting ' + 'it has no effect.'); $Function.apply(callback, undefined, []); return; } // The set schema included in the Schema object is generic, since it varies // per-setting. However, this is only ever for a single setting, so we can // enforce the types more thoroughly. var rawSetSchema = getFunctionParameters('set'); var rawSettingParam = rawSetSchema[0]; var props = $Object.assign({}, rawSettingParam.properties); props.setting = settingSchema; var modSettingParam = { name: rawSettingParam.name, type: rawSettingParam.type, properties: props, }; var modSetSchema = $Array.slice(rawSetSchema); modSetSchema[0] = modSettingParam; validate([details, callback], modSetSchema); return sendRequest('contentSettings.set', [contentType, details, callback], extendSchema(modSetSchema)); }; this.clear = function(details, callback) { var clearSchema = getFunctionParameters('clear'); validate([details, callback], clearSchema); if ($Object.hasOwnProperty(DEPRECATED_CONTENT_TYPES, contentType)) { console.warn('contentSettings.' + contentType + ' is deprecated; ' + 'clearing it has no effect.'); $Function.apply(callback, undefined, []); return; } return sendRequest('contentSettings.clear', [contentType, details, callback], extendSchema(clearSchema)); }; this.getResourceIdentifiers = function(callback) { var schema = getFunctionParameters('getResourceIdentifiers'); validate([callback], schema); if ($Object.hasOwnProperty(DEPRECATED_CONTENT_TYPES, contentType)) { $Function.apply(callback, undefined, []); return; } return sendRequest( 'contentSettings.getResourceIdentifiers', [contentType, callback], extendSchema(schema)); }; } exports.$set('ContentSetting', ContentSetting); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the declarativeContent API. var binding = apiBridge || require('binding').Binding.create('declarativeContent'); if (!apiBridge) { var utils = require('utils'); var validate = require('schemaUtils').validate; var canonicalizeCompoundSelector = requireNative('css_natives').CanonicalizeCompoundSelector; } var setIcon = require('setIcon').setIcon; binding.registerCustomHook(function(api) { var declarativeContent = api.compiledApi; if (apiBridge) { // Validation for most types is done in the native C++ with native bindings, // but setIcon is funny (and sadly broken). Ideally, we can move this // validation entirely into the native code, and this whole file can go // away. var nativeSetIcon = declarativeContent.SetIcon; declarativeContent.SetIcon = function(parameters) { // TODO(devlin): This is very, very wrong. setIcon() is potentially // asynchronous (in the case of a path being specified), which means this // becomes an "asynchronous constructor". Errors can be thrown *after* the // `new declarativeContent.SetIcon(...)` call, and in the async cases, // this wouldn't work when we immediately add the action via an API call // (e.g., // chrome.declarativeContent.onPageChange.addRules( // [{conditions: ..., actions: [ new SetIcon(...) ]}]); // ). Some of this is tracked in http://crbug.com/415315. setIcon(parameters, $Function.bind(function(data) { // Fake calling the original function as a constructor. $Object.setPrototypeOf(this, nativeSetIcon.prototype); $Function.apply(nativeSetIcon, this, [data]); }, this)); }; return; } // Returns the schema definition of type |typeId| defined in |namespace|. function getSchema(typeId) { return utils.lookup(api.schema.types, 'id', 'declarativeContent.' + typeId); } // Helper function for the constructor of concrete datatypes of the // declarative content API. // Makes sure that |this| contains the union of parameters and // {'instanceType': 'declarativeContent.' + typeId} and validates the // generated union dictionary against the schema for |typeId|. function setupInstance(instance, parameters, typeId) { for (var key in parameters) { if ($Object.hasOwnProperty(parameters, key)) { instance[key] = parameters[key]; } } instance.instanceType = 'declarativeContent.' + typeId; var schema = getSchema(typeId); validate([instance], [schema]); } function canonicalizeCssSelectors(selectors) { for (var i = 0; i < selectors.length; i++) { var canonicalizedSelector = canonicalizeCompoundSelector(selectors[i]); if (canonicalizedSelector == '') { throw new Error( 'Element of \'css\' array must be a ' + 'list of valid compound selectors: ' + selectors[i]); } selectors[i] = canonicalizedSelector; } } // Setup all data types for the declarative content API. declarativeContent.PageStateMatcher = function(parameters) { setupInstance(this, parameters, 'PageStateMatcher'); if ($Object.hasOwnProperty(this, 'css')) { canonicalizeCssSelectors(this.css); } }; declarativeContent.ShowAction = function(parameters) { setupInstance(this, parameters, 'ShowAction'); }; declarativeContent.ShowPageAction = declarativeContent.ShowAction; declarativeContent.RequestContentScript = function(parameters) { setupInstance(this, parameters, 'RequestContentScript'); }; // TODO(rockot): Do not expose this in M39 stable. Making this restriction // possible will take some extra work. See http://crbug.com/415315 // Note: See also the SetIcon wrapper above for more issues. declarativeContent.SetIcon = function(parameters) { setIcon(parameters, $Function.bind(function(data) { setupInstance(this, data, 'SetIcon'); }, this)); }; }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the desktopCapture API. var binding = apiBridge || require('binding').Binding.create('desktopCapture'); var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; var idGenerator = requireNative('id_generator'); binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; var pendingRequests = {}; function onRequestResult(id, result, options) { if (id in pendingRequests) { var callback = pendingRequests[id]; delete pendingRequests[id]; callback(result, options); } } apiFunctions.setHandleRequest('chooseDesktopMedia', function(sources, target_tab, callback) { // |target_tab| is an optional parameter. if (callback === undefined) { callback = target_tab; target_tab = undefined; } var id = idGenerator.GetNextId(); pendingRequests[id] = callback; sendRequest('desktopCapture.chooseDesktopMedia', [id, sources, target_tab, $Function.bind(onRequestResult, null, id)], apiBridge ? undefined : this.definition.parameters, undefined); return id; }); apiFunctions.setHandleRequest('cancelChooseDesktopMedia', function(id) { if (id in pendingRequests) { delete pendingRequests[id]; sendRequest('desktopCapture.cancelChooseDesktopMedia', [id], apiBridge ? undefined : this.definition.parameters, undefined); } }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the developerPrivate API. var binding = apiBridge || require('binding').Binding.create('developerPrivate'); binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; // Converts the argument of |functionName| from DirectoryEntry to URL. function bindFileSystemFunction(functionName) { apiFunctions.setUpdateArgumentsPostValidate( functionName, function(directoryEntry, callback) { var fileSystemName = directoryEntry.filesystem.name; var relativePath = $String.slice(directoryEntry.fullPath, 1); var url = directoryEntry.toURL(); return [fileSystemName, relativePath, url, callback]; }); } bindFileSystemFunction('loadDirectory'); // developerPrivate.enable is the same as chrome.management.setEnabled. // TODO(devlin): Migrate callers off developerPrivate.enable. bindingsAPI.compiledApi.enable = chrome.management.setEnabled; apiFunctions.setHandleRequest('allowFileAccess', function(id, allow, callback) { chrome.developerPrivate.updateExtensionConfiguration( {extensionId: id, fileAccess: allow}, callback); }); apiFunctions.setHandleRequest('allowIncognito', function(id, allow, callback) { chrome.developerPrivate.updateExtensionConfiguration( {extensionId: id, incognitoAccess: allow}, callback); }); apiFunctions.setHandleRequest('inspect', function(options, callback) { var renderViewId = options.render_view_id; if (typeof renderViewId == 'string') { renderViewId = parseInt(renderViewId); if (isNaN(renderViewId)) throw new Error('Invalid value for render_view_id'); } var renderProcessId = options.render_process_id; if (typeof renderProcessId == 'string') { renderProcessId = parseInt(renderProcessId); if (isNaN(renderProcessId)) throw new Error('Invalid value for render_process_id'); } chrome.developerPrivate.openDevTools({ extensionId: options.extension_id, renderProcessId: renderProcessId, renderViewId: renderViewId, incognito: options.incognito }, callback); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom bindings for the downloads API. var binding = apiBridge || require('binding').Binding.create('downloads'); var downloadsInternal = getInternalApi ? getInternalApi('downloadsInternal') : require('binding').Binding.create('downloadsInternal').generate(); var registerArgumentMassager = bindingUtil ? $Function.bind(bindingUtil.registerEventArgumentMassager, bindingUtil) : require('event_bindings').registerArgumentMassager; registerArgumentMassager('downloads.onDeterminingFilename', function(args, dispatch) { var downloadItem = args[0]; // Copy the id so that extensions can't change it. var downloadId = downloadItem.id; var suggestable = true; function isValidResult(result) { if (result === undefined) return false; if (typeof(result) != 'object') { console.error('Error: Invocation of form suggest(' + typeof(result) + ') doesn\'t match definition suggest({filename: string, ' + 'conflictAction: string})'); return false; } else if ((typeof(result.filename) != 'string') || (result.filename.length == 0)) { console.error('Error: "filename" parameter to suggest() must be a ' + 'non-empty string'); return false; } else if ([undefined, 'uniquify', 'overwrite', 'prompt'].indexOf( result.conflictAction) < 0) { console.error('Error: "conflictAction" parameter to suggest() must be ' + 'one of undefined, "uniquify", "overwrite", "prompt"'); return false; } return true; } function suggestCallback(result) { if (!suggestable) { console.error('suggestCallback may not be called more than once.'); return; } suggestable = false; if (isValidResult(result)) { downloadsInternal.determineFilename( downloadId, result.filename, result.conflictAction || ""); } else { downloadsInternal.determineFilename(downloadId, "", ""); } } try { var results = dispatch([downloadItem, suggestCallback]); var async = (results && results.results && (results.results.length != 0) && (results.results[0] === true)); if (suggestable && !async) suggestCallback(); } catch (e) { suggestCallback(); throw e; } }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var Event = require('event_bindings').Event; // The EasyUnlockProximityRequired object is just a stub that has an onChange // event, which is never triggered. // TODO(devlin): Remove this once the preferencesPrivate API is fully removed. // https://crbug.com/593166 function EasyUnlockProximityRequired(prefKey, valueSchema, schema) { // Note: technically, extensions could intercept this through a setter on // Object.prototype(). We don't really care, because a) this is only for a // private API, so we shouldn't have to worry about untrusted code, and b) // this is an anonymous event, which exposes no attack surface and will be // exposed to the extension anyway. this.onChange = new Event(); }; exports.$set('EasyUnlockProximityRequired', EasyUnlockProximityRequired); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the GCM API. var binding = apiBridge || require('binding').Binding.create('gcm'); var forEach = require('utils').forEach; binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; var gcm = bindingsAPI.compiledApi; apiFunctions.setUpdateArgumentsPostValidate( 'send', function(message, callback) { // Validate message.data. var payloadSize = 0; forEach(message.data, function(property, value) { if (property.length == 0) throw new Error("One of data keys is empty."); var lowerCasedProperty = property.toLowerCase(); // Issue an error for forbidden prefixes of property names. if (lowerCasedProperty.startsWith("goog.") || lowerCasedProperty.startsWith("google") || property.startsWith("collapse_key")) { throw new Error("Invalid data key: " + property); } payloadSize += property.length + value.length; }); if (payloadSize > gcm.MAX_MESSAGE_SIZE) throw new Error("Payload exceeded allowed size limit. Payload size is: " + payloadSize); if (payloadSize == 0) throw new Error("No data to send."); return arguments; }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the Identity API. var binding = apiBridge || require('binding').Binding.create('identity'); binding.registerCustomHook(function(binding, id, contextType) { var apiFunctions = binding.apiFunctions; apiFunctions.setHandleRequest('getRedirectURL', function(path) { if (path === null || path === undefined) path = '/'; else path = String(path); if (path[0] != '/') path = '/' + path; return 'https://' + id + '.chromiumapp.org' + path; }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the image writer private API. var binding = apiBridge || require('binding').Binding.create('imageWriterPrivate'); binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setUpdateArgumentsPostValidate( 'writeFromFile', function(device, fileEntry, options, callback) { var fileSystemName = fileEntry.filesystem.name; var relativePath = $String.slice(fileEntry.fullPath, 1); return [device, fileSystemName, relativePath, callback]; }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the input ime API. Only injected into the // v8 contexts for extensions which have permission for the API. var binding = apiBridge || require('binding').Binding.create('input.ime'); var appWindowNatives = requireNative('app_window_natives'); var registerArgumentMassager = bindingUtil ? $Function.bind(bindingUtil.registerEventArgumentMassager, bindingUtil) : require('event_bindings').registerArgumentMassager; var keyEventHandled; registerArgumentMassager('input.ime.onKeyEvent', function(args, dispatch) { var keyData = args[1]; var result = undefined; try { // dispatch() is weird - it returns an object {results: array} iff // there is at least one result value that !== undefined. Since onKeyEvent // has a maximum of one listener, we know that any result we find is the one // we're interested in. var dispatchResult = dispatch(args); if (dispatchResult && dispatchResult.results) result = dispatchResult.results[0]; } catch (e) { result = false; console.error('Error in event handler for onKeyEvent: ' + e.stack); } if (result !== undefined) { keyEventHandled(keyData.requestId, !!result); } }); binding.registerCustomHook(function(api) { keyEventHandled = api.compiledApi.keyEventHandled; // TODO(shuchen): override onKeyEvent.addListener only for compatibility. // This should be removed after the IME extension doesn't rely on the // additional "async" parameter. var originalAddListener = api.compiledApi.onKeyEvent.addListener; api.compiledApi.onKeyEvent.addListener = function(cb, opt_extraInfo) { $Function.call(originalAddListener, this, cb); }; api.apiFunctions.setCustomCallback('createWindow', function(name, request, callback, windowParams) { if (!callback) { return; } var view; if (windowParams && windowParams.frameId) { view = appWindowNatives.GetFrame( windowParams.frameId, false /* notifyBrowser */); view.id = windowParams.frameId; } callback(view); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the Media Gallery API. var binding = apiBridge || require('binding').Binding.create('mediaGalleries'); var blobNatives = requireNative('blob_natives'); var mediaGalleriesNatives = requireNative('mediaGalleries'); var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; var blobsAwaitingMetadata = {}; var mediaGalleriesMetadata = {}; function createFileSystemObjectsAndUpdateMetadata(response) { var result = []; mediaGalleriesMetadata = {}; // Clear any previous metadata. if (response) { for (var i = 0; i < response.length; i++) { var filesystem = mediaGalleriesNatives.GetMediaFileSystemObject( response[i].fsid); $Array.push(result, filesystem); var metadata = response[i]; delete metadata.fsid; mediaGalleriesMetadata[filesystem.name] = metadata; } } return result; } binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; // getMediaFileSystems and addUserSelectedFolder use a custom callback so that // they can instantiate and return an array of file system objects. apiFunctions.setCustomCallback('getMediaFileSystems', function(name, request, callback, response) { var result = createFileSystemObjectsAndUpdateMetadata(response); if (callback) callback(result); }); apiFunctions.setCustomCallback('addUserSelectedFolder', function(name, request, callback, response) { var fileSystems = []; var selectedFileSystemName = ""; if (response && 'mediaFileSystems' in response && 'selectedFileSystemIndex' in response) { fileSystems = createFileSystemObjectsAndUpdateMetadata( response['mediaFileSystems']); var selectedFileSystemIndex = response['selectedFileSystemIndex']; if (selectedFileSystemIndex >= 0) { selectedFileSystemName = fileSystems[selectedFileSystemIndex].name; } } if (callback) callback(fileSystems, selectedFileSystemName); }); apiFunctions.setHandleRequest('getMediaFileSystemMetadata', function(filesystem) { if (filesystem && filesystem.name && filesystem.name in mediaGalleriesMetadata) { return mediaGalleriesMetadata[filesystem.name]; } return { 'name': '', 'galleryId': '', 'isRemovable': false, 'isMediaDevice': false, 'isAvailable': false, }; }); function getMetadataCallback(uuid, name, request, callback, response) { if (response && response.attachedImagesBlobInfo) { for (var i = 0; i < response.attachedImagesBlobInfo.length; i++) { var blobInfo = response.attachedImagesBlobInfo[i]; var blob = blobNatives.TakeBrowserProcessBlob( blobInfo.blobUUID, blobInfo.type, blobInfo.size); response.metadata.attachedImages.push(blob); } } if (callback) callback(response ? response.metadata : null); delete blobsAwaitingMetadata[uuid]; } apiFunctions.setHandleRequest('getMetadata', function(mediaFile, options, callback) { var blobUuid = blobNatives.GetBlobUuid(mediaFile) // Store the blob in a global object to keep its refcount nonzero -- this // prevents the object from being garbage collected before any metadata // parsing gets to occur (see crbug.com/415792). blobsAwaitingMetadata[blobUuid] = mediaFile; var optArgs = { __proto__: null, customCallback: $Function.bind(getMetadataCallback, null, blobUuid), }; sendRequest('mediaGalleries.getMetadata', [blobUuid, options, callback], bindingUtil ? undefined : this.definition.parameters, optArgs); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom bindings for the notifications API. // var binding = apiBridge || require('binding').Binding.create('notifications'); var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; var exceptionHandler = require('uncaught_exception_handler'); var imageUtil = require('imageUtil'); var notificationsPrivate = requireNative('notifications_private'); var jsLastError = bindingUtil ? undefined : require('lastError'); function runCallbackWithLastError(name, message, stack, callback, args) { if (bindingUtil) { bindingUtil.runCallbackWithLastError(message, function() { $Function.apply(callback, null, args); }); } else { jsLastError.run(name, message, stack, callback, args); } } function imageDataSetter(context, key) { var f = function(val) { this[key] = val; }; return $Function.bind(f, context); } // A URL Spec is an object with the following keys: // path: The resource to be downloaded. // width: (optional) The maximum width of the image to be downloaded in device // pixels. // height: (optional) The maximum height of the image to be downloaded in // device pixels. // callback: A function to be called when the URL is complete. It // should accept an ImageData object and set the appropriate // field in |notificationDetails|. function getUrlSpecs(imageSizes, notificationDetails) { var urlSpecs = []; // |iconUrl| might be optional for notification updates. if (notificationDetails.iconUrl) { $Array.push(urlSpecs, { path: notificationDetails.iconUrl, width: imageSizes.icon.width * imageSizes.scaleFactor, height: imageSizes.icon.height * imageSizes.scaleFactor, callback: imageDataSetter(notificationDetails, 'iconBitmap') }); } // |appIconMaskUrl| is optional. if (notificationDetails.appIconMaskUrl) { $Array.push(urlSpecs, { path: notificationDetails.appIconMaskUrl, width: imageSizes.appIconMask.width * imageSizes.scaleFactor, height: imageSizes.appIconMask.height * imageSizes.scaleFactor, callback: imageDataSetter(notificationDetails, 'appIconMaskBitmap') }); } // |imageUrl| is optional. if (notificationDetails.imageUrl) { $Array.push(urlSpecs, { path: notificationDetails.imageUrl, width: imageSizes.image.width * imageSizes.scaleFactor, height: imageSizes.image.height * imageSizes.scaleFactor, callback: imageDataSetter(notificationDetails, 'imageBitmap') }); } // Each button has an optional icon. var buttonList = notificationDetails.buttons; if (buttonList && typeof buttonList.length === 'number') { var numButtons = buttonList.length; for (var i = 0; i < numButtons; i++) { if (buttonList[i].iconUrl) { $Array.push(urlSpecs, { path: buttonList[i].iconUrl, width: imageSizes.buttonIcon.width * imageSizes.scaleFactor, height: imageSizes.buttonIcon.height * imageSizes.scaleFactor, callback: imageDataSetter(buttonList[i], 'iconBitmap') }); } } } return urlSpecs; } function replaceNotificationOptionURLs(notification_details, callback) { var imageSizes = notificationsPrivate.GetNotificationImageSizes(); var url_specs = getUrlSpecs(imageSizes, notification_details); if (!url_specs.length) { callback(true); return; } var errors = 0; imageUtil.loadAllImages(url_specs, { onerror: function(index) { errors++; }, oncomplete: function(imageData) { if (errors > 0) { callback(false); return; } for (var index = 0; index < url_specs.length; index++) { var url_spec = url_specs[index]; url_spec.callback(imageData[index]); } callback(true); } }); } function genHandle(name, failure_function) { return function(id, input_notification_details, callback) { // TODO(dewittj): Remove this hack. This is used as a way to deep // copy a complex JSON object. var notification_details = $JSON.parse( $JSON.stringify(input_notification_details)); var that = this; var stack = exceptionHandler.getExtensionStackTrace(); replaceNotificationOptionURLs(notification_details, function(success) { if (success) { sendRequest( name, [id, notification_details, callback], bindingUtil ? undefined : that.definition.parameters, bindingUtil ? undefined : {__proto__: null, stack: stack}); return; } runCallbackWithLastError( name, 'Unable to download all specified images.', stack, failure_function, [callback || function() {}, id]); }); }; } var handleCreate = genHandle('notifications.create', function(callback, id) { callback(id); }); var handleUpdate = genHandle('notifications.update', function(callback, id) { callback(false); }); var notificationsCustomHook = function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('create', handleCreate); apiFunctions.setHandleRequest('update', handleUpdate); }; binding.registerCustomHook(notificationsCustomHook); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the omnibox API. Only injected into the v8 contexts // for extensions which have permission for the omnibox API. var binding = apiBridge || require('binding').Binding.create('omnibox'); var registerArgumentMassager = bindingUtil ? $Function.bind(bindingUtil.registerEventArgumentMassager, bindingUtil) : require('event_bindings').registerArgumentMassager; var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; // Remove invalid characters from |text| so that it is suitable to use // for |AutocompleteMatch::contents|. function sanitizeString(text, shouldTrim) { // NOTE: This logic mirrors |AutocompleteMatch::SanitizeString()|. // 0x2028 = line separator; 0x2029 = paragraph separator. var kRemoveChars = /(\r|\n|\t|\u2028|\u2029)/gm; if (shouldTrim) text = text.trimLeft(); return text.replace(kRemoveChars, ''); } // Parses the xml syntax supported by omnibox suggestion results. Returns an // object with two properties: 'description', which is just the text content, // and 'descriptionStyles', which is an array of style objects in a format // understood by the C++ backend. function parseOmniboxDescription(input) { var domParser = new DOMParser(); // The XML parser requires a single top-level element, but we want to // support things like 'hello, world!'. So we wrap the // provided text in generated root level element. var root = domParser.parseFromString( '' + input + '', 'text/xml'); // DOMParser has a terrible error reporting facility. Errors come out nested // inside the returned document. var error = root.querySelector('parsererror div'); if (error) { throw new Error(error.textContent); } // Otherwise, it's valid, so build up the result. var result = { description: '', descriptionStyles: [] }; // Recursively walk the tree. function walk(node) { for (var i = 0, child; child = node.childNodes[i]; i++) { // Append text nodes to our description. if (child.nodeType == Node.TEXT_NODE) { var shouldTrim = result.description.length == 0; result.description += sanitizeString(child.nodeValue, shouldTrim); continue; } // Process and descend into a subset of recognized tags. if (child.nodeType == Node.ELEMENT_NODE && (child.nodeName == 'dim' || child.nodeName == 'match' || child.nodeName == 'url')) { var style = { 'type': child.nodeName, 'offset': result.description.length }; $Array.push(result.descriptionStyles, style); walk(child); style.length = result.description.length - style.offset; continue; } // Descend into all other nodes, even if they are unrecognized, for // forward compat. walk(child); } }; walk(root); return result; } binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setUpdateArgumentsPreValidate('setDefaultSuggestion', function(suggestResult) { if (suggestResult.content != undefined) { // null, etc. throw new Error( 'setDefaultSuggestion cannot contain the "content" field'); } return [suggestResult]; }); apiFunctions.setHandleRequest('setDefaultSuggestion', function(details) { var parseResult = parseOmniboxDescription(details.description); sendRequest('omnibox.setDefaultSuggestion', [parseResult], bindingUtil ? undefined : this.definition.parameters, undefined); }); apiFunctions.setUpdateArgumentsPostValidate( 'sendSuggestions', function(requestId, userSuggestions) { var suggestions = []; for (var i = 0; i < userSuggestions.length; i++) { var parseResult = parseOmniboxDescription( userSuggestions[i].description); parseResult.content = userSuggestions[i].content; parseResult.deletable = userSuggestions[i].deletable; $Array.push(suggestions, parseResult); } return [requestId, suggestions]; }); }); registerArgumentMassager('omnibox.onInputChanged', function(args, dispatch) { var text = args[0]; var requestId = args[1]; var suggestCallback = function(suggestions) { chrome.omnibox.sendSuggestions(requestId, suggestions); }; dispatch([text, suggestCallback]); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the pageAction API. var binding = apiBridge || require('binding').Binding.create('pageAction'); var setIcon = require('setIcon').setIcon; var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('setIcon', function(details, callback) { setIcon(details, $Function.bind(function(args) { sendRequest('pageAction.setIcon', [args, callback], bindingUtil ? undefined : this.definition.parameters, undefined); }, this)); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the pageCapture API. var binding = apiBridge || require('binding').Binding.create('pageCapture'); var handleUncaughtException = require('uncaught_exception_handler').handle; var pageCaptureNatives = requireNative('page_capture'); var CreateBlob = pageCaptureNatives.CreateBlob; var SendResponseAck = pageCaptureNatives.SendResponseAck; binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setCustomCallback('saveAsMHTML', function(name, request, callback, response) { if (response) response = CreateBlob(response.mhtmlFilePath, response.mhtmlFileLength); try { callback(response); } catch (e) { handleUncaughtException( 'Error in chrome.pageCapture.saveAsMHTML callback', e, request.stack); } finally { // Notify the browser. Now that the blob is referenced from JavaScript, // the browser can drop its reference to it. SendResponseAck(request.id); } }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the syncFileSystem API. var binding = apiBridge || require('binding').Binding.create('syncFileSystem'); var registerArgumentMassager = bindingUtil ? $Function.bind(bindingUtil.registerEventArgumentMassager, bindingUtil) : require('event_bindings').registerArgumentMassager; var fileSystemNatives = requireNative('file_system_natives'); var syncFileSystemNatives = requireNative('sync_file_system'); binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; // Functions which take in an [instanceOf=FileEntry]. function bindFileEntryFunction(functionName) { apiFunctions.setUpdateArgumentsPostValidate( functionName, function(entry, callback) { var fileSystemUrl = entry.toURL(); return [fileSystemUrl, callback]; }); } $Array.forEach(['getFileStatus'], bindFileEntryFunction); // Functions which take in a FileEntry array. function bindFileEntryArrayFunction(functionName) { apiFunctions.setUpdateArgumentsPostValidate( functionName, function(entries, callback) { var fileSystemUrlArray = []; for (var i=0; i < entries.length; i++) { $Array.push(fileSystemUrlArray, entries[i].toURL()); } return [fileSystemUrlArray, callback]; }); } $Array.forEach(['getFileStatuses'], bindFileEntryArrayFunction); // Functions which take in an [instanceOf=DOMFileSystem]. function bindFileSystemFunction(functionName) { apiFunctions.setUpdateArgumentsPostValidate( functionName, function(filesystem, callback) { var fileSystemUrl = filesystem.root.toURL(); return [fileSystemUrl, callback]; }); } $Array.forEach(['getUsageAndQuota'], bindFileSystemFunction); // Functions which return an [instanceOf=DOMFileSystem]. apiFunctions.setCustomCallback('requestFileSystem', function(name, request, callback, response) { var result = null; if (response) { result = syncFileSystemNatives.GetSyncFileSystemObject( response.name, response.root); } if (callback) callback(result); }); // Functions which return an array of FileStatusInfo object // which has [instanceOf=FileEntry]. apiFunctions.setCustomCallback('getFileStatuses', function(name, request, callback, response) { var results = []; if (response) { for (var i = 0; i < response.length; i++) { var result = {}; var entry = response[i].entry; result.fileEntry = fileSystemNatives.GetFileEntry( entry.fileSystemType, entry.fileSystemName, entry.rootUrl, entry.filePath, entry.isDirectory); result.status = response[i].status; result.error = response[i].error; $Array.push(results, result); } } if (callback) callback(results); }); }); registerArgumentMassager('syncFileSystem.onFileStatusChanged', function(args, dispatch) { // Make FileEntry object using all the base string fields. var fileEntry = fileSystemNatives.GetFileEntry( args[0].fileSystemType, args[0].fileSystemName, args[0].rootUrl, args[0].filePath, args[0].isDirectory); // Combine into a single dictionary. var fileInfo = new Object(); fileInfo.fileEntry = fileEntry; fileInfo.status = args[1]; if (fileInfo.status == "synced") { fileInfo.action = args[2]; fileInfo.direction = args[3]; } dispatch([fileInfo]); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the systemIndicator API. // TODO(dewittj) Refactor custom binding to reduce redundancy between the // extension action APIs. var binding = apiBridge || require('binding').Binding.create('systemIndicator'); var setIcon = require('setIcon').setIcon; var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('setIcon', function(details, callback) { setIcon(details, $Function.bind(function(args) { sendRequest('systemIndicator.setIcon', [args, callback], bindingUtil ? undefined : this.definition.parameters, undefined); }, this)); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the Tab Capture API. var binding = apiBridge || require('binding').Binding.create('tabCapture'); var jsLastError = bindingUtil ? undefined : require('lastError'); function runCallbackWithLastError(name, message, stack, callback, args) { if (bindingUtil) { bindingUtil.runCallbackWithLastError(message, function() { $Function.apply(callback, null, args); }); } else { jsLastError.run(name, message, stack, callback, args); } } binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; function proxyToGetUserMedia(name, request, callback, response) { if (!callback) return; if (!response) { // When the response is missing, runtime.lastError has already been set. // See chrome/browser/extensions/api/tab_capture/tab_capture_api.cc. callback(null); return; } // Convenience function for processing webkitGetUserMedia() error objects to // provide runtime.lastError messages for the tab capture API. function getErrorMessage(error, fallbackMessage) { if (!error || (typeof error.message != 'string')) return fallbackMessage; return error.message.replace(/(navigator\.)?(webkit)?GetUserMedia/gi, name); } var options = {}; if (response.audioConstraints) options.audio = response.audioConstraints; if (response.videoConstraints) options.video = response.videoConstraints; try { navigator.webkitGetUserMedia( options, function onSuccess(media_stream) { callback(media_stream); }, function onError(error) { runCallbackWithLastError( name, getErrorMessage(error, "Failed to start MediaStream."), request.stack, function() { callback(null); }); }); } catch (error) { runCallbackWithLastError( name, getErrorMessage(error, "Invalid argument(s)."), request.stack, function() { callback(null); }); } } apiFunctions.setCustomCallback('capture', proxyToGetUserMedia); apiFunctions.setCustomCallback('captureOffscreenTab', proxyToGetUserMedia); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the tabs API. var binding = apiBridge || require('binding').Binding.create('tabs'); var messaging = require('messaging'); var OpenChannelToTab = requireNative('messaging_natives').OpenChannelToTab; var sendRequestIsDisabled = requireNative('process').IsSendRequestDisabled(); var forEach = require('utils').forEach; binding.registerCustomHook(function(bindingsAPI, extensionId) { var apiFunctions = bindingsAPI.apiFunctions; var tabs = bindingsAPI.compiledApi; apiFunctions.setHandleRequest('connect', function(tabId, connectInfo) { var name = ''; var frameId = -1; if (connectInfo) { name = connectInfo.name || name; frameId = connectInfo.frameId; if (typeof frameId == 'undefined' || frameId === null || frameId < 0) frameId = -1; } var portId = OpenChannelToTab(tabId, frameId, extensionId, name); return messaging.createPort(portId, name); }); apiFunctions.setHandleRequest('sendRequest', function(tabId, request, responseCallback) { if (sendRequestIsDisabled) throw new Error(sendRequestIsDisabled); var port = tabs.connect(tabId, {name: messaging.kRequestChannel}); messaging.sendMessageImpl(port, request, responseCallback); }); apiFunctions.setHandleRequest('sendMessage', function(tabId, message, options, responseCallback) { var connectInfo = { name: messaging.kMessageChannel }; if (options) { forEach(options, function(k, v) { connectInfo[k] = v; }); } var port = tabs.connect(tabId, connectInfo); messaging.sendMessageImpl(port, message, responseCallback); }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the tts API. var binding = apiBridge || require('binding').Binding.create('tts'); var idGenerator = requireNative('id_generator'); var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; var lazyBG = requireNative('lazy_background_page'); binding.registerCustomHook(function(api) { var apiFunctions = api.apiFunctions; var tts = api.compiledApi; var handlers = {}; function ttsEventListener(event) { var eventHandler = handlers[event.srcId]; if (eventHandler) { eventHandler({ type: event.type, charIndex: event.charIndex, length: event.length, errorMessage: event.errorMessage }); if (event.isFinalEvent) { delete handlers[event.srcId]; // Balanced in 'speak' handler. lazyBG.DecrementKeepaliveCount(); } } } // This file will get run if an extension needs the ttsEngine permission, but // it doesn't necessarily have the tts permission. If it doesn't, trying to // add a listener to chrome.tts.onEvent will fail. // See http://crbug.com/122474. try { tts.onEvent.addListener(ttsEventListener); } catch (e) {} apiFunctions.setHandleRequest('speak', function() { var args = $Array.from(arguments); if (args.length > 1 && args[1]) { if (args[1].onEvent) { var id = idGenerator.GetNextId(); args[1].srcId = id; handlers[id] = args[1].onEvent; // Keep the page alive until the event finishes. // Balanced in eventHandler. lazyBG.IncrementKeepaliveCount(); } if (args[1].gender) { console.warn( 'chrome.tts.speak: ' + 'Voice gender is deprecated and values will be ignored starting ' + 'in Chrome 71.'); } } sendRequest('tts.speak', args, bindingUtil ? undefined : this.definition.parameters, undefined); return id; }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the ttsEngine API. var binding = apiBridge || require('binding').Binding.create('ttsEngine'); var registerArgumentMassager = bindingUtil ? $Function.bind(bindingUtil.registerEventArgumentMassager, bindingUtil) : require('event_bindings').registerArgumentMassager; var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; registerArgumentMassager('ttsEngine.onSpeak', function(args, dispatch) { var text = args[0]; var options = args[1]; var requestId = args[2]; var sendTtsEvent = function(event) { chrome.ttsEngine.sendTtsEvent(requestId, event); }; dispatch([text, options, sendTtsEvent]); }); binding.registerCustomHook(function(api) { // Provide a warning if deprecated parameters are used. api.apiFunctions.setHandleRequest('updateVoices', function(voices) { for (var i = 0; i < voices.length; i++) { if (voices[i].gender) { console.warn( 'chrome.ttsEngine.updateVoices: ' + 'Voice gender is deprecated and values will be ignored ' + 'starting in Chrome 71.'); break; } } sendRequest( 'ttsEngine.updateVoices', [voices], bindingUtil ? undefined : this.definition.parameters, undefined); }); }.bind(this)); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the webrtcDesktopCapturePrivate API. var binding = apiBridge || require('binding').Binding.create('webrtcDesktopCapturePrivate'); var sendRequest = bindingUtil ? $Function.bind(bindingUtil.sendRequest, bindingUtil) : require('sendRequest').sendRequest; var idGenerator = requireNative('id_generator'); binding.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; var pendingRequests = {}; function onRequestResult(id, result) { if (id in pendingRequests) { var callback = pendingRequests[id]; delete pendingRequests[id]; callback(result); } } apiFunctions.setHandleRequest('chooseDesktopMedia', function(sources, request, callback) { var id = idGenerator.GetNextId(); pendingRequests[id] = callback; sendRequest('webrtcDesktopCapturePrivate.chooseDesktopMedia', [id, sources, request, $Function.bind(onRequestResult, null, id)], bindingUtil ? undefined : this.definition.parameters, undefined); return id; }); apiFunctions.setHandleRequest('cancelChooseDesktopMedia', function(id) { if (id in pendingRequests) { delete pendingRequests[id]; sendRequest('webrtcDesktopCapturePrivate.cancelChooseDesktopMedia', [id], bindingUtil ? undefined : this.definition.parameters, undefined); } }); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Custom binding for the webrtcLoggingPrivate API. var binding = apiBridge || require('binding').Binding.create('webrtcLoggingPrivate'); var getBindDirectoryEntryCallback = require('fileEntryBindingUtil').getBindDirectoryEntryCallback; binding.registerCustomHook(function(binding, id, contextType) { var apiFunctions = binding.apiFunctions; apiFunctions.setCustomCallback('getLogsDirectory', getBindDirectoryEntryCallback()); }); if (!apiBridge) exports.$set('binding', binding.generate()); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'chrome/common/media_router/mojo/media_controller.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mediaRouter.mojom'); var media_status$ = mojo.internal.exposeNamespace('mediaRouter.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'chrome/common/media_router/mojo/media_status.mojom', 'media_status.mojom.js'); } var time$ = mojo.internal.exposeNamespace('mojoBase.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'mojo/public/mojom/base/time.mojom', '../../../../mojo/public/mojom/base/time.mojom.js'); } function MediaController_Play_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaController_Play_Params.prototype.initDefaults_ = function() { }; MediaController_Play_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaController_Play_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaController_Play_Params.encodedSize = codec.kStructHeaderSize + 0; MediaController_Play_Params.decode = function(decoder) { var packed; var val = new MediaController_Play_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; MediaController_Play_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaController_Play_Params.encodedSize); encoder.writeUint32(0); }; function MediaController_Pause_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaController_Pause_Params.prototype.initDefaults_ = function() { }; MediaController_Pause_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaController_Pause_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaController_Pause_Params.encodedSize = codec.kStructHeaderSize + 0; MediaController_Pause_Params.decode = function(decoder) { var packed; var val = new MediaController_Pause_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; MediaController_Pause_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaController_Pause_Params.encodedSize); encoder.writeUint32(0); }; function MediaController_SetMute_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaController_SetMute_Params.prototype.initDefaults_ = function() { this.mute = false; }; MediaController_SetMute_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaController_SetMute_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaController_SetMute_Params.encodedSize = codec.kStructHeaderSize + 8; MediaController_SetMute_Params.decode = function(decoder) { var packed; var val = new MediaController_SetMute_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); packed = decoder.readUint8(); val.mute = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaController_SetMute_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaController_SetMute_Params.encodedSize); encoder.writeUint32(0); packed = 0; packed |= (val.mute & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaController_SetVolume_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaController_SetVolume_Params.prototype.initDefaults_ = function() { this.volume = 0; }; MediaController_SetVolume_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaController_SetVolume_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaController_SetVolume_Params.encodedSize = codec.kStructHeaderSize + 8; MediaController_SetVolume_Params.decode = function(decoder) { var packed; var val = new MediaController_SetVolume_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.volume = decoder.decodeStruct(codec.Float); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaController_SetVolume_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaController_SetVolume_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Float, val.volume); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaController_Seek_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaController_Seek_Params.prototype.initDefaults_ = function() { this.time = null; }; MediaController_Seek_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaController_Seek_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaController_Seek_Params.time err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, time$.TimeDelta, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaController_Seek_Params.encodedSize = codec.kStructHeaderSize + 8; MediaController_Seek_Params.decode = function(decoder) { var packed; var val = new MediaController_Seek_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.time = decoder.decodeStructPointer(time$.TimeDelta); return val; }; MediaController_Seek_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaController_Seek_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(time$.TimeDelta, val.time); }; function MediaController_ConnectHangoutsMediaRouteController_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaController_ConnectHangoutsMediaRouteController_Params.prototype.initDefaults_ = function() { this.controllerRequest = new bindings.InterfaceRequest(); }; MediaController_ConnectHangoutsMediaRouteController_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaController_ConnectHangoutsMediaRouteController_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaController_ConnectHangoutsMediaRouteController_Params.controllerRequest err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaController_ConnectHangoutsMediaRouteController_Params.encodedSize = codec.kStructHeaderSize + 8; MediaController_ConnectHangoutsMediaRouteController_Params.decode = function(decoder) { var packed; var val = new MediaController_ConnectHangoutsMediaRouteController_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.controllerRequest = decoder.decodeStruct(codec.InterfaceRequest); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaController_ConnectHangoutsMediaRouteController_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaController_ConnectHangoutsMediaRouteController_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.InterfaceRequest, val.controllerRequest); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function HangoutsMediaRouteController_SetLocalPresent_Params(values) { this.initDefaults_(); this.initFields_(values); } HangoutsMediaRouteController_SetLocalPresent_Params.prototype.initDefaults_ = function() { this.localPresent = false; }; HangoutsMediaRouteController_SetLocalPresent_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; HangoutsMediaRouteController_SetLocalPresent_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; HangoutsMediaRouteController_SetLocalPresent_Params.encodedSize = codec.kStructHeaderSize + 8; HangoutsMediaRouteController_SetLocalPresent_Params.decode = function(decoder) { var packed; var val = new HangoutsMediaRouteController_SetLocalPresent_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); packed = decoder.readUint8(); val.localPresent = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; HangoutsMediaRouteController_SetLocalPresent_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(HangoutsMediaRouteController_SetLocalPresent_Params.encodedSize); encoder.writeUint32(0); packed = 0; packed |= (val.localPresent & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; var kMediaController_Play_Name = 44114504; var kMediaController_Pause_Name = 1274683295; var kMediaController_SetMute_Name = 105381973; var kMediaController_SetVolume_Name = 134206653; var kMediaController_Seek_Name = 1279461926; var kMediaController_ConnectHangoutsMediaRouteController_Name = 1326967599; function MediaControllerPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(MediaController, handleOrPtrInfo); } function MediaControllerAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( MediaController, associatedInterfacePtrInfo); } MediaControllerAssociatedPtr.prototype = Object.create(MediaControllerPtr.prototype); MediaControllerAssociatedPtr.prototype.constructor = MediaControllerAssociatedPtr; function MediaControllerProxy(receiver) { this.receiver_ = receiver; } MediaControllerPtr.prototype.play = function() { return MediaControllerProxy.prototype.play .apply(this.ptr.getProxy(), arguments); }; MediaControllerProxy.prototype.play = function() { var params_ = new MediaController_Play_Params(); var builder = new codec.MessageV0Builder( kMediaController_Play_Name, codec.align(MediaController_Play_Params.encodedSize)); builder.encodeStruct(MediaController_Play_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaControllerPtr.prototype.pause = function() { return MediaControllerProxy.prototype.pause .apply(this.ptr.getProxy(), arguments); }; MediaControllerProxy.prototype.pause = function() { var params_ = new MediaController_Pause_Params(); var builder = new codec.MessageV0Builder( kMediaController_Pause_Name, codec.align(MediaController_Pause_Params.encodedSize)); builder.encodeStruct(MediaController_Pause_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaControllerPtr.prototype.setMute = function() { return MediaControllerProxy.prototype.setMute .apply(this.ptr.getProxy(), arguments); }; MediaControllerProxy.prototype.setMute = function(mute) { var params_ = new MediaController_SetMute_Params(); params_.mute = mute; var builder = new codec.MessageV0Builder( kMediaController_SetMute_Name, codec.align(MediaController_SetMute_Params.encodedSize)); builder.encodeStruct(MediaController_SetMute_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaControllerPtr.prototype.setVolume = function() { return MediaControllerProxy.prototype.setVolume .apply(this.ptr.getProxy(), arguments); }; MediaControllerProxy.prototype.setVolume = function(volume) { var params_ = new MediaController_SetVolume_Params(); params_.volume = volume; var builder = new codec.MessageV0Builder( kMediaController_SetVolume_Name, codec.align(MediaController_SetVolume_Params.encodedSize)); builder.encodeStruct(MediaController_SetVolume_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaControllerPtr.prototype.seek = function() { return MediaControllerProxy.prototype.seek .apply(this.ptr.getProxy(), arguments); }; MediaControllerProxy.prototype.seek = function(time) { var params_ = new MediaController_Seek_Params(); params_.time = time; var builder = new codec.MessageV0Builder( kMediaController_Seek_Name, codec.align(MediaController_Seek_Params.encodedSize)); builder.encodeStruct(MediaController_Seek_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaControllerPtr.prototype.connectHangoutsMediaRouteController = function() { return MediaControllerProxy.prototype.connectHangoutsMediaRouteController .apply(this.ptr.getProxy(), arguments); }; MediaControllerProxy.prototype.connectHangoutsMediaRouteController = function(controllerRequest) { var params_ = new MediaController_ConnectHangoutsMediaRouteController_Params(); params_.controllerRequest = controllerRequest; var builder = new codec.MessageV0Builder( kMediaController_ConnectHangoutsMediaRouteController_Name, codec.align(MediaController_ConnectHangoutsMediaRouteController_Params.encodedSize)); builder.encodeStruct(MediaController_ConnectHangoutsMediaRouteController_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function MediaControllerStub(delegate) { this.delegate_ = delegate; } MediaControllerStub.prototype.play = function() { return this.delegate_ && this.delegate_.play && this.delegate_.play(); } MediaControllerStub.prototype.pause = function() { return this.delegate_ && this.delegate_.pause && this.delegate_.pause(); } MediaControllerStub.prototype.setMute = function(mute) { return this.delegate_ && this.delegate_.setMute && this.delegate_.setMute(mute); } MediaControllerStub.prototype.setVolume = function(volume) { return this.delegate_ && this.delegate_.setVolume && this.delegate_.setVolume(volume); } MediaControllerStub.prototype.seek = function(time) { return this.delegate_ && this.delegate_.seek && this.delegate_.seek(time); } MediaControllerStub.prototype.connectHangoutsMediaRouteController = function(controllerRequest) { return this.delegate_ && this.delegate_.connectHangoutsMediaRouteController && this.delegate_.connectHangoutsMediaRouteController(controllerRequest); } MediaControllerStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMediaController_Play_Name: var params = reader.decodeStruct(MediaController_Play_Params); this.play(); return true; case kMediaController_Pause_Name: var params = reader.decodeStruct(MediaController_Pause_Params); this.pause(); return true; case kMediaController_SetMute_Name: var params = reader.decodeStruct(MediaController_SetMute_Params); this.setMute(params.mute); return true; case kMediaController_SetVolume_Name: var params = reader.decodeStruct(MediaController_SetVolume_Params); this.setVolume(params.volume); return true; case kMediaController_Seek_Name: var params = reader.decodeStruct(MediaController_Seek_Params); this.seek(params.time); return true; case kMediaController_ConnectHangoutsMediaRouteController_Name: var params = reader.decodeStruct(MediaController_ConnectHangoutsMediaRouteController_Params); this.connectHangoutsMediaRouteController(params.controllerRequest); return true; default: return false; } }; MediaControllerStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { default: return false; } }; function validateMediaControllerRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMediaController_Play_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaController_Play_Params; break; case kMediaController_Pause_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaController_Pause_Params; break; case kMediaController_SetMute_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaController_SetMute_Params; break; case kMediaController_SetVolume_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaController_SetVolume_Params; break; case kMediaController_Seek_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaController_Seek_Params; break; case kMediaController_ConnectHangoutsMediaRouteController_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaController_ConnectHangoutsMediaRouteController_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateMediaControllerResponse(messageValidator) { return validator.validationError.NONE; } var MediaController = { name: 'media_router.mojom.MediaController', kVersion: 0, ptrClass: MediaControllerPtr, proxyClass: MediaControllerProxy, stubClass: MediaControllerStub, validateRequest: validateMediaControllerRequest, validateResponse: null, }; MediaControllerStub.prototype.validator = validateMediaControllerRequest; MediaControllerProxy.prototype.validator = null; var kHangoutsMediaRouteController_SetLocalPresent_Name = 1649448561; function HangoutsMediaRouteControllerPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(HangoutsMediaRouteController, handleOrPtrInfo); } function HangoutsMediaRouteControllerAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( HangoutsMediaRouteController, associatedInterfacePtrInfo); } HangoutsMediaRouteControllerAssociatedPtr.prototype = Object.create(HangoutsMediaRouteControllerPtr.prototype); HangoutsMediaRouteControllerAssociatedPtr.prototype.constructor = HangoutsMediaRouteControllerAssociatedPtr; function HangoutsMediaRouteControllerProxy(receiver) { this.receiver_ = receiver; } HangoutsMediaRouteControllerPtr.prototype.setLocalPresent = function() { return HangoutsMediaRouteControllerProxy.prototype.setLocalPresent .apply(this.ptr.getProxy(), arguments); }; HangoutsMediaRouteControllerProxy.prototype.setLocalPresent = function(localPresent) { var params_ = new HangoutsMediaRouteController_SetLocalPresent_Params(); params_.localPresent = localPresent; var builder = new codec.MessageV0Builder( kHangoutsMediaRouteController_SetLocalPresent_Name, codec.align(HangoutsMediaRouteController_SetLocalPresent_Params.encodedSize)); builder.encodeStruct(HangoutsMediaRouteController_SetLocalPresent_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function HangoutsMediaRouteControllerStub(delegate) { this.delegate_ = delegate; } HangoutsMediaRouteControllerStub.prototype.setLocalPresent = function(localPresent) { return this.delegate_ && this.delegate_.setLocalPresent && this.delegate_.setLocalPresent(localPresent); } HangoutsMediaRouteControllerStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kHangoutsMediaRouteController_SetLocalPresent_Name: var params = reader.decodeStruct(HangoutsMediaRouteController_SetLocalPresent_Params); this.setLocalPresent(params.localPresent); return true; default: return false; } }; HangoutsMediaRouteControllerStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { default: return false; } }; function validateHangoutsMediaRouteControllerRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kHangoutsMediaRouteController_SetLocalPresent_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = HangoutsMediaRouteController_SetLocalPresent_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateHangoutsMediaRouteControllerResponse(messageValidator) { return validator.validationError.NONE; } var HangoutsMediaRouteController = { name: 'media_router.mojom.HangoutsMediaRouteController', kVersion: 0, ptrClass: HangoutsMediaRouteControllerPtr, proxyClass: HangoutsMediaRouteControllerProxy, stubClass: HangoutsMediaRouteControllerStub, validateRequest: validateHangoutsMediaRouteControllerRequest, validateResponse: null, }; HangoutsMediaRouteControllerStub.prototype.validator = validateHangoutsMediaRouteControllerRequest; HangoutsMediaRouteControllerProxy.prototype.validator = null; exports.MediaController = MediaController; exports.MediaControllerPtr = MediaControllerPtr; exports.MediaControllerAssociatedPtr = MediaControllerAssociatedPtr; exports.HangoutsMediaRouteController = HangoutsMediaRouteController; exports.HangoutsMediaRouteControllerPtr = HangoutsMediaRouteControllerPtr; exports.HangoutsMediaRouteControllerAssociatedPtr = HangoutsMediaRouteControllerAssociatedPtr; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'chrome/common/media_router/mojo/media_router.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mediaRouter.mojom'); var media_controller$ = mojo.internal.exposeNamespace('mediaRouter.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'chrome/common/media_router/mojo/media_controller.mojom', 'media_controller.mojom.js'); } var media_status$ = mojo.internal.exposeNamespace('mediaRouter.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'chrome/common/media_router/mojo/media_status.mojom', 'media_status.mojom.js'); } var mirroring_service_host$ = mojo.internal.exposeNamespace('mirroring.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'components/mirroring/mojom/mirroring_service_host.mojom', '../../../../components/mirroring/mojom/mirroring_service_host.mojom.js'); } var mirror_service_remoting$ = mojo.internal.exposeNamespace('media.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'media/mojo/interfaces/mirror_service_remoting.mojom', '../../../../media/mojo/interfaces/mirror_service_remoting.mojom.js'); } var time$ = mojo.internal.exposeNamespace('mojoBase.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'mojo/public/mojom/base/time.mojom', '../../../../mojo/public/mojom/base/time.mojom.js'); } var ip_address$ = mojo.internal.exposeNamespace('network.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'services/network/public/mojom/ip_address.mojom', '../../../../services/network/public/mojom/ip_address.mojom.js'); } var ip_endpoint$ = mojo.internal.exposeNamespace('network.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'services/network/public/mojom/ip_endpoint.mojom', '../../../../services/network/public/mojom/ip_endpoint.mojom.js'); } var presentation$ = mojo.internal.exposeNamespace('blink.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'third_party/blink/public/mojom/presentation/presentation.mojom', '../../../../third_party/blink/public/mojom/presentation/presentation.mojom.js'); } var origin$ = mojo.internal.exposeNamespace('url.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'url/mojom/origin.mojom', '../../../../url/mojom/origin.mojom.js'); } var url$ = mojo.internal.exposeNamespace('url.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'url/mojom/url.mojom', '../../../../url/mojom/url.mojom.js'); } var SinkIconType = {}; SinkIconType.CAST = 0; SinkIconType.CAST_AUDIO_GROUP = SinkIconType.CAST + 1; SinkIconType.CAST_AUDIO = SinkIconType.CAST_AUDIO_GROUP + 1; SinkIconType.MEETING = SinkIconType.CAST_AUDIO + 1; SinkIconType.HANGOUT = SinkIconType.MEETING + 1; SinkIconType.EDUCATION = SinkIconType.HANGOUT + 1; SinkIconType.WIRED_DISPLAY = SinkIconType.EDUCATION + 1; SinkIconType.GENERIC = SinkIconType.WIRED_DISPLAY + 1; SinkIconType.MIN_VALUE = 0, SinkIconType.MAX_VALUE = 7, SinkIconType.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: return true; } return false; }; SinkIconType.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; var RouteControllerType = {}; RouteControllerType.kNone = 0; RouteControllerType.kGeneric = RouteControllerType.kNone + 1; RouteControllerType.kHangouts = RouteControllerType.kGeneric + 1; RouteControllerType.kMirroring = RouteControllerType.kHangouts + 1; RouteControllerType.MIN_VALUE = 0, RouteControllerType.MAX_VALUE = 3, RouteControllerType.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: return true; } return false; }; RouteControllerType.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; var RouteRequestResultCode = {}; RouteRequestResultCode.UNKNOWN_ERROR = 0; RouteRequestResultCode.OK = RouteRequestResultCode.UNKNOWN_ERROR + 1; RouteRequestResultCode.TIMED_OUT = RouteRequestResultCode.OK + 1; RouteRequestResultCode.ROUTE_NOT_FOUND = RouteRequestResultCode.TIMED_OUT + 1; RouteRequestResultCode.SINK_NOT_FOUND = RouteRequestResultCode.ROUTE_NOT_FOUND + 1; RouteRequestResultCode.INVALID_ORIGIN = RouteRequestResultCode.SINK_NOT_FOUND + 1; RouteRequestResultCode.INCOGNITO_MISMATCH = RouteRequestResultCode.INVALID_ORIGIN + 1; RouteRequestResultCode.NO_SUPPORTED_PROVIDER = RouteRequestResultCode.INCOGNITO_MISMATCH + 1; RouteRequestResultCode.CANCELLED = RouteRequestResultCode.NO_SUPPORTED_PROVIDER + 1; RouteRequestResultCode.ROUTE_ALREADY_EXISTS = RouteRequestResultCode.CANCELLED + 1; RouteRequestResultCode.MIN_VALUE = 0, RouteRequestResultCode.MAX_VALUE = 9, RouteRequestResultCode.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: return true; } return false; }; RouteRequestResultCode.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; function MediaSink(values) { this.initDefaults_(); this.initFields_(values); } MediaSink.prototype.initDefaults_ = function() { this.sinkId = null; this.name = null; this.description = null; this.domain = null; this.iconType = 0; this.providerId = 0; this.extraData = null; }; MediaSink.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaSink.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 64} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaSink.sinkId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaSink.name err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaSink.description err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, true) if (err !== validator.validationError.NONE) return err; // validate MediaSink.domain err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 24, true) if (err !== validator.validationError.NONE) return err; // validate MediaSink.iconType err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 32, SinkIconType); if (err !== validator.validationError.NONE) return err; // validate MediaSink.providerId err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 36, MediaRouteProvider.Id); if (err !== validator.validationError.NONE) return err; // validate MediaSink.extraData err = messageValidator.validateUnion(offset + codec.kStructHeaderSize + 40, MediaSinkExtraData, true); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaSink.encodedSize = codec.kStructHeaderSize + 56; MediaSink.decode = function(decoder) { var packed; var val = new MediaSink(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.sinkId = decoder.decodeStruct(codec.String); val.name = decoder.decodeStruct(codec.String); val.description = decoder.decodeStruct(codec.NullableString); val.domain = decoder.decodeStruct(codec.NullableString); val.iconType = decoder.decodeStruct(codec.Int32); val.providerId = decoder.decodeStruct(codec.Int32); val.extraData = decoder.decodeStruct(MediaSinkExtraData); return val; }; MediaSink.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaSink.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.sinkId); encoder.encodeStruct(codec.String, val.name); encoder.encodeStruct(codec.NullableString, val.description); encoder.encodeStruct(codec.NullableString, val.domain); encoder.encodeStruct(codec.Int32, val.iconType); encoder.encodeStruct(codec.Int32, val.providerId); encoder.encodeStruct(MediaSinkExtraData, val.extraData); }; function DialMediaSink(values) { this.initDefaults_(); this.initFields_(values); } DialMediaSink.prototype.initDefaults_ = function() { this.ipAddress = null; this.modelName = null; this.appUrl = null; }; DialMediaSink.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; DialMediaSink.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate DialMediaSink.ipAddress err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, ip_address$.IPAddress, false); if (err !== validator.validationError.NONE) return err; // validate DialMediaSink.modelName err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate DialMediaSink.appUrl err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 16, url$.Url, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; DialMediaSink.encodedSize = codec.kStructHeaderSize + 24; DialMediaSink.decode = function(decoder) { var packed; var val = new DialMediaSink(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.ipAddress = decoder.decodeStructPointer(ip_address$.IPAddress); val.modelName = decoder.decodeStruct(codec.String); val.appUrl = decoder.decodeStructPointer(url$.Url); return val; }; DialMediaSink.encode = function(encoder, val) { var packed; encoder.writeUint32(DialMediaSink.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(ip_address$.IPAddress, val.ipAddress); encoder.encodeStruct(codec.String, val.modelName); encoder.encodeStructPointer(url$.Url, val.appUrl); }; function CastMediaSink(values) { this.initDefaults_(); this.initFields_(values); } CastMediaSink.prototype.initDefaults_ = function() { this.ipEndpoint = null; this.modelName = null; this.capabilities = 0; this.castChannelId = 0; }; CastMediaSink.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; CastMediaSink.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate CastMediaSink.ipEndpoint err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, ip_endpoint$.IPEndPoint, false); if (err !== validator.validationError.NONE) return err; // validate CastMediaSink.modelName err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; CastMediaSink.encodedSize = codec.kStructHeaderSize + 24; CastMediaSink.decode = function(decoder) { var packed; var val = new CastMediaSink(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.ipEndpoint = decoder.decodeStructPointer(ip_endpoint$.IPEndPoint); val.modelName = decoder.decodeStruct(codec.String); val.capabilities = decoder.decodeStruct(codec.Uint8); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.castChannelId = decoder.decodeStruct(codec.Int32); return val; }; CastMediaSink.encode = function(encoder, val) { var packed; encoder.writeUint32(CastMediaSink.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(ip_endpoint$.IPEndPoint, val.ipEndpoint); encoder.encodeStruct(codec.String, val.modelName); encoder.encodeStruct(codec.Uint8, val.capabilities); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStruct(codec.Int32, val.castChannelId); }; function MediaRoute(values) { this.initDefaults_(); this.initFields_(values); } MediaRoute.prototype.initDefaults_ = function() { this.mediaRouteId = null; this.presentationId = null; this.mediaSource = null; this.mediaSinkId = null; this.description = null; this.isLocal = false; this.forDisplay = false; this.isIncognito = false; this.isLocalPresentation = false; this.controllerType = 0; }; MediaRoute.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRoute.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 56} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRoute.mediaRouteId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRoute.presentationId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRoute.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, true) if (err !== validator.validationError.NONE) return err; // validate MediaRoute.mediaSinkId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 24, false) if (err !== validator.validationError.NONE) return err; // validate MediaRoute.description err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 32, false) if (err !== validator.validationError.NONE) return err; // validate MediaRoute.controllerType err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 44, RouteControllerType); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRoute.encodedSize = codec.kStructHeaderSize + 48; MediaRoute.decode = function(decoder) { var packed; var val = new MediaRoute(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaRouteId = decoder.decodeStruct(codec.String); val.presentationId = decoder.decodeStruct(codec.String); val.mediaSource = decoder.decodeStruct(codec.NullableString); val.mediaSinkId = decoder.decodeStruct(codec.String); val.description = decoder.decodeStruct(codec.String); packed = decoder.readUint8(); val.isLocal = (packed >> 0) & 1 ? true : false; val.forDisplay = (packed >> 1) & 1 ? true : false; val.isIncognito = (packed >> 2) & 1 ? true : false; val.isLocalPresentation = (packed >> 3) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); val.controllerType = decoder.decodeStruct(codec.Int32); return val; }; MediaRoute.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRoute.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaRouteId); encoder.encodeStruct(codec.String, val.presentationId); encoder.encodeStruct(codec.NullableString, val.mediaSource); encoder.encodeStruct(codec.String, val.mediaSinkId); encoder.encodeStruct(codec.String, val.description); packed = 0; packed |= (val.isLocal & 1) << 0 packed |= (val.forDisplay & 1) << 1 packed |= (val.isIncognito & 1) << 2 packed |= (val.isLocalPresentation & 1) << 3 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStruct(codec.Int32, val.controllerType); }; function Issue(values) { this.initDefaults_(); this.initFields_(values); } Issue.Severity = {}; Issue.Severity.FATAL = 0; Issue.Severity.WARNING = Issue.Severity.FATAL + 1; Issue.Severity.NOTIFICATION = Issue.Severity.WARNING + 1; Issue.Severity.MIN_VALUE = 0, Issue.Severity.MAX_VALUE = 2, Issue.Severity.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: return true; } return false; }; Issue.Severity.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; Issue.ActionType = {}; Issue.ActionType.DISMISS = 0; Issue.ActionType.LEARN_MORE = Issue.ActionType.DISMISS + 1; Issue.ActionType.MIN_VALUE = 0, Issue.ActionType.MAX_VALUE = 1, Issue.ActionType.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: return true; } return false; }; Issue.ActionType.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; Issue.prototype.initDefaults_ = function() { this.routeId = null; this.sinkId = null; this.severity = 0; this.isBlocking = false; this.title = null; this.message = null; this.defaultAction = 0; this.helpPageId = 0; this.secondaryActions = null; }; Issue.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; Issue.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 64} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate Issue.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate Issue.sinkId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate Issue.severity err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 16, Issue.Severity); if (err !== validator.validationError.NONE) return err; // validate Issue.title err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 24, false) if (err !== validator.validationError.NONE) return err; // validate Issue.message err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 32, true) if (err !== validator.validationError.NONE) return err; // validate Issue.defaultAction err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 40, Issue.ActionType); if (err !== validator.validationError.NONE) return err; // validate Issue.secondaryActions err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 48, 4, new codec.Enum(Issue.ActionType), false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; Issue.encodedSize = codec.kStructHeaderSize + 56; Issue.decode = function(decoder) { var packed; var val = new Issue(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); val.sinkId = decoder.decodeStruct(codec.String); val.severity = decoder.decodeStruct(codec.Int32); packed = decoder.readUint8(); val.isBlocking = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); val.title = decoder.decodeStruct(codec.String); val.message = decoder.decodeStruct(codec.NullableString); val.defaultAction = decoder.decodeStruct(codec.Int32); val.helpPageId = decoder.decodeStruct(codec.Int32); val.secondaryActions = decoder.decodeArrayPointer(new codec.Enum(Issue.ActionType)); return val; }; Issue.encode = function(encoder, val) { var packed; encoder.writeUint32(Issue.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); encoder.encodeStruct(codec.String, val.sinkId); encoder.encodeStruct(codec.Int32, val.severity); packed = 0; packed |= (val.isBlocking & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStruct(codec.String, val.title); encoder.encodeStruct(codec.NullableString, val.message); encoder.encodeStruct(codec.Int32, val.defaultAction); encoder.encodeStruct(codec.Int32, val.helpPageId); encoder.encodeArrayPointer(new codec.Enum(Issue.ActionType), val.secondaryActions); }; function RouteMessage(values) { this.initDefaults_(); this.initFields_(values); } RouteMessage.Type = {}; RouteMessage.Type.TEXT = 0; RouteMessage.Type.BINARY = RouteMessage.Type.TEXT + 1; RouteMessage.Type.MIN_VALUE = 0, RouteMessage.Type.MAX_VALUE = 1, RouteMessage.Type.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: return true; } return false; }; RouteMessage.Type.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; RouteMessage.prototype.initDefaults_ = function() { this.type = 0; this.message = null; this.data = null; }; RouteMessage.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; RouteMessage.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate RouteMessage.type err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, RouteMessage.Type); if (err !== validator.validationError.NONE) return err; // validate RouteMessage.message err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, true) if (err !== validator.validationError.NONE) return err; // validate RouteMessage.data err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 1, codec.Uint8, true, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; RouteMessage.encodedSize = codec.kStructHeaderSize + 24; RouteMessage.decode = function(decoder) { var packed; var val = new RouteMessage(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.type = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.message = decoder.decodeStruct(codec.NullableString); val.data = decoder.decodeArrayPointer(codec.Uint8); return val; }; RouteMessage.encode = function(encoder, val) { var packed; encoder.writeUint32(RouteMessage.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.type); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStruct(codec.NullableString, val.message); encoder.encodeArrayPointer(codec.Uint8, val.data); }; function SinkSearchCriteria(values) { this.initDefaults_(); this.initFields_(values); } SinkSearchCriteria.prototype.initDefaults_ = function() { this.input = null; this.domain = null; }; SinkSearchCriteria.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; SinkSearchCriteria.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate SinkSearchCriteria.input err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate SinkSearchCriteria.domain err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; SinkSearchCriteria.encodedSize = codec.kStructHeaderSize + 16; SinkSearchCriteria.decode = function(decoder) { var packed; var val = new SinkSearchCriteria(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.input = decoder.decodeStruct(codec.String); val.domain = decoder.decodeStruct(codec.String); return val; }; SinkSearchCriteria.encode = function(encoder, val) { var packed; encoder.writeUint32(SinkSearchCriteria.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.input); encoder.encodeStruct(codec.String, val.domain); }; function MediaRouteProviderConfig(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProviderConfig.prototype.initDefaults_ = function() { this.enableDialDiscovery = false; this.enableCastDiscovery = false; this.enableDialSinkQuery = false; this.enableCastSinkQuery = false; this.useViewsDialog = false; this.useMirroringService = false; }; MediaRouteProviderConfig.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProviderConfig.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProviderConfig.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProviderConfig.decode = function(decoder) { var packed; var val = new MediaRouteProviderConfig(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); packed = decoder.readUint8(); val.enableDialDiscovery = (packed >> 0) & 1 ? true : false; val.enableCastDiscovery = (packed >> 1) & 1 ? true : false; val.enableDialSinkQuery = (packed >> 2) & 1 ? true : false; val.enableCastSinkQuery = (packed >> 3) & 1 ? true : false; val.useViewsDialog = (packed >> 4) & 1 ? true : false; val.useMirroringService = (packed >> 5) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouteProviderConfig.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProviderConfig.encodedSize); encoder.writeUint32(0); packed = 0; packed |= (val.enableDialDiscovery & 1) << 0 packed |= (val.enableCastDiscovery & 1) << 1 packed |= (val.enableDialSinkQuery & 1) << 2 packed |= (val.enableCastSinkQuery & 1) << 3 packed |= (val.useViewsDialog & 1) << 4 packed |= (val.useMirroringService & 1) << 5 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function RoutePresentationConnection(values) { this.initDefaults_(); this.initFields_(values); } RoutePresentationConnection.prototype.initDefaults_ = function() { this.connectionPtr = new presentation$.PresentationConnectionPtr(); this.connectionRequest = new bindings.InterfaceRequest(); }; RoutePresentationConnection.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; RoutePresentationConnection.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate RoutePresentationConnection.connectionPtr err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 0, false); if (err !== validator.validationError.NONE) return err; // validate RoutePresentationConnection.connectionRequest err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; RoutePresentationConnection.encodedSize = codec.kStructHeaderSize + 16; RoutePresentationConnection.decode = function(decoder) { var packed; var val = new RoutePresentationConnection(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.connectionPtr = decoder.decodeStruct(new codec.Interface(presentation$.PresentationConnectionPtr)); val.connectionRequest = decoder.decodeStruct(codec.InterfaceRequest); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; RoutePresentationConnection.encode = function(encoder, val) { var packed; encoder.writeUint32(RoutePresentationConnection.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(new codec.Interface(presentation$.PresentationConnectionPtr), val.connectionPtr); encoder.encodeStruct(codec.InterfaceRequest, val.connectionRequest); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouteProvider_CreateRoute_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_CreateRoute_Params.prototype.initDefaults_ = function() { this.mediaSource = null; this.sinkId = null; this.originalPresentationId = null; this.origin = null; this.tabId = 0; this.incognito = false; this.timeout = null; }; MediaRouteProvider_CreateRoute_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_CreateRoute_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 56} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_Params.sinkId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_Params.originalPresentationId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_Params.origin err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 24, origin$.Origin, false); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_Params.timeout err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 40, time$.TimeDelta, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_CreateRoute_Params.encodedSize = codec.kStructHeaderSize + 48; MediaRouteProvider_CreateRoute_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_CreateRoute_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); val.sinkId = decoder.decodeStruct(codec.String); val.originalPresentationId = decoder.decodeStruct(codec.String); val.origin = decoder.decodeStructPointer(origin$.Origin); val.tabId = decoder.decodeStruct(codec.Int32); packed = decoder.readUint8(); val.incognito = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); val.timeout = decoder.decodeStructPointer(time$.TimeDelta); return val; }; MediaRouteProvider_CreateRoute_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_CreateRoute_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); encoder.encodeStruct(codec.String, val.sinkId); encoder.encodeStruct(codec.String, val.originalPresentationId); encoder.encodeStructPointer(origin$.Origin, val.origin); encoder.encodeStruct(codec.Int32, val.tabId); packed = 0; packed |= (val.incognito & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStructPointer(time$.TimeDelta, val.timeout); }; function MediaRouteProvider_CreateRoute_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_CreateRoute_ResponseParams.prototype.initDefaults_ = function() { this.route = null; this.connection = null; this.errorText = null; this.resultCode = 0; }; MediaRouteProvider_CreateRoute_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_CreateRoute_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_ResponseParams.route err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, MediaRoute, true); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_ResponseParams.connection err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, RoutePresentationConnection, true); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_ResponseParams.errorText err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, true) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateRoute_ResponseParams.resultCode err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 24, RouteRequestResultCode); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_CreateRoute_ResponseParams.encodedSize = codec.kStructHeaderSize + 32; MediaRouteProvider_CreateRoute_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouteProvider_CreateRoute_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.route = decoder.decodeStructPointer(MediaRoute); val.connection = decoder.decodeStructPointer(RoutePresentationConnection); val.errorText = decoder.decodeStruct(codec.NullableString); val.resultCode = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouteProvider_CreateRoute_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_CreateRoute_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(MediaRoute, val.route); encoder.encodeStructPointer(RoutePresentationConnection, val.connection); encoder.encodeStruct(codec.NullableString, val.errorText); encoder.encodeStruct(codec.Int32, val.resultCode); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouteProvider_JoinRoute_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_JoinRoute_Params.prototype.initDefaults_ = function() { this.mediaSource = null; this.presentationId = null; this.origin = null; this.tabId = 0; this.incognito = false; this.timeout = null; }; MediaRouteProvider_JoinRoute_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_JoinRoute_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 48} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_Params.presentationId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_Params.origin err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 16, origin$.Origin, false); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_Params.timeout err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 32, time$.TimeDelta, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_JoinRoute_Params.encodedSize = codec.kStructHeaderSize + 40; MediaRouteProvider_JoinRoute_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_JoinRoute_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); val.presentationId = decoder.decodeStruct(codec.String); val.origin = decoder.decodeStructPointer(origin$.Origin); val.tabId = decoder.decodeStruct(codec.Int32); packed = decoder.readUint8(); val.incognito = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); val.timeout = decoder.decodeStructPointer(time$.TimeDelta); return val; }; MediaRouteProvider_JoinRoute_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_JoinRoute_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); encoder.encodeStruct(codec.String, val.presentationId); encoder.encodeStructPointer(origin$.Origin, val.origin); encoder.encodeStruct(codec.Int32, val.tabId); packed = 0; packed |= (val.incognito & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStructPointer(time$.TimeDelta, val.timeout); }; function MediaRouteProvider_JoinRoute_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_JoinRoute_ResponseParams.prototype.initDefaults_ = function() { this.route = null; this.connection = null; this.errorText = null; this.resultCode = 0; }; MediaRouteProvider_JoinRoute_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_JoinRoute_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_ResponseParams.route err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, MediaRoute, true); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_ResponseParams.connection err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, RoutePresentationConnection, true); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_ResponseParams.errorText err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, true) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_JoinRoute_ResponseParams.resultCode err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 24, RouteRequestResultCode); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_JoinRoute_ResponseParams.encodedSize = codec.kStructHeaderSize + 32; MediaRouteProvider_JoinRoute_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouteProvider_JoinRoute_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.route = decoder.decodeStructPointer(MediaRoute); val.connection = decoder.decodeStructPointer(RoutePresentationConnection); val.errorText = decoder.decodeStruct(codec.NullableString); val.resultCode = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouteProvider_JoinRoute_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_JoinRoute_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(MediaRoute, val.route); encoder.encodeStructPointer(RoutePresentationConnection, val.connection); encoder.encodeStruct(codec.NullableString, val.errorText); encoder.encodeStruct(codec.Int32, val.resultCode); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouteProvider_ConnectRouteByRouteId_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_ConnectRouteByRouteId_Params.prototype.initDefaults_ = function() { this.mediaSource = null; this.routeId = null; this.presentationId = null; this.origin = null; this.tabId = 0; this.incognito = false; this.timeout = null; }; MediaRouteProvider_ConnectRouteByRouteId_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_ConnectRouteByRouteId_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 56} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_Params.presentationId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_Params.origin err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 24, origin$.Origin, false); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_Params.timeout err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 40, time$.TimeDelta, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_ConnectRouteByRouteId_Params.encodedSize = codec.kStructHeaderSize + 48; MediaRouteProvider_ConnectRouteByRouteId_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_ConnectRouteByRouteId_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); val.routeId = decoder.decodeStruct(codec.String); val.presentationId = decoder.decodeStruct(codec.String); val.origin = decoder.decodeStructPointer(origin$.Origin); val.tabId = decoder.decodeStruct(codec.Int32); packed = decoder.readUint8(); val.incognito = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); val.timeout = decoder.decodeStructPointer(time$.TimeDelta); return val; }; MediaRouteProvider_ConnectRouteByRouteId_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_ConnectRouteByRouteId_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); encoder.encodeStruct(codec.String, val.routeId); encoder.encodeStruct(codec.String, val.presentationId); encoder.encodeStructPointer(origin$.Origin, val.origin); encoder.encodeStruct(codec.Int32, val.tabId); packed = 0; packed |= (val.incognito & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStructPointer(time$.TimeDelta, val.timeout); }; function MediaRouteProvider_ConnectRouteByRouteId_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.prototype.initDefaults_ = function() { this.route = null; this.connection = null; this.errorText = null; this.resultCode = 0; }; MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.route err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, MediaRoute, true); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.connection err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, RoutePresentationConnection, true); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.errorText err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, true) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.resultCode err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 24, RouteRequestResultCode); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.encodedSize = codec.kStructHeaderSize + 32; MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouteProvider_ConnectRouteByRouteId_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.route = decoder.decodeStructPointer(MediaRoute); val.connection = decoder.decodeStructPointer(RoutePresentationConnection); val.errorText = decoder.decodeStruct(codec.NullableString); val.resultCode = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(MediaRoute, val.route); encoder.encodeStructPointer(RoutePresentationConnection, val.connection); encoder.encodeStruct(codec.NullableString, val.errorText); encoder.encodeStruct(codec.Int32, val.resultCode); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouteProvider_TerminateRoute_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_TerminateRoute_Params.prototype.initDefaults_ = function() { this.routeId = null; }; MediaRouteProvider_TerminateRoute_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_TerminateRoute_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_TerminateRoute_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_TerminateRoute_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_TerminateRoute_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_TerminateRoute_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_TerminateRoute_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_TerminateRoute_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); }; function MediaRouteProvider_TerminateRoute_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_TerminateRoute_ResponseParams.prototype.initDefaults_ = function() { this.errorText = null; this.resultCode = 0; }; MediaRouteProvider_TerminateRoute_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_TerminateRoute_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_TerminateRoute_ResponseParams.errorText err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, true) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_TerminateRoute_ResponseParams.resultCode err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, RouteRequestResultCode); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_TerminateRoute_ResponseParams.encodedSize = codec.kStructHeaderSize + 16; MediaRouteProvider_TerminateRoute_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouteProvider_TerminateRoute_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.errorText = decoder.decodeStruct(codec.NullableString); val.resultCode = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouteProvider_TerminateRoute_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_TerminateRoute_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.NullableString, val.errorText); encoder.encodeStruct(codec.Int32, val.resultCode); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouteProvider_SendRouteMessage_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_SendRouteMessage_Params.prototype.initDefaults_ = function() { this.mediaRouteId = null; this.message = null; }; MediaRouteProvider_SendRouteMessage_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_SendRouteMessage_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SendRouteMessage_Params.mediaRouteId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SendRouteMessage_Params.message err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_SendRouteMessage_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouteProvider_SendRouteMessage_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_SendRouteMessage_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaRouteId = decoder.decodeStruct(codec.String); val.message = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_SendRouteMessage_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_SendRouteMessage_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaRouteId); encoder.encodeStruct(codec.String, val.message); }; function MediaRouteProvider_SendRouteBinaryMessage_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_SendRouteBinaryMessage_Params.prototype.initDefaults_ = function() { this.mediaRouteId = null; this.data = null; }; MediaRouteProvider_SendRouteBinaryMessage_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_SendRouteBinaryMessage_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SendRouteBinaryMessage_Params.mediaRouteId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SendRouteBinaryMessage_Params.data err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_SendRouteBinaryMessage_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouteProvider_SendRouteBinaryMessage_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_SendRouteBinaryMessage_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaRouteId = decoder.decodeStruct(codec.String); val.data = decoder.decodeArrayPointer(codec.Uint8); return val; }; MediaRouteProvider_SendRouteBinaryMessage_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_SendRouteBinaryMessage_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaRouteId); encoder.encodeArrayPointer(codec.Uint8, val.data); }; function MediaRouteProvider_StartObservingMediaSinks_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_StartObservingMediaSinks_Params.prototype.initDefaults_ = function() { this.mediaSource = null; }; MediaRouteProvider_StartObservingMediaSinks_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_StartObservingMediaSinks_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_StartObservingMediaSinks_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_StartObservingMediaSinks_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_StartObservingMediaSinks_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_StartObservingMediaSinks_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_StartObservingMediaSinks_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_StartObservingMediaSinks_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); }; function MediaRouteProvider_StopObservingMediaSinks_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_StopObservingMediaSinks_Params.prototype.initDefaults_ = function() { this.mediaSource = null; }; MediaRouteProvider_StopObservingMediaSinks_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_StopObservingMediaSinks_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_StopObservingMediaSinks_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_StopObservingMediaSinks_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_StopObservingMediaSinks_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_StopObservingMediaSinks_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_StopObservingMediaSinks_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_StopObservingMediaSinks_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); }; function MediaRouteProvider_StartObservingMediaRoutes_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_StartObservingMediaRoutes_Params.prototype.initDefaults_ = function() { this.mediaSource = null; }; MediaRouteProvider_StartObservingMediaRoutes_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_StartObservingMediaRoutes_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_StartObservingMediaRoutes_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_StartObservingMediaRoutes_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_StartObservingMediaRoutes_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_StartObservingMediaRoutes_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_StartObservingMediaRoutes_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_StartObservingMediaRoutes_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); }; function MediaRouteProvider_StopObservingMediaRoutes_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_StopObservingMediaRoutes_Params.prototype.initDefaults_ = function() { this.mediaSource = null; }; MediaRouteProvider_StopObservingMediaRoutes_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_StopObservingMediaRoutes_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_StopObservingMediaRoutes_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_StopObservingMediaRoutes_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_StopObservingMediaRoutes_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_StopObservingMediaRoutes_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_StopObservingMediaRoutes_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_StopObservingMediaRoutes_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); }; function MediaRouteProvider_StartListeningForRouteMessages_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_StartListeningForRouteMessages_Params.prototype.initDefaults_ = function() { this.routeId = null; }; MediaRouteProvider_StartListeningForRouteMessages_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_StartListeningForRouteMessages_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_StartListeningForRouteMessages_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_StartListeningForRouteMessages_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_StartListeningForRouteMessages_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_StartListeningForRouteMessages_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_StartListeningForRouteMessages_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_StartListeningForRouteMessages_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); }; function MediaRouteProvider_StopListeningForRouteMessages_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_StopListeningForRouteMessages_Params.prototype.initDefaults_ = function() { this.routeId = null; }; MediaRouteProvider_StopListeningForRouteMessages_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_StopListeningForRouteMessages_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_StopListeningForRouteMessages_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_StopListeningForRouteMessages_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_StopListeningForRouteMessages_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_StopListeningForRouteMessages_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_StopListeningForRouteMessages_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_StopListeningForRouteMessages_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); }; function MediaRouteProvider_DetachRoute_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_DetachRoute_Params.prototype.initDefaults_ = function() { this.routeId = null; }; MediaRouteProvider_DetachRoute_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_DetachRoute_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_DetachRoute_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_DetachRoute_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_DetachRoute_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_DetachRoute_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_DetachRoute_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_DetachRoute_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); }; function MediaRouteProvider_EnableMdnsDiscovery_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_EnableMdnsDiscovery_Params.prototype.initDefaults_ = function() { }; MediaRouteProvider_EnableMdnsDiscovery_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_EnableMdnsDiscovery_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_EnableMdnsDiscovery_Params.encodedSize = codec.kStructHeaderSize + 0; MediaRouteProvider_EnableMdnsDiscovery_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_EnableMdnsDiscovery_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; MediaRouteProvider_EnableMdnsDiscovery_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_EnableMdnsDiscovery_Params.encodedSize); encoder.writeUint32(0); }; function MediaRouteProvider_UpdateMediaSinks_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_UpdateMediaSinks_Params.prototype.initDefaults_ = function() { this.mediaSource = null; }; MediaRouteProvider_UpdateMediaSinks_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_UpdateMediaSinks_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_UpdateMediaSinks_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_UpdateMediaSinks_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_UpdateMediaSinks_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_UpdateMediaSinks_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.mediaSource = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_UpdateMediaSinks_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_UpdateMediaSinks_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.mediaSource); }; function MediaRouteProvider_SearchSinks_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_SearchSinks_Params.prototype.initDefaults_ = function() { this.sinkId = null; this.mediaSource = null; this.searchCriteria = null; }; MediaRouteProvider_SearchSinks_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_SearchSinks_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SearchSinks_Params.sinkId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SearchSinks_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SearchSinks_Params.searchCriteria err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 16, SinkSearchCriteria, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_SearchSinks_Params.encodedSize = codec.kStructHeaderSize + 24; MediaRouteProvider_SearchSinks_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_SearchSinks_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.sinkId = decoder.decodeStruct(codec.String); val.mediaSource = decoder.decodeStruct(codec.String); val.searchCriteria = decoder.decodeStructPointer(SinkSearchCriteria); return val; }; MediaRouteProvider_SearchSinks_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_SearchSinks_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.sinkId); encoder.encodeStruct(codec.String, val.mediaSource); encoder.encodeStructPointer(SinkSearchCriteria, val.searchCriteria); }; function MediaRouteProvider_SearchSinks_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_SearchSinks_ResponseParams.prototype.initDefaults_ = function() { this.sinkId = null; }; MediaRouteProvider_SearchSinks_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_SearchSinks_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_SearchSinks_ResponseParams.sinkId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_SearchSinks_ResponseParams.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_SearchSinks_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouteProvider_SearchSinks_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.sinkId = decoder.decodeStruct(codec.String); return val; }; MediaRouteProvider_SearchSinks_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_SearchSinks_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.sinkId); }; function MediaRouteProvider_ProvideSinks_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_ProvideSinks_Params.prototype.initDefaults_ = function() { this.providerName = null; this.sinks = null; }; MediaRouteProvider_ProvideSinks_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_ProvideSinks_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ProvideSinks_Params.providerName err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_ProvideSinks_Params.sinks err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 8, new codec.PointerTo(MediaSink), false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_ProvideSinks_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouteProvider_ProvideSinks_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_ProvideSinks_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.providerName = decoder.decodeStruct(codec.String); val.sinks = decoder.decodeArrayPointer(new codec.PointerTo(MediaSink)); return val; }; MediaRouteProvider_ProvideSinks_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_ProvideSinks_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.providerName); encoder.encodeArrayPointer(new codec.PointerTo(MediaSink), val.sinks); }; function MediaRouteProvider_CreateMediaRouteController_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_CreateMediaRouteController_Params.prototype.initDefaults_ = function() { this.routeId = null; this.mediaController = new bindings.InterfaceRequest(); this.observer = new media_status$.MediaStatusObserverPtr(); }; MediaRouteProvider_CreateMediaRouteController_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_CreateMediaRouteController_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateMediaRouteController_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateMediaRouteController_Params.mediaController err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouteProvider_CreateMediaRouteController_Params.observer err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 12, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_CreateMediaRouteController_Params.encodedSize = codec.kStructHeaderSize + 24; MediaRouteProvider_CreateMediaRouteController_Params.decode = function(decoder) { var packed; var val = new MediaRouteProvider_CreateMediaRouteController_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); val.mediaController = decoder.decodeStruct(codec.InterfaceRequest); val.observer = decoder.decodeStruct(new codec.Interface(media_status$.MediaStatusObserverPtr)); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouteProvider_CreateMediaRouteController_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_CreateMediaRouteController_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); encoder.encodeStruct(codec.InterfaceRequest, val.mediaController); encoder.encodeStruct(new codec.Interface(media_status$.MediaStatusObserverPtr), val.observer); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouteProvider_CreateMediaRouteController_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouteProvider_CreateMediaRouteController_ResponseParams.prototype.initDefaults_ = function() { this.success = false; }; MediaRouteProvider_CreateMediaRouteController_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouteProvider_CreateMediaRouteController_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouteProvider_CreateMediaRouteController_ResponseParams.encodedSize = codec.kStructHeaderSize + 8; MediaRouteProvider_CreateMediaRouteController_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouteProvider_CreateMediaRouteController_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); packed = decoder.readUint8(); val.success = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouteProvider_CreateMediaRouteController_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouteProvider_CreateMediaRouteController_ResponseParams.encodedSize); encoder.writeUint32(0); packed = 0; packed |= (val.success & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouter_RegisterMediaRouteProvider_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_RegisterMediaRouteProvider_Params.prototype.initDefaults_ = function() { this.providerId = 0; this.mediaRouterProvider = new MediaRouteProviderPtr(); }; MediaRouter_RegisterMediaRouteProvider_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_RegisterMediaRouteProvider_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_RegisterMediaRouteProvider_Params.providerId err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, MediaRouteProvider.Id); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_RegisterMediaRouteProvider_Params.mediaRouterProvider err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 4, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_RegisterMediaRouteProvider_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouter_RegisterMediaRouteProvider_Params.decode = function(decoder) { var packed; var val = new MediaRouter_RegisterMediaRouteProvider_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.providerId = decoder.decodeStruct(codec.Int32); val.mediaRouterProvider = decoder.decodeStruct(new codec.Interface(MediaRouteProviderPtr)); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouter_RegisterMediaRouteProvider_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_RegisterMediaRouteProvider_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.providerId); encoder.encodeStruct(new codec.Interface(MediaRouteProviderPtr), val.mediaRouterProvider); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouter_RegisterMediaRouteProvider_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_RegisterMediaRouteProvider_ResponseParams.prototype.initDefaults_ = function() { this.instanceId = null; this.config = null; }; MediaRouter_RegisterMediaRouteProvider_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_RegisterMediaRouteProvider_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_RegisterMediaRouteProvider_ResponseParams.instanceId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_RegisterMediaRouteProvider_ResponseParams.config err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, MediaRouteProviderConfig, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_RegisterMediaRouteProvider_ResponseParams.encodedSize = codec.kStructHeaderSize + 16; MediaRouter_RegisterMediaRouteProvider_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouter_RegisterMediaRouteProvider_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.instanceId = decoder.decodeStruct(codec.String); val.config = decoder.decodeStructPointer(MediaRouteProviderConfig); return val; }; MediaRouter_RegisterMediaRouteProvider_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_RegisterMediaRouteProvider_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.instanceId); encoder.encodeStructPointer(MediaRouteProviderConfig, val.config); }; function MediaRouter_OnSinksReceived_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnSinksReceived_Params.prototype.initDefaults_ = function() { this.providerId = 0; this.mediaSource = null; this.sinks = null; this.origins = null; }; MediaRouter_OnSinksReceived_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnSinksReceived_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnSinksReceived_Params.providerId err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, MediaRouteProvider.Id); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnSinksReceived_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnSinksReceived_Params.sinks err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 8, new codec.PointerTo(MediaSink), false, [0], 0); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnSinksReceived_Params.origins err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 24, 8, new codec.PointerTo(origin$.Origin), false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnSinksReceived_Params.encodedSize = codec.kStructHeaderSize + 32; MediaRouter_OnSinksReceived_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnSinksReceived_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.providerId = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.mediaSource = decoder.decodeStruct(codec.String); val.sinks = decoder.decodeArrayPointer(new codec.PointerTo(MediaSink)); val.origins = decoder.decodeArrayPointer(new codec.PointerTo(origin$.Origin)); return val; }; MediaRouter_OnSinksReceived_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnSinksReceived_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.providerId); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStruct(codec.String, val.mediaSource); encoder.encodeArrayPointer(new codec.PointerTo(MediaSink), val.sinks); encoder.encodeArrayPointer(new codec.PointerTo(origin$.Origin), val.origins); }; function MediaRouter_OnIssue_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnIssue_Params.prototype.initDefaults_ = function() { this.issue = null; }; MediaRouter_OnIssue_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnIssue_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnIssue_Params.issue err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, Issue, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnIssue_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouter_OnIssue_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnIssue_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.issue = decoder.decodeStructPointer(Issue); return val; }; MediaRouter_OnIssue_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnIssue_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(Issue, val.issue); }; function MediaRouter_OnRoutesUpdated_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnRoutesUpdated_Params.prototype.initDefaults_ = function() { this.providerId = 0; this.routes = null; this.mediaSource = null; this.joinableRouteIds = null; }; MediaRouter_OnRoutesUpdated_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnRoutesUpdated_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnRoutesUpdated_Params.providerId err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, MediaRouteProvider.Id); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnRoutesUpdated_Params.routes err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 8, new codec.PointerTo(MediaRoute), false, [0], 0); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnRoutesUpdated_Params.mediaSource err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnRoutesUpdated_Params.joinableRouteIds err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 24, 8, codec.String, false, [0, 0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnRoutesUpdated_Params.encodedSize = codec.kStructHeaderSize + 32; MediaRouter_OnRoutesUpdated_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnRoutesUpdated_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.providerId = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.routes = decoder.decodeArrayPointer(new codec.PointerTo(MediaRoute)); val.mediaSource = decoder.decodeStruct(codec.String); val.joinableRouteIds = decoder.decodeArrayPointer(codec.String); return val; }; MediaRouter_OnRoutesUpdated_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnRoutesUpdated_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.providerId); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeArrayPointer(new codec.PointerTo(MediaRoute), val.routes); encoder.encodeStruct(codec.String, val.mediaSource); encoder.encodeArrayPointer(codec.String, val.joinableRouteIds); }; function MediaRouter_OnSinkAvailabilityUpdated_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnSinkAvailabilityUpdated_Params.prototype.initDefaults_ = function() { this.providerId = 0; this.availability = 0; }; MediaRouter_OnSinkAvailabilityUpdated_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnSinkAvailabilityUpdated_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnSinkAvailabilityUpdated_Params.providerId err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, MediaRouteProvider.Id); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnSinkAvailabilityUpdated_Params.availability err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 4, MediaRouter.SinkAvailability); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnSinkAvailabilityUpdated_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouter_OnSinkAvailabilityUpdated_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnSinkAvailabilityUpdated_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.providerId = decoder.decodeStruct(codec.Int32); val.availability = decoder.decodeStruct(codec.Int32); return val; }; MediaRouter_OnSinkAvailabilityUpdated_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnSinkAvailabilityUpdated_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.providerId); encoder.encodeStruct(codec.Int32, val.availability); }; function MediaRouter_OnPresentationConnectionStateChanged_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnPresentationConnectionStateChanged_Params.prototype.initDefaults_ = function() { this.routeId = null; this.state = 0; }; MediaRouter_OnPresentationConnectionStateChanged_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnPresentationConnectionStateChanged_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnPresentationConnectionStateChanged_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnPresentationConnectionStateChanged_Params.state err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, MediaRouter.PresentationConnectionState); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnPresentationConnectionStateChanged_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouter_OnPresentationConnectionStateChanged_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnPresentationConnectionStateChanged_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); val.state = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouter_OnPresentationConnectionStateChanged_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnPresentationConnectionStateChanged_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); encoder.encodeStruct(codec.Int32, val.state); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaRouter_OnPresentationConnectionClosed_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnPresentationConnectionClosed_Params.prototype.initDefaults_ = function() { this.routeId = null; this.reason = 0; this.message = null; }; MediaRouter_OnPresentationConnectionClosed_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnPresentationConnectionClosed_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnPresentationConnectionClosed_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnPresentationConnectionClosed_Params.reason err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, MediaRouter.PresentationConnectionCloseReason); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnPresentationConnectionClosed_Params.message err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnPresentationConnectionClosed_Params.encodedSize = codec.kStructHeaderSize + 24; MediaRouter_OnPresentationConnectionClosed_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnPresentationConnectionClosed_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); val.reason = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.message = decoder.decodeStruct(codec.String); return val; }; MediaRouter_OnPresentationConnectionClosed_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnPresentationConnectionClosed_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); encoder.encodeStruct(codec.Int32, val.reason); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStruct(codec.String, val.message); }; function MediaRouter_OnRouteMessagesReceived_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnRouteMessagesReceived_Params.prototype.initDefaults_ = function() { this.routeId = null; this.messages = null; }; MediaRouter_OnRouteMessagesReceived_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnRouteMessagesReceived_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnRouteMessagesReceived_Params.routeId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnRouteMessagesReceived_Params.messages err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 8, new codec.PointerTo(RouteMessage), false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnRouteMessagesReceived_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouter_OnRouteMessagesReceived_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnRouteMessagesReceived_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.routeId = decoder.decodeStruct(codec.String); val.messages = decoder.decodeArrayPointer(new codec.PointerTo(RouteMessage)); return val; }; MediaRouter_OnRouteMessagesReceived_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnRouteMessagesReceived_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.routeId); encoder.encodeArrayPointer(new codec.PointerTo(RouteMessage), val.messages); }; function MediaRouter_OnMediaRemoterCreated_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_OnMediaRemoterCreated_Params.prototype.initDefaults_ = function() { this.tabId = 0; this.remoter = new mirror_service_remoting$.MirrorServiceRemoterPtr(); this.remotingSource = new bindings.InterfaceRequest(); }; MediaRouter_OnMediaRemoterCreated_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_OnMediaRemoterCreated_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnMediaRemoterCreated_Params.remoter err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 4, false); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_OnMediaRemoterCreated_Params.remotingSource err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 12, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_OnMediaRemoterCreated_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouter_OnMediaRemoterCreated_Params.decode = function(decoder) { var packed; var val = new MediaRouter_OnMediaRemoterCreated_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.tabId = decoder.decodeStruct(codec.Int32); val.remoter = decoder.decodeStruct(new codec.Interface(mirror_service_remoting$.MirrorServiceRemoterPtr)); val.remotingSource = decoder.decodeStruct(codec.InterfaceRequest); return val; }; MediaRouter_OnMediaRemoterCreated_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_OnMediaRemoterCreated_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.tabId); encoder.encodeStruct(new codec.Interface(mirror_service_remoting$.MirrorServiceRemoterPtr), val.remoter); encoder.encodeStruct(codec.InterfaceRequest, val.remotingSource); }; function MediaRouter_GetMediaSinkServiceStatus_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_GetMediaSinkServiceStatus_Params.prototype.initDefaults_ = function() { }; MediaRouter_GetMediaSinkServiceStatus_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_GetMediaSinkServiceStatus_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_GetMediaSinkServiceStatus_Params.encodedSize = codec.kStructHeaderSize + 0; MediaRouter_GetMediaSinkServiceStatus_Params.decode = function(decoder) { var packed; var val = new MediaRouter_GetMediaSinkServiceStatus_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; MediaRouter_GetMediaSinkServiceStatus_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_GetMediaSinkServiceStatus_Params.encodedSize); encoder.writeUint32(0); }; function MediaRouter_GetMediaSinkServiceStatus_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_GetMediaSinkServiceStatus_ResponseParams.prototype.initDefaults_ = function() { this.status = null; }; MediaRouter_GetMediaSinkServiceStatus_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_GetMediaSinkServiceStatus_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_GetMediaSinkServiceStatus_ResponseParams.status err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_GetMediaSinkServiceStatus_ResponseParams.encodedSize = codec.kStructHeaderSize + 8; MediaRouter_GetMediaSinkServiceStatus_ResponseParams.decode = function(decoder) { var packed; var val = new MediaRouter_GetMediaSinkServiceStatus_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.status = decoder.decodeStruct(codec.String); return val; }; MediaRouter_GetMediaSinkServiceStatus_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_GetMediaSinkServiceStatus_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.status); }; function MediaRouter_GetMirroringServiceHostForTab_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_GetMirroringServiceHostForTab_Params.prototype.initDefaults_ = function() { this.targetTabId = 0; this.request = new bindings.InterfaceRequest(); }; MediaRouter_GetMirroringServiceHostForTab_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_GetMirroringServiceHostForTab_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_GetMirroringServiceHostForTab_Params.request err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 4, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_GetMirroringServiceHostForTab_Params.encodedSize = codec.kStructHeaderSize + 8; MediaRouter_GetMirroringServiceHostForTab_Params.decode = function(decoder) { var packed; var val = new MediaRouter_GetMirroringServiceHostForTab_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.targetTabId = decoder.decodeStruct(codec.Int32); val.request = decoder.decodeStruct(codec.InterfaceRequest); return val; }; MediaRouter_GetMirroringServiceHostForTab_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_GetMirroringServiceHostForTab_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.targetTabId); encoder.encodeStruct(codec.InterfaceRequest, val.request); }; function MediaRouter_GetMirroringServiceHostForDesktop_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_GetMirroringServiceHostForDesktop_Params.prototype.initDefaults_ = function() { this.initiatorTabId = 0; this.request = new bindings.InterfaceRequest(); this.desktopStreamId = null; }; MediaRouter_GetMirroringServiceHostForDesktop_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_GetMirroringServiceHostForDesktop_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_GetMirroringServiceHostForDesktop_Params.desktopStreamId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_GetMirroringServiceHostForDesktop_Params.request err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 4, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_GetMirroringServiceHostForDesktop_Params.encodedSize = codec.kStructHeaderSize + 16; MediaRouter_GetMirroringServiceHostForDesktop_Params.decode = function(decoder) { var packed; var val = new MediaRouter_GetMirroringServiceHostForDesktop_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.initiatorTabId = decoder.decodeStruct(codec.Int32); val.request = decoder.decodeStruct(codec.InterfaceRequest); val.desktopStreamId = decoder.decodeStruct(codec.String); return val; }; MediaRouter_GetMirroringServiceHostForDesktop_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_GetMirroringServiceHostForDesktop_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.initiatorTabId); encoder.encodeStruct(codec.InterfaceRequest, val.request); encoder.encodeStruct(codec.String, val.desktopStreamId); }; function MediaRouter_GetMirroringServiceHostForOffscreenTab_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.prototype.initDefaults_ = function() { this.presentationUrl = null; this.presentationId = null; this.request = new bindings.InterfaceRequest(); }; MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.presentationUrl err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, url$.Url, false); if (err !== validator.validationError.NONE) return err; // validate MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.presentationId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.request err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 16, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.encodedSize = codec.kStructHeaderSize + 24; MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.decode = function(decoder) { var packed; var val = new MediaRouter_GetMirroringServiceHostForOffscreenTab_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.presentationUrl = decoder.decodeStructPointer(url$.Url); val.presentationId = decoder.decodeStruct(codec.String); val.request = decoder.decodeStruct(codec.InterfaceRequest); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(url$.Url, val.presentationUrl); encoder.encodeStruct(codec.String, val.presentationId); encoder.encodeStruct(codec.InterfaceRequest, val.request); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaSinkExtraData(value) { this.initDefault_(); this.initValue_(value); } MediaSinkExtraData.Tags = { dialMediaSink: 0, castMediaSink: 1, }; MediaSinkExtraData.prototype.initDefault_ = function() { this.$data = null; this.$tag = undefined; } MediaSinkExtraData.prototype.initValue_ = function(value) { if (value == undefined) { return; } var keys = Object.keys(value); if (keys.length == 0) { return; } if (keys.length > 1) { throw new TypeError("You may set only one member on a union."); } var fields = [ "dialMediaSink", "castMediaSink", ]; if (fields.indexOf(keys[0]) < 0) { throw new ReferenceError(keys[0] + " is not a MediaSinkExtraData member."); } this[keys[0]] = value[keys[0]]; } Object.defineProperty(MediaSinkExtraData.prototype, "dialMediaSink", { get: function() { if (this.$tag != MediaSinkExtraData.Tags.dialMediaSink) { throw new ReferenceError( "MediaSinkExtraData.dialMediaSink is not currently set."); } return this.$data; }, set: function(value) { this.$tag = MediaSinkExtraData.Tags.dialMediaSink; this.$data = value; } }); Object.defineProperty(MediaSinkExtraData.prototype, "castMediaSink", { get: function() { if (this.$tag != MediaSinkExtraData.Tags.castMediaSink) { throw new ReferenceError( "MediaSinkExtraData.castMediaSink is not currently set."); } return this.$data; }, set: function(value) { this.$tag = MediaSinkExtraData.Tags.castMediaSink; this.$data = value; } }); MediaSinkExtraData.encode = function(encoder, val) { if (val == null) { encoder.writeUint64(0); encoder.writeUint64(0); return; } if (val.$tag == undefined) { throw new TypeError("Cannot encode unions with an unknown member set."); } encoder.writeUint32(16); encoder.writeUint32(val.$tag); switch (val.$tag) { case MediaSinkExtraData.Tags.dialMediaSink: encoder.encodeStructPointer(DialMediaSink, val.dialMediaSink); break; case MediaSinkExtraData.Tags.castMediaSink: encoder.encodeStructPointer(CastMediaSink, val.castMediaSink); break; } encoder.align(); }; MediaSinkExtraData.decode = function(decoder) { var size = decoder.readUint32(); if (size == 0) { decoder.readUint32(); decoder.readUint64(); return null; } var result = new MediaSinkExtraData(); var tag = decoder.readUint32(); switch (tag) { case MediaSinkExtraData.Tags.dialMediaSink: result.dialMediaSink = decoder.decodeStructPointer(DialMediaSink); break; case MediaSinkExtraData.Tags.castMediaSink: result.castMediaSink = decoder.decodeStructPointer(CastMediaSink); break; } decoder.align(); return result; }; MediaSinkExtraData.validate = function(messageValidator, offset) { var size = messageValidator.decodeUnionSize(offset); if (size != 16) { return validator.validationError.INVALID_UNION_SIZE; } var tag = messageValidator.decodeUnionTag(offset); var data_offset = offset + 8; var err; switch (tag) { case MediaSinkExtraData.Tags.dialMediaSink: // validate MediaSinkExtraData.dialMediaSink err = messageValidator.validateStructPointer(data_offset, DialMediaSink, false); if (err !== validator.validationError.NONE) return err; break; case MediaSinkExtraData.Tags.castMediaSink: // validate MediaSinkExtraData.castMediaSink err = messageValidator.validateStructPointer(data_offset, CastMediaSink, false); if (err !== validator.validationError.NONE) return err; break; } return validator.validationError.NONE; }; MediaSinkExtraData.encodedSize = 16; var kMediaRouteProvider_CreateRoute_Name = 782952299; var kMediaRouteProvider_JoinRoute_Name = 1199893741; var kMediaRouteProvider_ConnectRouteByRouteId_Name = 1468369604; var kMediaRouteProvider_TerminateRoute_Name = 2076219515; var kMediaRouteProvider_SendRouteMessage_Name = 1226427911; var kMediaRouteProvider_SendRouteBinaryMessage_Name = 956272035; var kMediaRouteProvider_StartObservingMediaSinks_Name = 995039470; var kMediaRouteProvider_StopObservingMediaSinks_Name = 1717033259; var kMediaRouteProvider_StartObservingMediaRoutes_Name = 1710076587; var kMediaRouteProvider_StopObservingMediaRoutes_Name = 1371994592; var kMediaRouteProvider_StartListeningForRouteMessages_Name = 1166293216; var kMediaRouteProvider_StopListeningForRouteMessages_Name = 1140615138; var kMediaRouteProvider_DetachRoute_Name = 1236519714; var kMediaRouteProvider_EnableMdnsDiscovery_Name = 250587548; var kMediaRouteProvider_UpdateMediaSinks_Name = 582169440; var kMediaRouteProvider_SearchSinks_Name = 1268276099; var kMediaRouteProvider_ProvideSinks_Name = 1223794936; var kMediaRouteProvider_CreateMediaRouteController_Name = 2095323133; function MediaRouteProviderPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(MediaRouteProvider, handleOrPtrInfo); } function MediaRouteProviderAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( MediaRouteProvider, associatedInterfacePtrInfo); } MediaRouteProviderAssociatedPtr.prototype = Object.create(MediaRouteProviderPtr.prototype); MediaRouteProviderAssociatedPtr.prototype.constructor = MediaRouteProviderAssociatedPtr; function MediaRouteProviderProxy(receiver) { this.receiver_ = receiver; } MediaRouteProviderPtr.prototype.createRoute = function() { return MediaRouteProviderProxy.prototype.createRoute .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.createRoute = function(mediaSource, sinkId, originalPresentationId, origin, tabId, timeout, incognito) { var params_ = new MediaRouteProvider_CreateRoute_Params(); params_.mediaSource = mediaSource; params_.sinkId = sinkId; params_.originalPresentationId = originalPresentationId; params_.origin = origin; params_.tabId = tabId; params_.timeout = timeout; params_.incognito = incognito; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouteProvider_CreateRoute_Name, codec.align(MediaRouteProvider_CreateRoute_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouteProvider_CreateRoute_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouteProvider_CreateRoute_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MediaRouteProviderPtr.prototype.joinRoute = function() { return MediaRouteProviderProxy.prototype.joinRoute .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.joinRoute = function(mediaSource, presentationId, origin, tabId, timeout, incognito) { var params_ = new MediaRouteProvider_JoinRoute_Params(); params_.mediaSource = mediaSource; params_.presentationId = presentationId; params_.origin = origin; params_.tabId = tabId; params_.timeout = timeout; params_.incognito = incognito; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouteProvider_JoinRoute_Name, codec.align(MediaRouteProvider_JoinRoute_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouteProvider_JoinRoute_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouteProvider_JoinRoute_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MediaRouteProviderPtr.prototype.connectRouteByRouteId = function() { return MediaRouteProviderProxy.prototype.connectRouteByRouteId .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.connectRouteByRouteId = function(mediaSource, routeId, presentationId, origin, tabId, timeout, incognito) { var params_ = new MediaRouteProvider_ConnectRouteByRouteId_Params(); params_.mediaSource = mediaSource; params_.routeId = routeId; params_.presentationId = presentationId; params_.origin = origin; params_.tabId = tabId; params_.timeout = timeout; params_.incognito = incognito; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouteProvider_ConnectRouteByRouteId_Name, codec.align(MediaRouteProvider_ConnectRouteByRouteId_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouteProvider_ConnectRouteByRouteId_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouteProvider_ConnectRouteByRouteId_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MediaRouteProviderPtr.prototype.terminateRoute = function() { return MediaRouteProviderProxy.prototype.terminateRoute .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.terminateRoute = function(routeId) { var params_ = new MediaRouteProvider_TerminateRoute_Params(); params_.routeId = routeId; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouteProvider_TerminateRoute_Name, codec.align(MediaRouteProvider_TerminateRoute_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouteProvider_TerminateRoute_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouteProvider_TerminateRoute_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MediaRouteProviderPtr.prototype.sendRouteMessage = function() { return MediaRouteProviderProxy.prototype.sendRouteMessage .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.sendRouteMessage = function(mediaRouteId, message) { var params_ = new MediaRouteProvider_SendRouteMessage_Params(); params_.mediaRouteId = mediaRouteId; params_.message = message; var builder = new codec.MessageV0Builder( kMediaRouteProvider_SendRouteMessage_Name, codec.align(MediaRouteProvider_SendRouteMessage_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_SendRouteMessage_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.sendRouteBinaryMessage = function() { return MediaRouteProviderProxy.prototype.sendRouteBinaryMessage .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.sendRouteBinaryMessage = function(mediaRouteId, data) { var params_ = new MediaRouteProvider_SendRouteBinaryMessage_Params(); params_.mediaRouteId = mediaRouteId; params_.data = data; var builder = new codec.MessageV0Builder( kMediaRouteProvider_SendRouteBinaryMessage_Name, codec.align(MediaRouteProvider_SendRouteBinaryMessage_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_SendRouteBinaryMessage_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.startObservingMediaSinks = function() { return MediaRouteProviderProxy.prototype.startObservingMediaSinks .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.startObservingMediaSinks = function(mediaSource) { var params_ = new MediaRouteProvider_StartObservingMediaSinks_Params(); params_.mediaSource = mediaSource; var builder = new codec.MessageV0Builder( kMediaRouteProvider_StartObservingMediaSinks_Name, codec.align(MediaRouteProvider_StartObservingMediaSinks_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_StartObservingMediaSinks_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.stopObservingMediaSinks = function() { return MediaRouteProviderProxy.prototype.stopObservingMediaSinks .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.stopObservingMediaSinks = function(mediaSource) { var params_ = new MediaRouteProvider_StopObservingMediaSinks_Params(); params_.mediaSource = mediaSource; var builder = new codec.MessageV0Builder( kMediaRouteProvider_StopObservingMediaSinks_Name, codec.align(MediaRouteProvider_StopObservingMediaSinks_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_StopObservingMediaSinks_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.startObservingMediaRoutes = function() { return MediaRouteProviderProxy.prototype.startObservingMediaRoutes .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.startObservingMediaRoutes = function(mediaSource) { var params_ = new MediaRouteProvider_StartObservingMediaRoutes_Params(); params_.mediaSource = mediaSource; var builder = new codec.MessageV0Builder( kMediaRouteProvider_StartObservingMediaRoutes_Name, codec.align(MediaRouteProvider_StartObservingMediaRoutes_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_StartObservingMediaRoutes_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.stopObservingMediaRoutes = function() { return MediaRouteProviderProxy.prototype.stopObservingMediaRoutes .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.stopObservingMediaRoutes = function(mediaSource) { var params_ = new MediaRouteProvider_StopObservingMediaRoutes_Params(); params_.mediaSource = mediaSource; var builder = new codec.MessageV0Builder( kMediaRouteProvider_StopObservingMediaRoutes_Name, codec.align(MediaRouteProvider_StopObservingMediaRoutes_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_StopObservingMediaRoutes_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.startListeningForRouteMessages = function() { return MediaRouteProviderProxy.prototype.startListeningForRouteMessages .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.startListeningForRouteMessages = function(routeId) { var params_ = new MediaRouteProvider_StartListeningForRouteMessages_Params(); params_.routeId = routeId; var builder = new codec.MessageV0Builder( kMediaRouteProvider_StartListeningForRouteMessages_Name, codec.align(MediaRouteProvider_StartListeningForRouteMessages_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_StartListeningForRouteMessages_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.stopListeningForRouteMessages = function() { return MediaRouteProviderProxy.prototype.stopListeningForRouteMessages .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.stopListeningForRouteMessages = function(routeId) { var params_ = new MediaRouteProvider_StopListeningForRouteMessages_Params(); params_.routeId = routeId; var builder = new codec.MessageV0Builder( kMediaRouteProvider_StopListeningForRouteMessages_Name, codec.align(MediaRouteProvider_StopListeningForRouteMessages_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_StopListeningForRouteMessages_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.detachRoute = function() { return MediaRouteProviderProxy.prototype.detachRoute .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.detachRoute = function(routeId) { var params_ = new MediaRouteProvider_DetachRoute_Params(); params_.routeId = routeId; var builder = new codec.MessageV0Builder( kMediaRouteProvider_DetachRoute_Name, codec.align(MediaRouteProvider_DetachRoute_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_DetachRoute_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.enableMdnsDiscovery = function() { return MediaRouteProviderProxy.prototype.enableMdnsDiscovery .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.enableMdnsDiscovery = function() { var params_ = new MediaRouteProvider_EnableMdnsDiscovery_Params(); var builder = new codec.MessageV0Builder( kMediaRouteProvider_EnableMdnsDiscovery_Name, codec.align(MediaRouteProvider_EnableMdnsDiscovery_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_EnableMdnsDiscovery_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.updateMediaSinks = function() { return MediaRouteProviderProxy.prototype.updateMediaSinks .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.updateMediaSinks = function(mediaSource) { var params_ = new MediaRouteProvider_UpdateMediaSinks_Params(); params_.mediaSource = mediaSource; var builder = new codec.MessageV0Builder( kMediaRouteProvider_UpdateMediaSinks_Name, codec.align(MediaRouteProvider_UpdateMediaSinks_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_UpdateMediaSinks_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.searchSinks = function() { return MediaRouteProviderProxy.prototype.searchSinks .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.searchSinks = function(sinkId, mediaSource, searchCriteria) { var params_ = new MediaRouteProvider_SearchSinks_Params(); params_.sinkId = sinkId; params_.mediaSource = mediaSource; params_.searchCriteria = searchCriteria; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouteProvider_SearchSinks_Name, codec.align(MediaRouteProvider_SearchSinks_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouteProvider_SearchSinks_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouteProvider_SearchSinks_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MediaRouteProviderPtr.prototype.provideSinks = function() { return MediaRouteProviderProxy.prototype.provideSinks .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.provideSinks = function(providerName, sinks) { var params_ = new MediaRouteProvider_ProvideSinks_Params(); params_.providerName = providerName; params_.sinks = sinks; var builder = new codec.MessageV0Builder( kMediaRouteProvider_ProvideSinks_Name, codec.align(MediaRouteProvider_ProvideSinks_Params.encodedSize)); builder.encodeStruct(MediaRouteProvider_ProvideSinks_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouteProviderPtr.prototype.createMediaRouteController = function() { return MediaRouteProviderProxy.prototype.createMediaRouteController .apply(this.ptr.getProxy(), arguments); }; MediaRouteProviderProxy.prototype.createMediaRouteController = function(routeId, mediaController, observer) { var params_ = new MediaRouteProvider_CreateMediaRouteController_Params(); params_.routeId = routeId; params_.mediaController = mediaController; params_.observer = observer; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouteProvider_CreateMediaRouteController_Name, codec.align(MediaRouteProvider_CreateMediaRouteController_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouteProvider_CreateMediaRouteController_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouteProvider_CreateMediaRouteController_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; function MediaRouteProviderStub(delegate) { this.delegate_ = delegate; } MediaRouteProviderStub.prototype.createRoute = function(mediaSource, sinkId, originalPresentationId, origin, tabId, timeout, incognito) { return this.delegate_ && this.delegate_.createRoute && this.delegate_.createRoute(mediaSource, sinkId, originalPresentationId, origin, tabId, timeout, incognito); } MediaRouteProviderStub.prototype.joinRoute = function(mediaSource, presentationId, origin, tabId, timeout, incognito) { return this.delegate_ && this.delegate_.joinRoute && this.delegate_.joinRoute(mediaSource, presentationId, origin, tabId, timeout, incognito); } MediaRouteProviderStub.prototype.connectRouteByRouteId = function(mediaSource, routeId, presentationId, origin, tabId, timeout, incognito) { return this.delegate_ && this.delegate_.connectRouteByRouteId && this.delegate_.connectRouteByRouteId(mediaSource, routeId, presentationId, origin, tabId, timeout, incognito); } MediaRouteProviderStub.prototype.terminateRoute = function(routeId) { return this.delegate_ && this.delegate_.terminateRoute && this.delegate_.terminateRoute(routeId); } MediaRouteProviderStub.prototype.sendRouteMessage = function(mediaRouteId, message) { return this.delegate_ && this.delegate_.sendRouteMessage && this.delegate_.sendRouteMessage(mediaRouteId, message); } MediaRouteProviderStub.prototype.sendRouteBinaryMessage = function(mediaRouteId, data) { return this.delegate_ && this.delegate_.sendRouteBinaryMessage && this.delegate_.sendRouteBinaryMessage(mediaRouteId, data); } MediaRouteProviderStub.prototype.startObservingMediaSinks = function(mediaSource) { return this.delegate_ && this.delegate_.startObservingMediaSinks && this.delegate_.startObservingMediaSinks(mediaSource); } MediaRouteProviderStub.prototype.stopObservingMediaSinks = function(mediaSource) { return this.delegate_ && this.delegate_.stopObservingMediaSinks && this.delegate_.stopObservingMediaSinks(mediaSource); } MediaRouteProviderStub.prototype.startObservingMediaRoutes = function(mediaSource) { return this.delegate_ && this.delegate_.startObservingMediaRoutes && this.delegate_.startObservingMediaRoutes(mediaSource); } MediaRouteProviderStub.prototype.stopObservingMediaRoutes = function(mediaSource) { return this.delegate_ && this.delegate_.stopObservingMediaRoutes && this.delegate_.stopObservingMediaRoutes(mediaSource); } MediaRouteProviderStub.prototype.startListeningForRouteMessages = function(routeId) { return this.delegate_ && this.delegate_.startListeningForRouteMessages && this.delegate_.startListeningForRouteMessages(routeId); } MediaRouteProviderStub.prototype.stopListeningForRouteMessages = function(routeId) { return this.delegate_ && this.delegate_.stopListeningForRouteMessages && this.delegate_.stopListeningForRouteMessages(routeId); } MediaRouteProviderStub.prototype.detachRoute = function(routeId) { return this.delegate_ && this.delegate_.detachRoute && this.delegate_.detachRoute(routeId); } MediaRouteProviderStub.prototype.enableMdnsDiscovery = function() { return this.delegate_ && this.delegate_.enableMdnsDiscovery && this.delegate_.enableMdnsDiscovery(); } MediaRouteProviderStub.prototype.updateMediaSinks = function(mediaSource) { return this.delegate_ && this.delegate_.updateMediaSinks && this.delegate_.updateMediaSinks(mediaSource); } MediaRouteProviderStub.prototype.searchSinks = function(sinkId, mediaSource, searchCriteria) { return this.delegate_ && this.delegate_.searchSinks && this.delegate_.searchSinks(sinkId, mediaSource, searchCriteria); } MediaRouteProviderStub.prototype.provideSinks = function(providerName, sinks) { return this.delegate_ && this.delegate_.provideSinks && this.delegate_.provideSinks(providerName, sinks); } MediaRouteProviderStub.prototype.createMediaRouteController = function(routeId, mediaController, observer) { return this.delegate_ && this.delegate_.createMediaRouteController && this.delegate_.createMediaRouteController(routeId, mediaController, observer); } MediaRouteProviderStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMediaRouteProvider_SendRouteMessage_Name: var params = reader.decodeStruct(MediaRouteProvider_SendRouteMessage_Params); this.sendRouteMessage(params.mediaRouteId, params.message); return true; case kMediaRouteProvider_SendRouteBinaryMessage_Name: var params = reader.decodeStruct(MediaRouteProvider_SendRouteBinaryMessage_Params); this.sendRouteBinaryMessage(params.mediaRouteId, params.data); return true; case kMediaRouteProvider_StartObservingMediaSinks_Name: var params = reader.decodeStruct(MediaRouteProvider_StartObservingMediaSinks_Params); this.startObservingMediaSinks(params.mediaSource); return true; case kMediaRouteProvider_StopObservingMediaSinks_Name: var params = reader.decodeStruct(MediaRouteProvider_StopObservingMediaSinks_Params); this.stopObservingMediaSinks(params.mediaSource); return true; case kMediaRouteProvider_StartObservingMediaRoutes_Name: var params = reader.decodeStruct(MediaRouteProvider_StartObservingMediaRoutes_Params); this.startObservingMediaRoutes(params.mediaSource); return true; case kMediaRouteProvider_StopObservingMediaRoutes_Name: var params = reader.decodeStruct(MediaRouteProvider_StopObservingMediaRoutes_Params); this.stopObservingMediaRoutes(params.mediaSource); return true; case kMediaRouteProvider_StartListeningForRouteMessages_Name: var params = reader.decodeStruct(MediaRouteProvider_StartListeningForRouteMessages_Params); this.startListeningForRouteMessages(params.routeId); return true; case kMediaRouteProvider_StopListeningForRouteMessages_Name: var params = reader.decodeStruct(MediaRouteProvider_StopListeningForRouteMessages_Params); this.stopListeningForRouteMessages(params.routeId); return true; case kMediaRouteProvider_DetachRoute_Name: var params = reader.decodeStruct(MediaRouteProvider_DetachRoute_Params); this.detachRoute(params.routeId); return true; case kMediaRouteProvider_EnableMdnsDiscovery_Name: var params = reader.decodeStruct(MediaRouteProvider_EnableMdnsDiscovery_Params); this.enableMdnsDiscovery(); return true; case kMediaRouteProvider_UpdateMediaSinks_Name: var params = reader.decodeStruct(MediaRouteProvider_UpdateMediaSinks_Params); this.updateMediaSinks(params.mediaSource); return true; case kMediaRouteProvider_ProvideSinks_Name: var params = reader.decodeStruct(MediaRouteProvider_ProvideSinks_Params); this.provideSinks(params.providerName, params.sinks); return true; default: return false; } }; MediaRouteProviderStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMediaRouteProvider_CreateRoute_Name: var params = reader.decodeStruct(MediaRouteProvider_CreateRoute_Params); this.createRoute(params.mediaSource, params.sinkId, params.originalPresentationId, params.origin, params.tabId, params.timeout, params.incognito).then(function(response) { var responseParams = new MediaRouteProvider_CreateRoute_ResponseParams(); responseParams.route = response.route; responseParams.connection = response.connection; responseParams.errorText = response.errorText; responseParams.resultCode = response.resultCode; var builder = new codec.MessageV1Builder( kMediaRouteProvider_CreateRoute_Name, codec.align(MediaRouteProvider_CreateRoute_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouteProvider_CreateRoute_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; case kMediaRouteProvider_JoinRoute_Name: var params = reader.decodeStruct(MediaRouteProvider_JoinRoute_Params); this.joinRoute(params.mediaSource, params.presentationId, params.origin, params.tabId, params.timeout, params.incognito).then(function(response) { var responseParams = new MediaRouteProvider_JoinRoute_ResponseParams(); responseParams.route = response.route; responseParams.connection = response.connection; responseParams.errorText = response.errorText; responseParams.resultCode = response.resultCode; var builder = new codec.MessageV1Builder( kMediaRouteProvider_JoinRoute_Name, codec.align(MediaRouteProvider_JoinRoute_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouteProvider_JoinRoute_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; case kMediaRouteProvider_ConnectRouteByRouteId_Name: var params = reader.decodeStruct(MediaRouteProvider_ConnectRouteByRouteId_Params); this.connectRouteByRouteId(params.mediaSource, params.routeId, params.presentationId, params.origin, params.tabId, params.timeout, params.incognito).then(function(response) { var responseParams = new MediaRouteProvider_ConnectRouteByRouteId_ResponseParams(); responseParams.route = response.route; responseParams.connection = response.connection; responseParams.errorText = response.errorText; responseParams.resultCode = response.resultCode; var builder = new codec.MessageV1Builder( kMediaRouteProvider_ConnectRouteByRouteId_Name, codec.align(MediaRouteProvider_ConnectRouteByRouteId_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouteProvider_ConnectRouteByRouteId_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; case kMediaRouteProvider_TerminateRoute_Name: var params = reader.decodeStruct(MediaRouteProvider_TerminateRoute_Params); this.terminateRoute(params.routeId).then(function(response) { var responseParams = new MediaRouteProvider_TerminateRoute_ResponseParams(); responseParams.errorText = response.errorText; responseParams.resultCode = response.resultCode; var builder = new codec.MessageV1Builder( kMediaRouteProvider_TerminateRoute_Name, codec.align(MediaRouteProvider_TerminateRoute_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouteProvider_TerminateRoute_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; case kMediaRouteProvider_SearchSinks_Name: var params = reader.decodeStruct(MediaRouteProvider_SearchSinks_Params); this.searchSinks(params.sinkId, params.mediaSource, params.searchCriteria).then(function(response) { var responseParams = new MediaRouteProvider_SearchSinks_ResponseParams(); responseParams.sinkId = response.sinkId; var builder = new codec.MessageV1Builder( kMediaRouteProvider_SearchSinks_Name, codec.align(MediaRouteProvider_SearchSinks_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouteProvider_SearchSinks_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; case kMediaRouteProvider_CreateMediaRouteController_Name: var params = reader.decodeStruct(MediaRouteProvider_CreateMediaRouteController_Params); this.createMediaRouteController(params.routeId, params.mediaController, params.observer).then(function(response) { var responseParams = new MediaRouteProvider_CreateMediaRouteController_ResponseParams(); responseParams.success = response.success; var builder = new codec.MessageV1Builder( kMediaRouteProvider_CreateMediaRouteController_Name, codec.align(MediaRouteProvider_CreateMediaRouteController_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouteProvider_CreateMediaRouteController_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; default: return false; } }; function validateMediaRouteProviderRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMediaRouteProvider_CreateRoute_Name: if (message.expectsResponse()) paramsClass = MediaRouteProvider_CreateRoute_Params; break; case kMediaRouteProvider_JoinRoute_Name: if (message.expectsResponse()) paramsClass = MediaRouteProvider_JoinRoute_Params; break; case kMediaRouteProvider_ConnectRouteByRouteId_Name: if (message.expectsResponse()) paramsClass = MediaRouteProvider_ConnectRouteByRouteId_Params; break; case kMediaRouteProvider_TerminateRoute_Name: if (message.expectsResponse()) paramsClass = MediaRouteProvider_TerminateRoute_Params; break; case kMediaRouteProvider_SendRouteMessage_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_SendRouteMessage_Params; break; case kMediaRouteProvider_SendRouteBinaryMessage_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_SendRouteBinaryMessage_Params; break; case kMediaRouteProvider_StartObservingMediaSinks_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_StartObservingMediaSinks_Params; break; case kMediaRouteProvider_StopObservingMediaSinks_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_StopObservingMediaSinks_Params; break; case kMediaRouteProvider_StartObservingMediaRoutes_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_StartObservingMediaRoutes_Params; break; case kMediaRouteProvider_StopObservingMediaRoutes_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_StopObservingMediaRoutes_Params; break; case kMediaRouteProvider_StartListeningForRouteMessages_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_StartListeningForRouteMessages_Params; break; case kMediaRouteProvider_StopListeningForRouteMessages_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_StopListeningForRouteMessages_Params; break; case kMediaRouteProvider_DetachRoute_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_DetachRoute_Params; break; case kMediaRouteProvider_EnableMdnsDiscovery_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_EnableMdnsDiscovery_Params; break; case kMediaRouteProvider_UpdateMediaSinks_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_UpdateMediaSinks_Params; break; case kMediaRouteProvider_SearchSinks_Name: if (message.expectsResponse()) paramsClass = MediaRouteProvider_SearchSinks_Params; break; case kMediaRouteProvider_ProvideSinks_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouteProvider_ProvideSinks_Params; break; case kMediaRouteProvider_CreateMediaRouteController_Name: if (message.expectsResponse()) paramsClass = MediaRouteProvider_CreateMediaRouteController_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateMediaRouteProviderResponse(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMediaRouteProvider_CreateRoute_Name: if (message.isResponse()) paramsClass = MediaRouteProvider_CreateRoute_ResponseParams; break; case kMediaRouteProvider_JoinRoute_Name: if (message.isResponse()) paramsClass = MediaRouteProvider_JoinRoute_ResponseParams; break; case kMediaRouteProvider_ConnectRouteByRouteId_Name: if (message.isResponse()) paramsClass = MediaRouteProvider_ConnectRouteByRouteId_ResponseParams; break; case kMediaRouteProvider_TerminateRoute_Name: if (message.isResponse()) paramsClass = MediaRouteProvider_TerminateRoute_ResponseParams; break; case kMediaRouteProvider_SearchSinks_Name: if (message.isResponse()) paramsClass = MediaRouteProvider_SearchSinks_ResponseParams; break; case kMediaRouteProvider_CreateMediaRouteController_Name: if (message.isResponse()) paramsClass = MediaRouteProvider_CreateMediaRouteController_ResponseParams; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } var MediaRouteProvider = { name: 'media_router.mojom.MediaRouteProvider', kVersion: 0, ptrClass: MediaRouteProviderPtr, proxyClass: MediaRouteProviderProxy, stubClass: MediaRouteProviderStub, validateRequest: validateMediaRouteProviderRequest, validateResponse: validateMediaRouteProviderResponse, }; MediaRouteProvider.Id = {}; MediaRouteProvider.Id.EXTENSION = 0; MediaRouteProvider.Id.WIRED_DISPLAY = MediaRouteProvider.Id.EXTENSION + 1; MediaRouteProvider.Id.CAST = MediaRouteProvider.Id.WIRED_DISPLAY + 1; MediaRouteProvider.Id.DIAL = MediaRouteProvider.Id.CAST + 1; MediaRouteProvider.Id.MIN_VALUE = 0, MediaRouteProvider.Id.MAX_VALUE = 3, MediaRouteProvider.Id.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: return true; } return false; }; MediaRouteProvider.Id.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; MediaRouteProviderStub.prototype.validator = validateMediaRouteProviderRequest; MediaRouteProviderProxy.prototype.validator = validateMediaRouteProviderResponse; var kMediaRouter_RegisterMediaRouteProvider_Name = 2036946104; var kMediaRouter_OnSinksReceived_Name = 827271420; var kMediaRouter_OnIssue_Name = 827236525; var kMediaRouter_OnRoutesUpdated_Name = 989999349; var kMediaRouter_OnSinkAvailabilityUpdated_Name = 1720352158; var kMediaRouter_OnPresentationConnectionStateChanged_Name = 1747620880; var kMediaRouter_OnPresentationConnectionClosed_Name = 709584692; var kMediaRouter_OnRouteMessagesReceived_Name = 1177779868; var kMediaRouter_OnMediaRemoterCreated_Name = 1751579002; var kMediaRouter_GetMediaSinkServiceStatus_Name = 1602614509; var kMediaRouter_GetMirroringServiceHostForTab_Name = 857719955; var kMediaRouter_GetMirroringServiceHostForDesktop_Name = 357633840; var kMediaRouter_GetMirroringServiceHostForOffscreenTab_Name = 1659123763; function MediaRouterPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(MediaRouter, handleOrPtrInfo); } function MediaRouterAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( MediaRouter, associatedInterfacePtrInfo); } MediaRouterAssociatedPtr.prototype = Object.create(MediaRouterPtr.prototype); MediaRouterAssociatedPtr.prototype.constructor = MediaRouterAssociatedPtr; function MediaRouterProxy(receiver) { this.receiver_ = receiver; } MediaRouterPtr.prototype.registerMediaRouteProvider = function() { return MediaRouterProxy.prototype.registerMediaRouteProvider .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.registerMediaRouteProvider = function(providerId, mediaRouterProvider) { var params_ = new MediaRouter_RegisterMediaRouteProvider_Params(); params_.providerId = providerId; params_.mediaRouterProvider = mediaRouterProvider; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouter_RegisterMediaRouteProvider_Name, codec.align(MediaRouter_RegisterMediaRouteProvider_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouter_RegisterMediaRouteProvider_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouter_RegisterMediaRouteProvider_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MediaRouterPtr.prototype.onSinksReceived = function() { return MediaRouterProxy.prototype.onSinksReceived .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onSinksReceived = function(providerId, mediaSource, sinks, origins) { var params_ = new MediaRouter_OnSinksReceived_Params(); params_.providerId = providerId; params_.mediaSource = mediaSource; params_.sinks = sinks; params_.origins = origins; var builder = new codec.MessageV0Builder( kMediaRouter_OnSinksReceived_Name, codec.align(MediaRouter_OnSinksReceived_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnSinksReceived_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.onIssue = function() { return MediaRouterProxy.prototype.onIssue .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onIssue = function(issue) { var params_ = new MediaRouter_OnIssue_Params(); params_.issue = issue; var builder = new codec.MessageV0Builder( kMediaRouter_OnIssue_Name, codec.align(MediaRouter_OnIssue_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnIssue_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.onRoutesUpdated = function() { return MediaRouterProxy.prototype.onRoutesUpdated .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onRoutesUpdated = function(providerId, routes, mediaSource, joinableRouteIds) { var params_ = new MediaRouter_OnRoutesUpdated_Params(); params_.providerId = providerId; params_.routes = routes; params_.mediaSource = mediaSource; params_.joinableRouteIds = joinableRouteIds; var builder = new codec.MessageV0Builder( kMediaRouter_OnRoutesUpdated_Name, codec.align(MediaRouter_OnRoutesUpdated_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnRoutesUpdated_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.onSinkAvailabilityUpdated = function() { return MediaRouterProxy.prototype.onSinkAvailabilityUpdated .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onSinkAvailabilityUpdated = function(providerId, availability) { var params_ = new MediaRouter_OnSinkAvailabilityUpdated_Params(); params_.providerId = providerId; params_.availability = availability; var builder = new codec.MessageV0Builder( kMediaRouter_OnSinkAvailabilityUpdated_Name, codec.align(MediaRouter_OnSinkAvailabilityUpdated_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnSinkAvailabilityUpdated_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.onPresentationConnectionStateChanged = function() { return MediaRouterProxy.prototype.onPresentationConnectionStateChanged .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onPresentationConnectionStateChanged = function(routeId, state) { var params_ = new MediaRouter_OnPresentationConnectionStateChanged_Params(); params_.routeId = routeId; params_.state = state; var builder = new codec.MessageV0Builder( kMediaRouter_OnPresentationConnectionStateChanged_Name, codec.align(MediaRouter_OnPresentationConnectionStateChanged_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnPresentationConnectionStateChanged_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.onPresentationConnectionClosed = function() { return MediaRouterProxy.prototype.onPresentationConnectionClosed .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onPresentationConnectionClosed = function(routeId, reason, message) { var params_ = new MediaRouter_OnPresentationConnectionClosed_Params(); params_.routeId = routeId; params_.reason = reason; params_.message = message; var builder = new codec.MessageV0Builder( kMediaRouter_OnPresentationConnectionClosed_Name, codec.align(MediaRouter_OnPresentationConnectionClosed_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnPresentationConnectionClosed_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.onRouteMessagesReceived = function() { return MediaRouterProxy.prototype.onRouteMessagesReceived .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onRouteMessagesReceived = function(routeId, messages) { var params_ = new MediaRouter_OnRouteMessagesReceived_Params(); params_.routeId = routeId; params_.messages = messages; var builder = new codec.MessageV0Builder( kMediaRouter_OnRouteMessagesReceived_Name, codec.align(MediaRouter_OnRouteMessagesReceived_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnRouteMessagesReceived_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.onMediaRemoterCreated = function() { return MediaRouterProxy.prototype.onMediaRemoterCreated .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.onMediaRemoterCreated = function(tabId, remoter, remotingSource) { var params_ = new MediaRouter_OnMediaRemoterCreated_Params(); params_.tabId = tabId; params_.remoter = remoter; params_.remotingSource = remotingSource; var builder = new codec.MessageV0Builder( kMediaRouter_OnMediaRemoterCreated_Name, codec.align(MediaRouter_OnMediaRemoterCreated_Params.encodedSize)); builder.encodeStruct(MediaRouter_OnMediaRemoterCreated_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.getMediaSinkServiceStatus = function() { return MediaRouterProxy.prototype.getMediaSinkServiceStatus .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.getMediaSinkServiceStatus = function() { var params_ = new MediaRouter_GetMediaSinkServiceStatus_Params(); return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMediaRouter_GetMediaSinkServiceStatus_Name, codec.align(MediaRouter_GetMediaSinkServiceStatus_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MediaRouter_GetMediaSinkServiceStatus_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MediaRouter_GetMediaSinkServiceStatus_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MediaRouterPtr.prototype.getMirroringServiceHostForTab = function() { return MediaRouterProxy.prototype.getMirroringServiceHostForTab .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.getMirroringServiceHostForTab = function(targetTabId, request) { var params_ = new MediaRouter_GetMirroringServiceHostForTab_Params(); params_.targetTabId = targetTabId; params_.request = request; var builder = new codec.MessageV0Builder( kMediaRouter_GetMirroringServiceHostForTab_Name, codec.align(MediaRouter_GetMirroringServiceHostForTab_Params.encodedSize)); builder.encodeStruct(MediaRouter_GetMirroringServiceHostForTab_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.getMirroringServiceHostForDesktop = function() { return MediaRouterProxy.prototype.getMirroringServiceHostForDesktop .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.getMirroringServiceHostForDesktop = function(initiatorTabId, desktopStreamId, request) { var params_ = new MediaRouter_GetMirroringServiceHostForDesktop_Params(); params_.initiatorTabId = initiatorTabId; params_.desktopStreamId = desktopStreamId; params_.request = request; var builder = new codec.MessageV0Builder( kMediaRouter_GetMirroringServiceHostForDesktop_Name, codec.align(MediaRouter_GetMirroringServiceHostForDesktop_Params.encodedSize)); builder.encodeStruct(MediaRouter_GetMirroringServiceHostForDesktop_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MediaRouterPtr.prototype.getMirroringServiceHostForOffscreenTab = function() { return MediaRouterProxy.prototype.getMirroringServiceHostForOffscreenTab .apply(this.ptr.getProxy(), arguments); }; MediaRouterProxy.prototype.getMirroringServiceHostForOffscreenTab = function(presentationUrl, presentationId, request) { var params_ = new MediaRouter_GetMirroringServiceHostForOffscreenTab_Params(); params_.presentationUrl = presentationUrl; params_.presentationId = presentationId; params_.request = request; var builder = new codec.MessageV0Builder( kMediaRouter_GetMirroringServiceHostForOffscreenTab_Name, codec.align(MediaRouter_GetMirroringServiceHostForOffscreenTab_Params.encodedSize)); builder.encodeStruct(MediaRouter_GetMirroringServiceHostForOffscreenTab_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function MediaRouterStub(delegate) { this.delegate_ = delegate; } MediaRouterStub.prototype.registerMediaRouteProvider = function(providerId, mediaRouterProvider) { return this.delegate_ && this.delegate_.registerMediaRouteProvider && this.delegate_.registerMediaRouteProvider(providerId, mediaRouterProvider); } MediaRouterStub.prototype.onSinksReceived = function(providerId, mediaSource, sinks, origins) { return this.delegate_ && this.delegate_.onSinksReceived && this.delegate_.onSinksReceived(providerId, mediaSource, sinks, origins); } MediaRouterStub.prototype.onIssue = function(issue) { return this.delegate_ && this.delegate_.onIssue && this.delegate_.onIssue(issue); } MediaRouterStub.prototype.onRoutesUpdated = function(providerId, routes, mediaSource, joinableRouteIds) { return this.delegate_ && this.delegate_.onRoutesUpdated && this.delegate_.onRoutesUpdated(providerId, routes, mediaSource, joinableRouteIds); } MediaRouterStub.prototype.onSinkAvailabilityUpdated = function(providerId, availability) { return this.delegate_ && this.delegate_.onSinkAvailabilityUpdated && this.delegate_.onSinkAvailabilityUpdated(providerId, availability); } MediaRouterStub.prototype.onPresentationConnectionStateChanged = function(routeId, state) { return this.delegate_ && this.delegate_.onPresentationConnectionStateChanged && this.delegate_.onPresentationConnectionStateChanged(routeId, state); } MediaRouterStub.prototype.onPresentationConnectionClosed = function(routeId, reason, message) { return this.delegate_ && this.delegate_.onPresentationConnectionClosed && this.delegate_.onPresentationConnectionClosed(routeId, reason, message); } MediaRouterStub.prototype.onRouteMessagesReceived = function(routeId, messages) { return this.delegate_ && this.delegate_.onRouteMessagesReceived && this.delegate_.onRouteMessagesReceived(routeId, messages); } MediaRouterStub.prototype.onMediaRemoterCreated = function(tabId, remoter, remotingSource) { return this.delegate_ && this.delegate_.onMediaRemoterCreated && this.delegate_.onMediaRemoterCreated(tabId, remoter, remotingSource); } MediaRouterStub.prototype.getMediaSinkServiceStatus = function() { return this.delegate_ && this.delegate_.getMediaSinkServiceStatus && this.delegate_.getMediaSinkServiceStatus(); } MediaRouterStub.prototype.getMirroringServiceHostForTab = function(targetTabId, request) { return this.delegate_ && this.delegate_.getMirroringServiceHostForTab && this.delegate_.getMirroringServiceHostForTab(targetTabId, request); } MediaRouterStub.prototype.getMirroringServiceHostForDesktop = function(initiatorTabId, desktopStreamId, request) { return this.delegate_ && this.delegate_.getMirroringServiceHostForDesktop && this.delegate_.getMirroringServiceHostForDesktop(initiatorTabId, desktopStreamId, request); } MediaRouterStub.prototype.getMirroringServiceHostForOffscreenTab = function(presentationUrl, presentationId, request) { return this.delegate_ && this.delegate_.getMirroringServiceHostForOffscreenTab && this.delegate_.getMirroringServiceHostForOffscreenTab(presentationUrl, presentationId, request); } MediaRouterStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMediaRouter_OnSinksReceived_Name: var params = reader.decodeStruct(MediaRouter_OnSinksReceived_Params); this.onSinksReceived(params.providerId, params.mediaSource, params.sinks, params.origins); return true; case kMediaRouter_OnIssue_Name: var params = reader.decodeStruct(MediaRouter_OnIssue_Params); this.onIssue(params.issue); return true; case kMediaRouter_OnRoutesUpdated_Name: var params = reader.decodeStruct(MediaRouter_OnRoutesUpdated_Params); this.onRoutesUpdated(params.providerId, params.routes, params.mediaSource, params.joinableRouteIds); return true; case kMediaRouter_OnSinkAvailabilityUpdated_Name: var params = reader.decodeStruct(MediaRouter_OnSinkAvailabilityUpdated_Params); this.onSinkAvailabilityUpdated(params.providerId, params.availability); return true; case kMediaRouter_OnPresentationConnectionStateChanged_Name: var params = reader.decodeStruct(MediaRouter_OnPresentationConnectionStateChanged_Params); this.onPresentationConnectionStateChanged(params.routeId, params.state); return true; case kMediaRouter_OnPresentationConnectionClosed_Name: var params = reader.decodeStruct(MediaRouter_OnPresentationConnectionClosed_Params); this.onPresentationConnectionClosed(params.routeId, params.reason, params.message); return true; case kMediaRouter_OnRouteMessagesReceived_Name: var params = reader.decodeStruct(MediaRouter_OnRouteMessagesReceived_Params); this.onRouteMessagesReceived(params.routeId, params.messages); return true; case kMediaRouter_OnMediaRemoterCreated_Name: var params = reader.decodeStruct(MediaRouter_OnMediaRemoterCreated_Params); this.onMediaRemoterCreated(params.tabId, params.remoter, params.remotingSource); return true; case kMediaRouter_GetMirroringServiceHostForTab_Name: var params = reader.decodeStruct(MediaRouter_GetMirroringServiceHostForTab_Params); this.getMirroringServiceHostForTab(params.targetTabId, params.request); return true; case kMediaRouter_GetMirroringServiceHostForDesktop_Name: var params = reader.decodeStruct(MediaRouter_GetMirroringServiceHostForDesktop_Params); this.getMirroringServiceHostForDesktop(params.initiatorTabId, params.desktopStreamId, params.request); return true; case kMediaRouter_GetMirroringServiceHostForOffscreenTab_Name: var params = reader.decodeStruct(MediaRouter_GetMirroringServiceHostForOffscreenTab_Params); this.getMirroringServiceHostForOffscreenTab(params.presentationUrl, params.presentationId, params.request); return true; default: return false; } }; MediaRouterStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMediaRouter_RegisterMediaRouteProvider_Name: var params = reader.decodeStruct(MediaRouter_RegisterMediaRouteProvider_Params); this.registerMediaRouteProvider(params.providerId, params.mediaRouterProvider).then(function(response) { var responseParams = new MediaRouter_RegisterMediaRouteProvider_ResponseParams(); responseParams.instanceId = response.instanceId; responseParams.config = response.config; var builder = new codec.MessageV1Builder( kMediaRouter_RegisterMediaRouteProvider_Name, codec.align(MediaRouter_RegisterMediaRouteProvider_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouter_RegisterMediaRouteProvider_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; case kMediaRouter_GetMediaSinkServiceStatus_Name: var params = reader.decodeStruct(MediaRouter_GetMediaSinkServiceStatus_Params); this.getMediaSinkServiceStatus().then(function(response) { var responseParams = new MediaRouter_GetMediaSinkServiceStatus_ResponseParams(); responseParams.status = response.status; var builder = new codec.MessageV1Builder( kMediaRouter_GetMediaSinkServiceStatus_Name, codec.align(MediaRouter_GetMediaSinkServiceStatus_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MediaRouter_GetMediaSinkServiceStatus_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; default: return false; } }; function validateMediaRouterRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMediaRouter_RegisterMediaRouteProvider_Name: if (message.expectsResponse()) paramsClass = MediaRouter_RegisterMediaRouteProvider_Params; break; case kMediaRouter_OnSinksReceived_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnSinksReceived_Params; break; case kMediaRouter_OnIssue_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnIssue_Params; break; case kMediaRouter_OnRoutesUpdated_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnRoutesUpdated_Params; break; case kMediaRouter_OnSinkAvailabilityUpdated_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnSinkAvailabilityUpdated_Params; break; case kMediaRouter_OnPresentationConnectionStateChanged_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnPresentationConnectionStateChanged_Params; break; case kMediaRouter_OnPresentationConnectionClosed_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnPresentationConnectionClosed_Params; break; case kMediaRouter_OnRouteMessagesReceived_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnRouteMessagesReceived_Params; break; case kMediaRouter_OnMediaRemoterCreated_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_OnMediaRemoterCreated_Params; break; case kMediaRouter_GetMediaSinkServiceStatus_Name: if (message.expectsResponse()) paramsClass = MediaRouter_GetMediaSinkServiceStatus_Params; break; case kMediaRouter_GetMirroringServiceHostForTab_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_GetMirroringServiceHostForTab_Params; break; case kMediaRouter_GetMirroringServiceHostForDesktop_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_GetMirroringServiceHostForDesktop_Params; break; case kMediaRouter_GetMirroringServiceHostForOffscreenTab_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaRouter_GetMirroringServiceHostForOffscreenTab_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateMediaRouterResponse(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMediaRouter_RegisterMediaRouteProvider_Name: if (message.isResponse()) paramsClass = MediaRouter_RegisterMediaRouteProvider_ResponseParams; break; case kMediaRouter_GetMediaSinkServiceStatus_Name: if (message.isResponse()) paramsClass = MediaRouter_GetMediaSinkServiceStatus_ResponseParams; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } var MediaRouter = { name: 'media_router.mojom.MediaRouter', kVersion: 0, ptrClass: MediaRouterPtr, proxyClass: MediaRouterProxy, stubClass: MediaRouterStub, validateRequest: validateMediaRouterRequest, validateResponse: validateMediaRouterResponse, }; MediaRouter.SinkAvailability = {}; MediaRouter.SinkAvailability.UNAVAILABLE = 0; MediaRouter.SinkAvailability.PER_SOURCE = MediaRouter.SinkAvailability.UNAVAILABLE + 1; MediaRouter.SinkAvailability.AVAILABLE = MediaRouter.SinkAvailability.PER_SOURCE + 1; MediaRouter.SinkAvailability.MIN_VALUE = 0, MediaRouter.SinkAvailability.MAX_VALUE = 2, MediaRouter.SinkAvailability.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: return true; } return false; }; MediaRouter.SinkAvailability.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; MediaRouter.PresentationConnectionState = {}; MediaRouter.PresentationConnectionState.CONNECTING = 0; MediaRouter.PresentationConnectionState.CONNECTED = MediaRouter.PresentationConnectionState.CONNECTING + 1; MediaRouter.PresentationConnectionState.CLOSED = MediaRouter.PresentationConnectionState.CONNECTED + 1; MediaRouter.PresentationConnectionState.TERMINATED = MediaRouter.PresentationConnectionState.CLOSED + 1; MediaRouter.PresentationConnectionState.MIN_VALUE = 0, MediaRouter.PresentationConnectionState.MAX_VALUE = 3, MediaRouter.PresentationConnectionState.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: return true; } return false; }; MediaRouter.PresentationConnectionState.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; MediaRouter.PresentationConnectionCloseReason = {}; MediaRouter.PresentationConnectionCloseReason.CONNECTION_ERROR = 0; MediaRouter.PresentationConnectionCloseReason.CLOSED = MediaRouter.PresentationConnectionCloseReason.CONNECTION_ERROR + 1; MediaRouter.PresentationConnectionCloseReason.WENT_AWAY = MediaRouter.PresentationConnectionCloseReason.CLOSED + 1; MediaRouter.PresentationConnectionCloseReason.MIN_VALUE = 0, MediaRouter.PresentationConnectionCloseReason.MAX_VALUE = 2, MediaRouter.PresentationConnectionCloseReason.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: return true; } return false; }; MediaRouter.PresentationConnectionCloseReason.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; MediaRouterStub.prototype.validator = validateMediaRouterRequest; MediaRouterProxy.prototype.validator = validateMediaRouterResponse; exports.SinkIconType = SinkIconType; exports.RouteControllerType = RouteControllerType; exports.RouteRequestResultCode = RouteRequestResultCode; exports.MediaSink = MediaSink; exports.DialMediaSink = DialMediaSink; exports.CastMediaSink = CastMediaSink; exports.MediaRoute = MediaRoute; exports.Issue = Issue; exports.RouteMessage = RouteMessage; exports.SinkSearchCriteria = SinkSearchCriteria; exports.MediaRouteProviderConfig = MediaRouteProviderConfig; exports.RoutePresentationConnection = RoutePresentationConnection; exports.MediaSinkExtraData = MediaSinkExtraData; exports.MediaRouteProvider = MediaRouteProvider; exports.MediaRouteProviderPtr = MediaRouteProviderPtr; exports.MediaRouteProviderAssociatedPtr = MediaRouteProviderAssociatedPtr; exports.MediaRouter = MediaRouter; exports.MediaRouterPtr = MediaRouterPtr; exports.MediaRouterAssociatedPtr = MediaRouterAssociatedPtr; })();// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; if ((typeof mojo === 'undefined') || !mojo.bindingsLibraryInitialized) { loadScript('mojo_bindings'); } mojo.config.autoLoadMojomDeps = false; loadScript('chrome/common/media_router/mojo/media_controller.mojom'); loadScript('chrome/common/media_router/mojo/media_router.mojom'); loadScript('chrome/common/media_router/mojo/media_status.mojom'); loadScript('components/mirroring/mojom/cast_message_channel.mojom'); loadScript('components/mirroring/mojom/mirroring_service_host.mojom'); loadScript('components/mirroring/mojom/session_observer.mojom'); loadScript('components/mirroring/mojom/session_parameters.mojom'); loadScript('extensions/common/mojo/keep_alive.mojom'); loadScript('media/mojo/interfaces/mirror_service_remoting.mojom'); loadScript('media/mojo/interfaces/remoting_common.mojom'); loadScript('mojo/public/mojom/base/time.mojom'); loadScript('mojo/public/mojom/base/unguessable_token.mojom'); loadScript('net/interfaces/ip_address.mojom'); loadScript('net/interfaces/ip_endpoint.mojom'); loadScript('url/mojom/origin.mojom'); loadScript('url/mojom/url.mojom'); // The following adapter classes preserve backward compatibility for the media // router component extension. // TODO(crbug.com/787128): Remove these adapters. function assignFields(object, fields) { for(var field in fields) { if (object.hasOwnProperty(field)) object[field] = fields[field]; } } /** * Adapter for mediaRouter.mojom.DialMediaSink. * @constructor */ function DialMediaSinkAdapter(fields) { this.ip_address = null; this.model_name = null; this.app_url = null; assignFields(this, fields); } DialMediaSinkAdapter.fromNewVersion = function(other) { return new DialMediaSinkAdapter({ 'ip_address': IPAddressAdapter.fromNewVersion(other.ipAddress), 'model_name': other.modelName, 'app_url': other.appUrl, }); }; DialMediaSinkAdapter.prototype.toNewVersion = function() { return new mediaRouter.mojom.DialMediaSink({ 'ipAddress' : this.ip_address.toNewVersion(), 'modelName' : this.model_name, 'appUrl' : this.app_url, }); }; /** * Adapter for mediaRouter.mojom.CastMediaSink. * @constructor */ function CastMediaSinkAdapter(fields) { this.ip_endpoint = null; this.model_name = null; this.capabilities = 0; this.cast_channel_id = 0; assignFields(this, fields); } CastMediaSinkAdapter.fromNewVersion = function(other) { return new CastMediaSinkAdapter({ 'ip_endpoint': IPEndpointAdapter.fromNewVersion(other.ipEndpoint), 'model_name': other.modelName, 'capabilities': other.capabilities, 'cast_channel_id': other.castChannelId, }); }; CastMediaSinkAdapter.prototype.toNewVersion = function() { return new mediaRouter.mojom.CastMediaSink({ 'ipEndpoint': this.ip_endpoint.toNewVersion(), 'modelName': this.model_name, 'capabilities': this.capabilities, 'castChannelId': this.cast_channel_id, }); }; /** * Adapter for mediaRouter.mojom.HangoutsMediaStatusExtraData. * @constructor */ function HangoutsMediaStatusExtraDataAdapter(fields) { this.local_present = false; assignFields(this, fields); } HangoutsMediaStatusExtraDataAdapter.prototype.toNewVersion = function() { return new mediaRouter.mojom.HangoutsMediaStatusExtraData({ 'localPresent': this.local_present, }); }; /** * Adapter for net.interfaces.IPAddress. * @constructor */ function IPAddressAdapter(fields) { this.address_bytes = null; assignFields(this, fields); } IPAddressAdapter.fromNewVersion = function(other) { return new IPAddressAdapter({ 'address_bytes': other.addressBytes, }); }; IPAddressAdapter.prototype.toNewVersion = function() { return new net.interfaces.IPAddress({ 'addressBytes': this.address_bytes, }); }; /** * Adapter for net.interfaces.IPEndpoint. * @constructor */ function IPEndpointAdapter(fields) { this.address = null; this.port = 0; assignFields(this, fields); } IPEndpointAdapter.fromNewVersion = function(other) { return new IPEndpointAdapter({ 'address': IPAddressAdapter.fromNewVersion(other.address), 'port': other.port, }); }; IPEndpointAdapter.prototype.toNewVersion = function() { return new net.interfaces.IPEndpoint({ 'address': this.address.toNewVersion(), 'port': this.port, }); }; /** * Adapter for mediaRouter.mojom.MediaStatus. * @constructor */ function MediaStatusAdapter(fields) { this.title = null; this.can_play_pause = false; this.can_mute = false; this.can_set_volume = false; this.can_seek = false; this.is_muted = false; this.play_state = 0; this.volume = 0; this.duration = null; this.current_time = null; this.hangouts_extra_data = null; assignFields(this, fields); } MediaStatusAdapter.PlayState = mediaRouter.mojom.MediaStatus.PlayState; MediaStatusAdapter.prototype.toNewVersion = function() { return new mediaRouter.mojom.MediaStatus({ 'title': this.title, 'canPlayPause': this.can_play_pause, 'canMute': this.can_mute, 'canSetVolume': this.can_set_volume, 'canSeek': this.can_seek, 'isMuted': this.is_muted, 'playState': this.play_state, 'volume': this.volume, 'duration': this.duration, 'currentTime': this.current_time, 'hangoutsExtraData': this.hangouts_extra_data && this.hangouts_extra_data.toNewVersion(), }); }; /** * Adapter for media.mojom.RemotingSinkMetadata. * @constructor */ function RemotingSinkMetadataAdapter(fields) { this.features = null; this.audio_capabilities = null; this.video_capabilities = null; this.friendly_name = null; assignFields(this, fields); } RemotingSinkMetadataAdapter.fromNewVersion = function(other) { return new RemotingSinkMetadataAdapter({ 'features': other.features, 'audio_capabilities': other.audioCapabilities, 'video_capabilities': other.videoCapabilities, 'friendly_name': other.friendlyName, }); }; RemotingSinkMetadataAdapter.prototype.toNewVersion = function() { return new media.mojom.RemotingSinkMetadata({ 'features': this.features, 'audioCapabilities': this.audio_capabilities, 'videoCapabilities': this.video_capabilities, 'friendlyName': this.friendly_name, }); }; /** * Adapter for mediaRouter.mojom.MediaSink. * @constructor */ function MediaSinkAdapter(fields) { this.sink_id = null; this.name = null; this.description = null; this.domain = null; this.icon_type = 0; this.extra_data = null; assignFields(this, fields); } MediaSinkAdapter.fromNewVersion = function(other) { return new MediaSinkAdapter({ 'sink_id': other.sinkId, 'name': other.name, 'description': other.description, 'domain': other.domain, 'icon_type': other.iconType, 'extra_data': other.extraData && MediaSinkExtraDataAdapter.fromNewVersion(other.extraData), }); }; MediaSinkAdapter.prototype.toNewVersion = function() { return new mediaRouter.mojom.MediaSink({ 'sinkId': this.sink_id, 'name': this.name, 'description': this.description, 'domain': this.domain, 'iconType': this.icon_type, 'extraData': this.extra_data && this.extra_data.toNewVersion(), }); }; /** * Adapter for mediaRouter.mojom.MediaSinkExtraData. * @constructor */ function MediaSinkExtraDataAdapter(value) { this.$data = null; this.$tag = undefined; if (value == undefined) { return; } var keys = Object.keys(value); if (keys.length == 0) { return; } if (keys.length > 1) { throw new TypeError('You may set only one member on a union.'); } var fields = [ 'dial_media_sink', 'cast_media_sink', ]; if (fields.indexOf(keys[0]) < 0) { throw new ReferenceError(keys[0] + ' is not a MediaSinkExtraDataAdapter member.'); } this[keys[0]] = value[keys[0]]; } MediaSinkExtraDataAdapter.Tags = { dial_media_sink: 0, cast_media_sink: 1, }; Object.defineProperty(MediaSinkExtraDataAdapter.prototype, 'dial_media_sink', { get: function() { if (this.$tag != MediaSinkExtraDataAdapter.Tags.dial_media_sink) { throw new ReferenceError( 'MediaSinkExtraDataAdapter.dial_media_sink is not currently set.'); } return this.$data; }, set: function(value) { this.$tag = MediaSinkExtraDataAdapter.Tags.dial_media_sink; this.$data = value; } }); Object.defineProperty(MediaSinkExtraDataAdapter.prototype, 'cast_media_sink', { get: function() { if (this.$tag != MediaSinkExtraDataAdapter.Tags.cast_media_sink) { throw new ReferenceError( 'MediaSinkExtraDataAdapter.cast_media_sink is not currently set.'); } return this.$data; }, set: function(value) { this.$tag = MediaSinkExtraDataAdapter.Tags.cast_media_sink; this.$data = value; } }); MediaSinkExtraDataAdapter.fromNewVersion = function(other) { if (other.$tag == mediaRouter.mojom.MediaSinkExtraData.Tags.dialMediaSink) { return new MediaSinkExtraDataAdapter({ 'dial_media_sink': DialMediaSinkAdapter.fromNewVersion(other.dialMediaSink), }); } else { return new MediaSinkExtraDataAdapter({ 'cast_media_sink': CastMediaSinkAdapter.fromNewVersion(other.castMediaSink), }); } }; MediaSinkExtraDataAdapter.prototype.toNewVersion = function() { if (this.$tag == MediaSinkExtraDataAdapter.Tags.dial_media_sink) { return new mediaRouter.mojom.MediaSinkExtraData({ 'dialMediaSink': this.dial_media_sink.toNewVersion(), }); } else { return new mediaRouter.mojom.MediaSinkExtraData({ 'castMediaSink': this.cast_media_sink.toNewVersion(), }); } }; /** * Adapter for media.mojom.MirrorServiceRemoterPtr. * @constructor */ function MirrorServiceRemoterPtrAdapter(handleOrPtrInfo) { this.ptr = new mojo.InterfacePtrController(MirrorServiceRemoterAdapter, handleOrPtrInfo); } MirrorServiceRemoterPtrAdapter.prototype = Object.create(media.mojom.MirrorServiceRemoterPtr.prototype); MirrorServiceRemoterPtrAdapter.prototype.constructor = MirrorServiceRemoterPtrAdapter; MirrorServiceRemoterPtrAdapter.prototype.startDataStreams = function() { return MirrorServiceRemoterProxy.prototype.startDataStreams .apply(this.ptr.getProxy(), arguments).then(function(response) { return Promise.resolve({ 'audio_stream_id': response.audioStreamId, 'video_stream_id': response.videoStreamId, }); }); }; /** * Adapter for media.mojom.MirrorServiceRemoter.stubclass. * @constructor */ function MirrorServiceRemoterStubAdapter(delegate) { this.delegate_ = delegate; } MirrorServiceRemoterStubAdapter.prototype = Object.create( media.mojom.MirrorServiceRemoter.stubClass.prototype); MirrorServiceRemoterStubAdapter.prototype.constructor = MirrorServiceRemoterStubAdapter; MirrorServiceRemoterStubAdapter.prototype.startDataStreams = function(hasAudio, hasVideo) { return this.delegate_ && this.delegate_.startDataStreams && this.delegate_.startDataStreams(hasAudio, hasVideo).then( function(response) { return { 'audioStreamId': response.audio_stream_id, 'videoStreamId': response.video_stream_id, }; }); }; /** * Adapter for media.mojom.MirrorServiceRemoter. */ var MirrorServiceRemoterAdapter = { name: 'media.mojom.MirrorServiceRemoter', kVersion: 0, ptrClass: MirrorServiceRemoterPtrAdapter, proxyClass: media.mojom.MirrorServiceRemoter.proxyClass, stubClass: MirrorServiceRemoterStubAdapter, validateRequest: media.mojom.MirrorServiceRemoter.validateRequest, validateResponse: media.mojom.MirrorServiceRemoter.validateResponse, }; /** * Adapter for media.mojom.MirrorServiceRemotingSourcePtr. * @constructor */ function MirrorServiceRemotingSourcePtrAdapter(handleOrPtrInfo) { this.ptr = new mojo.InterfacePtrController(MirrorServiceRemotingSourceAdapter, handleOrPtrInfo); } MirrorServiceRemotingSourcePtrAdapter.prototype = Object.create(media.mojom.MirrorServiceRemotingSourcePtr.prototype); MirrorServiceRemotingSourcePtrAdapter.prototype.constructor = MirrorServiceRemotingSourcePtrAdapter; MirrorServiceRemotingSourcePtrAdapter.prototype.onSinkAvailable = function(metadata) { return this.ptr.getProxy().onSinkAvailable(metadata.toNewVersion()); }; /** * Adapter for media.mojom.MirrorServiceRemotingSource. */ var MirrorServiceRemotingSourceAdapter = { name: 'media.mojom.MirrorServiceRemotingSource', kVersion: 0, ptrClass: MirrorServiceRemotingSourcePtrAdapter, proxyClass: media.mojom.MirrorServiceRemotingSource.proxyClass, stubClass: null, validateRequest: media.mojom.MirrorServiceRemotingSource.validateRequest, validateResponse: null, }; /** * Adapter for mediaRouter.mojom.MediaStatusObserver. * @constructor */ function MediaStatusObserverPtrAdapter(handleOrPtrInfo) { this.ptr = new mojo.InterfacePtrController(MediaStatusObserverAdapter, handleOrPtrInfo); } MediaStatusObserverPtrAdapter.prototype = Object.create(mediaRouter.mojom.MediaStatusObserverPtr.prototype); MediaStatusObserverPtrAdapter.prototype.constructor = MediaStatusObserverPtrAdapter; MediaStatusObserverPtrAdapter.prototype.onMediaStatusUpdated = function(status) { return this.ptr.getProxy().onMediaStatusUpdated(status.toNewVersion()); }; /** * Adapter for mediaRouter.mojom.MediaStatusObserver. */ var MediaStatusObserverAdapter = { name: 'mediaRouter.mojom.MediaStatusObserver', kVersion: 0, ptrClass: MediaStatusObserverPtrAdapter, proxyClass: mediaRouter.mojom.MediaStatusObserver.proxyClass, stubClass: null, validateRequest: mediaRouter.mojom.MediaStatusObserver.validateRequest, validateResponse: null, }; /** * Converts a media sink to a MediaSink Mojo object. * @param {!MediaSink} sink A media sink. * @return {!mediaRouter.mojom.MediaSink} A Mojo MediaSink object. */ function sinkToMojo_(sink) { return new mediaRouter.mojom.MediaSink({ 'name': sink.friendlyName, 'description': sink.description, 'domain': sink.domain, 'sinkId': sink.id, 'iconType': sinkIconTypeToMojo(sink.iconType), 'providerId': mediaRouter.mojom.MediaRouteProvider.Id.EXTENSION, }); } /** * Converts a media sink's icon type to a MediaSink.IconType Mojo object. * @param {!MediaSink.IconType} type A media sink's icon type. * @return {!mediaRouter.mojom.MediaSink.IconType} A Mojo MediaSink.IconType * object. */ function sinkIconTypeToMojo(type) { switch (type) { case 'cast': return mediaRouter.mojom.SinkIconType.CAST; case 'cast_audio_group': return mediaRouter.mojom.SinkIconType.CAST_AUDIO_GROUP; case 'cast_audio': return mediaRouter.mojom.SinkIconType.CAST_AUDIO; case 'meeting': return mediaRouter.mojom.SinkIconType.MEETING; case 'hangout': return mediaRouter.mojom.SinkIconType.HANGOUT; case 'education': return mediaRouter.mojom.SinkIconType.EDUCATION; case 'generic': return mediaRouter.mojom.SinkIconType.GENERIC; default: console.error('Unknown sink icon type : ' + type); return mediaRouter.mojom.SinkIconType.GENERIC; } } /** * Returns a Mojo MediaRoute object given a MediaRoute and a * media sink name. * @param {!MediaRoute} route * @return {!mediaRouter.mojom.MediaRoute} */ function routeToMojo_(route) { return new mediaRouter.mojom.MediaRoute({ 'mediaRouteId': route.id, 'mediaSource': route.mediaSource, 'mediaSinkId': route.sinkId, 'description': route.description, 'iconUrl': route.iconUrl, 'isLocal': route.isLocal, 'forDisplay': route.forDisplay, 'isIncognito': route.offTheRecord, 'isLocalPresentation': route.isOffscreenPresentation, 'controllerType': route.controllerType, // Begin newly added properties, followed by the milestone they were // added. The guard should be safe to remove N+2 milestones later. 'presentationId': route.presentationId || '' // M64 }); } /** * Converts a route message to a RouteMessage Mojo object. * @param {!RouteMessage} message * @return {!mediaRouter.mojom.RouteMessage} A Mojo RouteMessage object. */ function messageToMojo_(message) { if ("string" == typeof message.message) { return new mediaRouter.mojom.RouteMessage({ 'type': mediaRouter.mojom.RouteMessage.Type.TEXT, 'message': message.message, }); } else { return new mediaRouter.mojom.RouteMessage({ 'type': mediaRouter.mojom.RouteMessage.Type.BINARY, 'data': message.message, }); } } /** * Converts presentation connection state to Mojo enum value. * @param {!string} state * @return {!mediaRouter.mojom.MediaRouter.PresentationConnectionState} */ function presentationConnectionStateToMojo_(state) { var PresentationConnectionState = mediaRouter.mojom.MediaRouter.PresentationConnectionState; switch (state) { case 'connecting': return PresentationConnectionState.CONNECTING; case 'connected': return PresentationConnectionState.CONNECTED; case 'closed': return PresentationConnectionState.CLOSED; case 'terminated': return PresentationConnectionState.TERMINATED; default: console.error('Unknown presentation connection state: ' + state); return PresentationConnectionState.TERMINATED; } } /** * Converts presentation connection close reason to Mojo enum value. * @param {!string} reason * @return {!mediaRouter.mojom.MediaRouter.PresentationConnectionCloseReason} */ function presentationConnectionCloseReasonToMojo_(reason) { var PresentationConnectionCloseReason = mediaRouter.mojom.MediaRouter.PresentationConnectionCloseReason; switch (reason) { case 'error': return PresentationConnectionCloseReason.CONNECTION_ERROR; case 'closed': return PresentationConnectionCloseReason.CLOSED; case 'went_away': return PresentationConnectionCloseReason.WENT_AWAY; default: console.error('Unknown presentation connection close reason : ' + reason); return PresentationConnectionCloseReason.CONNECTION_ERROR; } } /** * Converts string to Mojo origin. * @param {string|!url.mojom.Origin} origin * @return {!url.mojom.Origin} */ function stringToMojoOrigin_(origin) { if (origin instanceof url.mojom.Origin) { return origin; } var originUrl = new URL(origin); var mojoOrigin = {}; mojoOrigin.scheme = originUrl.protocol.replace(':', ''); mojoOrigin.host = originUrl.hostname; var port = originUrl.port ? Number.parseInt(originUrl.port) : 0; switch (mojoOrigin.scheme) { case 'http': mojoOrigin.port = port || 80; break; case 'https': mojoOrigin.port = port || 443; break; default: throw new Error('Scheme must be http or https'); } mojoOrigin.suborigin = ''; return new url.mojom.Origin(mojoOrigin); } /** * Parses the given route request Error object and converts it to the * corresponding result code. * @param {!Error} error * @return {!mediaRouter.mojom.RouteRequestResultCode} */ function getRouteRequestResultCode_(error) { return error.errorCode ? error.errorCode : mediaRouter.mojom.RouteRequestResultCode.UNKNOWN_ERROR; } /** * Creates and returns a successful route response from given route. * @param {!MediaRoute} route * @return {!Object} */ function toSuccessRouteResponse_(route) { return { route: routeToMojo_(route), resultCode: mediaRouter.mojom.RouteRequestResultCode.OK }; } /** * Creates and returns a error route response from given Error object. * @param {!Error} error * @return {!Object} */ function toErrorRouteResponse_(error) { return { errorText: error.message, resultCode: getRouteRequestResultCode_(error) }; } /** * Creates a new MediaRouter. * Converts a route struct to its Mojo form. * @param {!mediaRouter.mojom.MediaRouterPtr} service * @constructor */ function MediaRouter(service) { /** * The Mojo service proxy. Allows extension code to call methods that reside * in the browser. * @type {!mediaRouter.mojom.MediaRouterPtr} */ this.service_ = service; /** * The provider manager service delegate. Its methods are called by the * browser-resident Mojo service. * @type {!MediaRouter} */ this.mrpm_ = new MediaRouteProvider(this); /** * Handle to a KeepAlive service object, which prevents the extension from * being suspended as long as it remains in scope. * @type {boolean} */ this.keepAlive_ = null; /** * The bindings to bind the service delegate to the Mojo interface. * Object must remain in scope for the lifetime of the connection to * prevent the connection from closing automatically. * @type {!mojo.Binding} */ this.mediaRouteProviderBinding_ = new mojo.Binding( mediaRouter.mojom.MediaRouteProvider, this.mrpm_); } /** * Returns definitions of Mojo core and generated Mojom classes that can be * used directly by the component. * @return {!Object} * TODO(imcheng): We should export these along with MediaRouter. This requires * us to modify the component to handle multiple exports. When that logic is * baked in for a couple of milestones, we should be able to remove this * method. * TODO(imcheng): We should stop exporting mojo bindings classes that the * Media Router extension doesn't directly use, such as * mojo.AssociatedInterfacePtrInfo, mojo.InterfacePtrController and * mojo.interfaceControl. */ MediaRouter.prototype.getMojoExports = function() { return { AssociatedInterfacePtrInfo: mojo.AssociatedInterfacePtrInfo, Binding: mojo.Binding, DialMediaSink: DialMediaSinkAdapter, CastMediaSink: CastMediaSinkAdapter, HangoutsMediaRouteController: mediaRouter.mojom.HangoutsMediaRouteController, HangoutsMediaStatusExtraData: HangoutsMediaStatusExtraDataAdapter, IPAddress: IPAddressAdapter, IPEndpoint: IPEndpointAdapter, InterfacePtrController: mojo.InterfacePtrController, InterfacePtrInfo: mojo.InterfacePtrInfo, InterfaceRequest: mojo.InterfaceRequest, MediaController: mediaRouter.mojom.MediaController, MediaStatus: MediaStatusAdapter, MediaStatusObserverPtr: mediaRouter.mojom.MediaStatusObserverPtr, MirroringCastMessage: mirroring.mojom.CastMessage, MirroringCastMessageChannel: mirroring.mojom.CastMessageChannel, MirroringCastMessageChannelPtr: mirroring.mojom.CastMessageChannelPtr, MirroringServiceHostPtr: mirroring.mojom.MirroringServiceHostPtr, MirroringSessionError: mirroring.mojom.SessionError, MirroringSessionObserver: mirroring.mojom.SessionObserver, MirroringSessionObserverPtr: mirroring.mojom.SessionObserverPtr, MirroringSessionParameters: mirroring.mojom.SessionParameters, MirroringSessionType: mirroring.mojom.SessionType, MirroringRemotingNamespace: mirroring.mojom.kRemotingNamespace, MirroringWebRtcNamespace: mirroring.mojom.kWebRtcNamespace, MirrorServiceRemoter: MirrorServiceRemoterAdapter, MirrorServiceRemoterPtr: MirrorServiceRemoterPtrAdapter, MirrorServiceRemotingSourcePtr: MirrorServiceRemotingSourcePtrAdapter, RemotingStopReason: media.mojom.RemotingStopReason, RemotingStartFailReason: media.mojom.RemotingStartFailReason, RemotingSinkFeature: media.mojom.RemotingSinkFeature, RemotingSinkAudioCapability: media.mojom.RemotingSinkAudioCapability, RemotingSinkVideoCapability: media.mojom.RemotingSinkVideoCapability, RemotingSinkMetadata: RemotingSinkMetadataAdapter, RouteControllerType: mediaRouter.mojom.RouteControllerType, Origin: url.mojom.Origin, Sink: MediaSinkAdapter, SinkExtraData: MediaSinkExtraDataAdapter, TimeDelta: mojoBase.mojom.TimeDelta, Url: url.mojom.Url, interfaceControl: mojo.interfaceControl, makeRequest: mojo.makeRequest, }; }; /** * Registers the Media Router Provider Manager with the Media Router. * @return {!Promise} Instance ID and config for the Media Router. */ MediaRouter.prototype.start = function() { return this.service_.registerMediaRouteProvider( mediaRouter.mojom.MediaRouteProvider.Id.EXTENSION, this.mediaRouteProviderBinding_.createInterfacePtrAndBind()).then( function(response) { return { 'instance_id': response.instanceId, 'config': { 'enable_dial_discovery': response.config.enableDialDiscovery, 'enable_cast_discovery': response.config.enableCastDiscovery, 'enable_dial_sink_query': response.config.enableDialSinkQuery, 'enable_cast_sink_query': response.config.enableCastSinkQuery, 'use_views_dialog': response.config.useViewsDialog, 'use_mirroring_service': response.config.useMirroringService, } }; }); } /** * Sets the service delegate methods. * @param {Object} handlers */ MediaRouter.prototype.setHandlers = function(handlers) { this.mrpm_.setHandlers(handlers); } /** * The keep alive status. * @return {boolean} */ MediaRouter.prototype.getKeepAlive = function() { return this.keepAlive_ != null; }; /** * Called by the provider manager when a sink list for a given source is * updated. * @param {!string} sourceUrn * @param {!Array} sinks * @param {!Array} origins */ MediaRouter.prototype.onSinksReceived = function(sourceUrn, sinks, origins) { // |origins| is a string array if the Media Router component extension version // is 59 or older. Without the stringToMojoOrigin_() conversion, clients using // those extension versions would see a crash shown in // https://crbug.com/787427. this.service_.onSinksReceived( mediaRouter.mojom.MediaRouteProvider.Id.EXTENSION, sourceUrn, sinks.map(sinkToMojo_), origins.map(stringToMojoOrigin_)); }; /** * Called by the provider manager when a sink is found to notify the MR of the * sink's ID. The actual sink will be returned through the normal sink list * update process, so this helps the MR identify the search result in the * list. * @param {string} pseudoSinkId ID of the pseudo sink that started the * search. * @param {string} sinkId ID of the newly-found sink. */ MediaRouter.prototype.onSearchSinkIdReceived = function( pseudoSinkId, sinkId) { this.service_.onSearchSinkIdReceived(pseudoSinkId, sinkId); }; /** * Called by the provider manager to keep the extension from suspending * if it enters a state where suspension is undesirable (e.g. there is an * active MediaRoute.) * If keepAlive is true, the extension is kept alive. * If keepAlive is false, the extension is allowed to suspend. * @param {boolean} keepAlive */ MediaRouter.prototype.setKeepAlive = function(keepAlive) { if (keepAlive === false && this.keepAlive_) { this.keepAlive_.ptr.reset(); this.keepAlive_ = null; } else if (keepAlive === true && !this.keepAlive_) { this.keepAlive_ = new extensions.KeepAlivePtr; Mojo.bindInterface(extensions.KeepAlive.name, mojo.makeRequest(this.keepAlive_).handle); } }; /** * Called by the provider manager to send an issue from a media route * provider to the Media Router, to show the user. * @param {!Object} issue The issue object. */ MediaRouter.prototype.onIssue = function(issue) { function issueSeverityToMojo_(severity) { switch (severity) { case 'fatal': return mediaRouter.mojom.Issue.Severity.FATAL; case 'warning': return mediaRouter.mojom.Issue.Severity.WARNING; case 'notification': return mediaRouter.mojom.Issue.Severity.NOTIFICATION; default: console.error('Unknown issue severity: ' + severity); return mediaRouter.mojom.Issue.Severity.NOTIFICATION; } } function issueActionToMojo_(action) { switch (action) { case 'dismiss': return mediaRouter.mojom.Issue.ActionType.DISMISS; case 'learn_more': return mediaRouter.mojom.Issue.ActionType.LEARN_MORE; default: console.error('Unknown issue action type : ' + action); return mediaRouter.mojom.Issue.ActionType.OK; } } var secondaryActions = (issue.secondaryActions || []).map(issueActionToMojo_); this.service_.onIssue(new mediaRouter.mojom.Issue({ 'routeId': issue.routeId || '', 'severity': issueSeverityToMojo_(issue.severity), 'title': issue.title, 'message': issue.message || '', 'defaultAction': issueActionToMojo_(issue.defaultAction), 'secondaryActions': secondaryActions, 'helpPageId': issue.helpPageId, 'isBlocking': issue.isBlocking, 'sinkId': issue.sinkId || '' })); }; /** * Called by the provider manager when the set of active routes * has been updated. * @param {!Array} routes The active set of media routes. * @param {string=} sourceUrn The sourceUrn associated with this route * query. * @param {Array=} joinableRouteIds The active set of joinable * media routes. */ MediaRouter.prototype.onRoutesUpdated = function( routes, sourceUrn = '', joinableRouteIds = []) { this.service_.onRoutesUpdated( mediaRouter.mojom.MediaRouteProvider.Id.EXTENSION, routes.map(routeToMojo_), sourceUrn, joinableRouteIds); }; /** * Called by the provider manager when sink availability has been updated. * @param {!mediaRouter.mojom.MediaRouter.SinkAvailability} availability * The new sink availability. */ MediaRouter.prototype.onSinkAvailabilityUpdated = function(availability) { this.service_.onSinkAvailabilityUpdated( mediaRouter.mojom.MediaRouteProvider.Id.EXTENSION, availability); }; /** * Called by the provider manager when the state of a presentation connected * to a route has changed. * @param {string} routeId * @param {string} state */ MediaRouter.prototype.onPresentationConnectionStateChanged = function(routeId, state) { this.service_.onPresentationConnectionStateChanged( routeId, presentationConnectionStateToMojo_(state)); }; /** * Called by the provider manager when the state of a presentation connected * to a route has closed. * @param {string} routeId * @param {string} reason * @param {string} message */ MediaRouter.prototype.onPresentationConnectionClosed = function(routeId, reason, message) { this.service_.onPresentationConnectionClosed( routeId, presentationConnectionCloseReasonToMojo_(reason), message); }; /** * @param {string} routeId * @param {!Array} mesages */ MediaRouter.prototype.onRouteMessagesReceived = function(routeId, messages) { this.service_.onRouteMessagesReceived( routeId, messages.map(messageToMojo_)); }; /** * @param {number} tabId * @param {!media.mojom.MirrorServiceRemoterPtr} remoter * @param {!mojo.InterfaceRequest} remotingSource */ MediaRouter.prototype.onMediaRemoterCreated = function(tabId, remoter, remotingSource) { this.service_.onMediaRemoterCreated( tabId, new media.mojom.MirrorServiceRemoterPtr(remoter.ptr.passInterface()), remotingSource); } /** * Returns current status of media sink service in JSON format. * @return {!Promise} */ MediaRouter.prototype.getMediaSinkServiceStatus = function() { return this.service_.getMediaSinkServiceStatus(); } /** * @param {int32} target_tab_id * @param {!mojo.InterfaceRequest} request */ MediaRouter.prototype.getMirroringServiceHostForTab = function( target_tab_id, request) { this.service_.getMirroringServiceHostForTab(target_tab_id, request); } /** * @param {int32} initiator_tab_id * @param {!string} desktop_stream_id * @param {!mojo.InterfaceRequest} request */ MediaRouter.prototype.getMirroringServiceHostForDesktop = function( initiator_tab_id, desktop_stream_id, request) { this.service_.getMirroringServiceHostForDesktop(initiator_tab_id, desktop_stream_id, request); } /** * @param {!url.mojom.Url} presentation_url * @param {!string} presentation_id * @param {!mojo.InterfaceRequest} request */ MediaRouter.prototype.getMirroringServiceHostForOffscreenTab = function( presentation_url, presentation_id, request) { this.service_.getMirroringServiceHostForOffscreenTab(presentation_url, presentation_id, request); } /** * Object containing callbacks set by the provider manager. * * @constructor * @struct */ function MediaRouterHandlers() { /** * @type {function(!string, !string, !string, !string, !number)} */ this.createRoute = null; /** * @type {function(!string, !string, !string, !number)} */ this.joinRoute = null; /** * @type {function(string): Promise} */ this.terminateRoute = null; /** * @type {function(string)} */ this.startObservingMediaSinks = null; /** * @type {function(string)} */ this.stopObservingMediaSinks = null; /** * @type {function(string, string): Promise} */ this.sendRouteMessage = null; /** * @type {function(string, Uint8Array): Promise} */ this.sendRouteBinaryMessage = null; /** * @type {function(string)} */ this.startListeningForRouteMessages = null; /** * @type {function(string)} */ this.stopListeningForRouteMessages = null; /** * @type {function(string)} */ this.detachRoute = null; /** * @type {function()} */ this.startObservingMediaRoutes = null; /** * @type {function()} */ this.stopObservingMediaRoutes = null; /** * @type {function()} */ this.connectRouteByRouteId = null; /** * @type {function()} */ this.enableMdnsDiscovery = null; /** * @type {function()} */ this.updateMediaSinks = null; /** * @type {function(string, string, !SinkSearchCriteria): string} */ this.searchSinks = null; /** * @type {function()} */ this.provideSinks = null; /** * @type {function(string, !mojo.InterfaceRequest, * !mediaRouter.mojom.MediaStatusObserverPtr): !Promise} */ this.createMediaRouteController = null; }; /** * Routes calls from Media Router to the provider manager extension. * Registered with the MediaRouter stub. * @param {!MediaRouter} MediaRouter proxy to call into the * Media Router mojo interface. * @constructor */ function MediaRouteProvider(mediaRouter) { /** * Object containing JS callbacks into Provider Manager code. * @type {!MediaRouterHandlers} */ this.handlers_ = new MediaRouterHandlers(); /** * Proxy class to the browser's Media Router Mojo service. * @type {!MediaRouter} */ this.mediaRouter_ = mediaRouter; } /* * Sets the callback handler used to invoke methods in the provider manager. * * @param {!MediaRouterHandlers} handlers */ MediaRouteProvider.prototype.setHandlers = function(handlers) { this.handlers_ = handlers; var requiredHandlers = [ 'stopObservingMediaRoutes', 'startObservingMediaRoutes', 'sendRouteMessage', 'sendRouteBinaryMessage', 'startListeningForRouteMessages', 'stopListeningForRouteMessages', 'detachRoute', 'terminateRoute', 'joinRoute', 'createRoute', 'stopObservingMediaSinks', 'startObservingMediaRoutes', 'connectRouteByRouteId', 'enableMdnsDiscovery', 'updateMediaSinks', 'searchSinks', 'provideSinks', 'createMediaRouteController', 'onBeforeInvokeHandler' ]; requiredHandlers.forEach(function(nextHandler) { if (handlers[nextHandler] === undefined) { console.error(nextHandler + ' handler not registered.'); } }); } /** * Starts querying for sinks capable of displaying the media source * designated by |sourceUrn|. Results are returned by calling * OnSinksReceived. * @param {!string} sourceUrn */ MediaRouteProvider.prototype.startObservingMediaSinks = function(sourceUrn) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.startObservingMediaSinks(sourceUrn); }; /** * Stops querying for sinks capable of displaying |sourceUrn|. * @param {!string} sourceUrn */ MediaRouteProvider.prototype.stopObservingMediaSinks = function(sourceUrn) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.stopObservingMediaSinks(sourceUrn); }; /** * Requests that |sinkId| render the media referenced by |sourceUrn|. If the * request is from the Presentation API, then origin and tabId will * be populated. * @param {!string} sourceUrn Media source to render. * @param {!string} sinkId Media sink ID. * @param {!string} presentationId Presentation ID from the site * requesting presentation. TODO(mfoltz): Remove. * @param {!url.mojom.Origin} origin Origin of site requesting presentation. * @param {!number} tabId ID of tab requesting presentation. * @param {!mojo_base.mojom.TimeDelta} timeout If positive, the timeout * duration for the request. Otherwise, the default duration will be used. * @param {!boolean} incognito If true, the route is being requested by * an incognito profile. * @return {!Promise.} A Promise resolving to an object describing * the newly created media route, or rejecting with an error message on * failure. */ MediaRouteProvider.prototype.createRoute = function(sourceUrn, sinkId, presentationId, origin, tabId, timeout, incognito) { this.handlers_.onBeforeInvokeHandler(); return this.handlers_.createRoute( sourceUrn, sinkId, presentationId, origin, tabId, Math.floor(timeout.microseconds / 1000), incognito) .then(function(route) { return toSuccessRouteResponse_(route); }, function(err) { return toErrorRouteResponse_(err); }); }; /** * Handles a request via the Presentation API to join an existing route given * by |sourceUrn| and |presentationId|. |origin| and |tabId| are used for * validating same-origin/tab scope. * @param {!string} sourceUrn Media source to render. * @param {!string} presentationId Presentation ID to join. * @param {!url.mojom.Origin} origin Origin of site requesting join. * @param {!number} tabId ID of tab requesting join. * @param {!mojo_base.mojom.TimeDelta} timeout If positive, the timeout * duration for the request. Otherwise, the default duration will be used. * @param {!boolean} incognito If true, the route is being requested by * an incognito profile. * @return {!Promise.} A Promise resolving to an object describing * the newly created media route, or rejecting with an error message on * failure. */ MediaRouteProvider.prototype.joinRoute = function(sourceUrn, presentationId, origin, tabId, timeout, incognito) { this.handlers_.onBeforeInvokeHandler(); return this.handlers_.joinRoute( sourceUrn, presentationId, origin, tabId, Math.floor(timeout.microseconds / 1000), incognito) .then(function(route) { return toSuccessRouteResponse_(route); }, function(err) { return toErrorRouteResponse_(err); }); }; /** * Handles a request via the Presentation API to join an existing route given * by |sourceUrn| and |routeId|. |origin| and |tabId| are used for * validating same-origin/tab scope. * @param {!string} sourceUrn Media source to render. * @param {!string} routeId Route ID to join. * @param {!string} presentationId Presentation ID to join. * @param {!url.mojom.Origin} origin Origin of site requesting join. * @param {!number} tabId ID of tab requesting join. * @param {!mojo_base.mojom.TimeDelta} timeout If positive, the timeout * duration for the request. Otherwise, the default duration will be used. * @param {!boolean} incognito If true, the route is being requested by * an incognito profile. * @return {!Promise.} A Promise resolving to an object describing * the newly created media route, or rejecting with an error message on * failure. */ MediaRouteProvider.prototype.connectRouteByRouteId = function(sourceUrn, routeId, presentationId, origin, tabId, timeout, incognito) { this.handlers_.onBeforeInvokeHandler(); return this.handlers_.connectRouteByRouteId( sourceUrn, routeId, presentationId, origin, tabId, Math.floor(timeout.microseconds / 1000), incognito) .then(function(route) { return toSuccessRouteResponse_(route); }, function(err) { return toErrorRouteResponse_(err); }); }; /** * Terminates the route specified by |routeId|. * @param {!string} routeId * @return {!Promise} A Promise resolving to an object describing * the result of the terminate operation, or rejecting with an error * message and code if the operation failed. */ MediaRouteProvider.prototype.terminateRoute = function(routeId) { this.handlers_.onBeforeInvokeHandler(); return this.handlers_.terminateRoute(routeId).then( () => ({resultCode: mediaRouter.mojom.RouteRequestResultCode.OK}), (err) => toErrorRouteResponse_(err)); }; /** * Posts a message to the route designated by |routeId|. * @param {!string} routeId * @param {!string} message */ MediaRouteProvider.prototype.sendRouteMessage = function( routeId, message) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.sendRouteMessage(routeId, message); }; /** * Sends a binary message to the route designated by |routeId|. * @param {!string} routeId * @param {!Array} data */ MediaRouteProvider.prototype.sendRouteBinaryMessage = function( routeId, data) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.sendRouteBinaryMessage(routeId, new Uint8Array(data)); }; /** * Listen for messages from a route. * @param {!string} routeId */ MediaRouteProvider.prototype.startListeningForRouteMessages = function( routeId) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.startListeningForRouteMessages(routeId); }; /** * @param {!string} routeId */ MediaRouteProvider.prototype.stopListeningForRouteMessages = function( routeId) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.stopListeningForRouteMessages(routeId); }; /** * Indicates that the presentation connection that was connected to |routeId| * is no longer connected to it. * @param {!string} routeId */ MediaRouteProvider.prototype.detachRoute = function( routeId) { this.handlers_.detachRoute(routeId); }; /** * Requests that the provider manager start sending information about active * media routes to the Media Router. * @param {!string} sourceUrn */ MediaRouteProvider.prototype.startObservingMediaRoutes = function(sourceUrn) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.startObservingMediaRoutes(sourceUrn); }; /** * Requests that the provider manager stop sending information about active * media routes to the Media Router. * @param {!string} sourceUrn */ MediaRouteProvider.prototype.stopObservingMediaRoutes = function(sourceUrn) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.stopObservingMediaRoutes(sourceUrn); }; /** * Enables mDNS device discovery. */ MediaRouteProvider.prototype.enableMdnsDiscovery = function() { this.handlers_.onBeforeInvokeHandler(); this.handlers_.enableMdnsDiscovery(); }; /** * Requests that the provider manager update media sinks. * @param {!string} sourceUrn */ MediaRouteProvider.prototype.updateMediaSinks = function(sourceUrn) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.updateMediaSinks(sourceUrn); }; /** * Requests that the provider manager search its providers for a sink matching * |searchCriteria| that is compatible with |sourceUrn|. If a sink is found * that can be used immediately for route creation, its ID is returned. * Otherwise the empty string is returned. * * @param {string} sinkId Sink ID of the pseudo sink generating the request. * @param {string} sourceUrn Media source to be used with the sink. * @param {!SinkSearchCriteria} searchCriteria Search criteria for the route * providers. * @return {!Promise.} A Promise resolving to either the * sink ID of the sink found by the search that can be used for route * creation, or the empty string if no route can be immediately created. */ MediaRouteProvider.prototype.searchSinks = function( sinkId, sourceUrn, searchCriteria) { this.handlers_.onBeforeInvokeHandler(); return this.handlers_.searchSinks(sinkId, sourceUrn, searchCriteria).then( sinkId => { return { 'sinkId': sinkId }; }, () => { return { 'sinkId': '' }; }); }; /** * Notifies the provider manager that MediaRouter has discovered a list of * sinks. * @param {string} providerName * @param {!Array} sinks */ MediaRouteProvider.prototype.provideSinks = function(providerName, sinks) { this.handlers_.onBeforeInvokeHandler(); this.handlers_.provideSinks(providerName, sinks.map(MediaSinkAdapter.fromNewVersion)); }; /** * Creates a controller for the given route and binds the given * InterfaceRequest to it, and registers an observer for media status updates * for the route. * @param {string} routeId * @param {!mojo.InterfaceRequest} controllerRequest * @param {!mediaRouter.mojom.MediaStatusObserverPtr} observer * @return {!Promise} Resolves to true if a controller * is created. Resolves to false if a controller cannot be created, or if * the controller is already bound. */ MediaRouteProvider.prototype.createMediaRouteController = function( routeId, controllerRequest, observer) { this.handlers_.onBeforeInvokeHandler(); return this.handlers_.createMediaRouteController( routeId, controllerRequest, new MediaStatusObserverPtrAdapter(observer.ptr.passInterface())).then( () => ({success: true}), e => ({success: false})); }; var ptr = new mediaRouter.mojom.MediaRouterPtr; Mojo.bindInterface(mediaRouter.mojom.MediaRouter.name, mojo.makeRequest(ptr).handle); exports.$set('returnValue', new MediaRouter(ptr)); // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'chrome/common/media_router/mojo/media_status.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mediaRouter.mojom'); var time$ = mojo.internal.exposeNamespace('mojoBase.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'mojo/public/mojom/base/time.mojom', '../../../../mojo/public/mojom/base/time.mojom.js'); } function MediaStatus(values) { this.initDefaults_(); this.initFields_(values); } MediaStatus.PlayState = {}; MediaStatus.PlayState.PLAYING = 0; MediaStatus.PlayState.PAUSED = MediaStatus.PlayState.PLAYING + 1; MediaStatus.PlayState.BUFFERING = MediaStatus.PlayState.PAUSED + 1; MediaStatus.PlayState.MIN_VALUE = 0, MediaStatus.PlayState.MAX_VALUE = 2, MediaStatus.PlayState.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: return true; } return false; }; MediaStatus.PlayState.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; MediaStatus.prototype.initDefaults_ = function() { this.title = null; this.canPlayPause = false; this.canMute = false; this.canSetVolume = false; this.canSeek = false; this.isMuted = false; this.playState = 0; this.volume = 0; this.duration = null; this.currentTime = null; this.hangoutsExtraData = null; }; MediaStatus.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaStatus.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 56} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaStatus.title err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate MediaStatus.playState err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 12, MediaStatus.PlayState); if (err !== validator.validationError.NONE) return err; // validate MediaStatus.duration err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 24, time$.TimeDelta, false); if (err !== validator.validationError.NONE) return err; // validate MediaStatus.currentTime err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 32, time$.TimeDelta, false); if (err !== validator.validationError.NONE) return err; // validate MediaStatus.hangoutsExtraData err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 40, HangoutsMediaStatusExtraData, true); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaStatus.encodedSize = codec.kStructHeaderSize + 48; MediaStatus.decode = function(decoder) { var packed; var val = new MediaStatus(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.title = decoder.decodeStruct(codec.String); packed = decoder.readUint8(); val.canPlayPause = (packed >> 0) & 1 ? true : false; val.canMute = (packed >> 1) & 1 ? true : false; val.canSetVolume = (packed >> 2) & 1 ? true : false; val.canSeek = (packed >> 3) & 1 ? true : false; val.isMuted = (packed >> 4) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); val.playState = decoder.decodeStruct(codec.Int32); val.volume = decoder.decodeStruct(codec.Float); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.duration = decoder.decodeStructPointer(time$.TimeDelta); val.currentTime = decoder.decodeStructPointer(time$.TimeDelta); val.hangoutsExtraData = decoder.decodeStructPointer(HangoutsMediaStatusExtraData); return val; }; MediaStatus.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaStatus.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.title); packed = 0; packed |= (val.canPlayPause & 1) << 0 packed |= (val.canMute & 1) << 1 packed |= (val.canSetVolume & 1) << 2 packed |= (val.canSeek & 1) << 3 packed |= (val.isMuted & 1) << 4 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStruct(codec.Int32, val.playState); encoder.encodeStruct(codec.Float, val.volume); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStructPointer(time$.TimeDelta, val.duration); encoder.encodeStructPointer(time$.TimeDelta, val.currentTime); encoder.encodeStructPointer(HangoutsMediaStatusExtraData, val.hangoutsExtraData); }; function HangoutsMediaStatusExtraData(values) { this.initDefaults_(); this.initFields_(values); } HangoutsMediaStatusExtraData.prototype.initDefaults_ = function() { this.localPresent = false; }; HangoutsMediaStatusExtraData.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; HangoutsMediaStatusExtraData.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; HangoutsMediaStatusExtraData.encodedSize = codec.kStructHeaderSize + 8; HangoutsMediaStatusExtraData.decode = function(decoder) { var packed; var val = new HangoutsMediaStatusExtraData(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); packed = decoder.readUint8(); val.localPresent = (packed >> 0) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; HangoutsMediaStatusExtraData.encode = function(encoder, val) { var packed; encoder.writeUint32(HangoutsMediaStatusExtraData.encodedSize); encoder.writeUint32(0); packed = 0; packed |= (val.localPresent & 1) << 0 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MediaStatusObserver_OnMediaStatusUpdated_Params(values) { this.initDefaults_(); this.initFields_(values); } MediaStatusObserver_OnMediaStatusUpdated_Params.prototype.initDefaults_ = function() { this.status = null; }; MediaStatusObserver_OnMediaStatusUpdated_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MediaStatusObserver_OnMediaStatusUpdated_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MediaStatusObserver_OnMediaStatusUpdated_Params.status err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, MediaStatus, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MediaStatusObserver_OnMediaStatusUpdated_Params.encodedSize = codec.kStructHeaderSize + 8; MediaStatusObserver_OnMediaStatusUpdated_Params.decode = function(decoder) { var packed; var val = new MediaStatusObserver_OnMediaStatusUpdated_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.status = decoder.decodeStructPointer(MediaStatus); return val; }; MediaStatusObserver_OnMediaStatusUpdated_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MediaStatusObserver_OnMediaStatusUpdated_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(MediaStatus, val.status); }; var kMediaStatusObserver_OnMediaStatusUpdated_Name = 1251989421; function MediaStatusObserverPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(MediaStatusObserver, handleOrPtrInfo); } function MediaStatusObserverAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( MediaStatusObserver, associatedInterfacePtrInfo); } MediaStatusObserverAssociatedPtr.prototype = Object.create(MediaStatusObserverPtr.prototype); MediaStatusObserverAssociatedPtr.prototype.constructor = MediaStatusObserverAssociatedPtr; function MediaStatusObserverProxy(receiver) { this.receiver_ = receiver; } MediaStatusObserverPtr.prototype.onMediaStatusUpdated = function() { return MediaStatusObserverProxy.prototype.onMediaStatusUpdated .apply(this.ptr.getProxy(), arguments); }; MediaStatusObserverProxy.prototype.onMediaStatusUpdated = function(status) { var params_ = new MediaStatusObserver_OnMediaStatusUpdated_Params(); params_.status = status; var builder = new codec.MessageV0Builder( kMediaStatusObserver_OnMediaStatusUpdated_Name, codec.align(MediaStatusObserver_OnMediaStatusUpdated_Params.encodedSize)); builder.encodeStruct(MediaStatusObserver_OnMediaStatusUpdated_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function MediaStatusObserverStub(delegate) { this.delegate_ = delegate; } MediaStatusObserverStub.prototype.onMediaStatusUpdated = function(status) { return this.delegate_ && this.delegate_.onMediaStatusUpdated && this.delegate_.onMediaStatusUpdated(status); } MediaStatusObserverStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMediaStatusObserver_OnMediaStatusUpdated_Name: var params = reader.decodeStruct(MediaStatusObserver_OnMediaStatusUpdated_Params); this.onMediaStatusUpdated(params.status); return true; default: return false; } }; MediaStatusObserverStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { default: return false; } }; function validateMediaStatusObserverRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMediaStatusObserver_OnMediaStatusUpdated_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MediaStatusObserver_OnMediaStatusUpdated_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateMediaStatusObserverResponse(messageValidator) { return validator.validationError.NONE; } var MediaStatusObserver = { name: 'media_router.mojom.MediaStatusObserver', kVersion: 0, ptrClass: MediaStatusObserverPtr, proxyClass: MediaStatusObserverProxy, stubClass: MediaStatusObserverStub, validateRequest: validateMediaStatusObserverRequest, validateResponse: null, }; MediaStatusObserverStub.prototype.validator = validateMediaStatusObserverRequest; MediaStatusObserverProxy.prototype.validator = null; exports.MediaStatus = MediaStatus; exports.HangoutsMediaStatusExtraData = HangoutsMediaStatusExtraData; exports.MediaStatusObserver = MediaStatusObserver; exports.MediaStatusObserverPtr = MediaStatusObserverPtr; exports.MediaStatusObserverAssociatedPtr = MediaStatusObserverAssociatedPtr; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'components/mirroring/mojom/mirroring_service_host.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mirroring.mojom'); var cast_message_channel$ = mojo.internal.exposeNamespace('mirroring.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'components/mirroring/mojom/cast_message_channel.mojom', 'cast_message_channel.mojom.js'); } var session_observer$ = mojo.internal.exposeNamespace('mirroring.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'components/mirroring/mojom/session_observer.mojom', 'session_observer.mojom.js'); } var session_parameters$ = mojo.internal.exposeNamespace('mirroring.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'components/mirroring/mojom/session_parameters.mojom', 'session_parameters.mojom.js'); } function MirroringServiceHost_Start_Params(values) { this.initDefaults_(); this.initFields_(values); } MirroringServiceHost_Start_Params.prototype.initDefaults_ = function() { this.params = null; this.observer = new session_observer$.SessionObserverPtr(); this.outboundChannel = new cast_message_channel$.CastMessageChannelPtr(); this.inboundChannel = new bindings.InterfaceRequest(); }; MirroringServiceHost_Start_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirroringServiceHost_Start_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MirroringServiceHost_Start_Params.params err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, session_parameters$.SessionParameters, false); if (err !== validator.validationError.NONE) return err; // validate MirroringServiceHost_Start_Params.observer err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 8, false); if (err !== validator.validationError.NONE) return err; // validate MirroringServiceHost_Start_Params.outboundChannel err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 16, false); if (err !== validator.validationError.NONE) return err; // validate MirroringServiceHost_Start_Params.inboundChannel err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 24, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirroringServiceHost_Start_Params.encodedSize = codec.kStructHeaderSize + 32; MirroringServiceHost_Start_Params.decode = function(decoder) { var packed; var val = new MirroringServiceHost_Start_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.params = decoder.decodeStructPointer(session_parameters$.SessionParameters); val.observer = decoder.decodeStruct(new codec.Interface(session_observer$.SessionObserverPtr)); val.outboundChannel = decoder.decodeStruct(new codec.Interface(cast_message_channel$.CastMessageChannelPtr)); val.inboundChannel = decoder.decodeStruct(codec.InterfaceRequest); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MirroringServiceHost_Start_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirroringServiceHost_Start_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(session_parameters$.SessionParameters, val.params); encoder.encodeStruct(new codec.Interface(session_observer$.SessionObserverPtr), val.observer); encoder.encodeStruct(new codec.Interface(cast_message_channel$.CastMessageChannelPtr), val.outboundChannel); encoder.encodeStruct(codec.InterfaceRequest, val.inboundChannel); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; var kMirroringServiceHost_Start_Name = 534521278; function MirroringServiceHostPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(MirroringServiceHost, handleOrPtrInfo); } function MirroringServiceHostAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( MirroringServiceHost, associatedInterfacePtrInfo); } MirroringServiceHostAssociatedPtr.prototype = Object.create(MirroringServiceHostPtr.prototype); MirroringServiceHostAssociatedPtr.prototype.constructor = MirroringServiceHostAssociatedPtr; function MirroringServiceHostProxy(receiver) { this.receiver_ = receiver; } MirroringServiceHostPtr.prototype.start = function() { return MirroringServiceHostProxy.prototype.start .apply(this.ptr.getProxy(), arguments); }; MirroringServiceHostProxy.prototype.start = function(params, observer, outboundChannel, inboundChannel) { var params_ = new MirroringServiceHost_Start_Params(); params_.params = params; params_.observer = observer; params_.outboundChannel = outboundChannel; params_.inboundChannel = inboundChannel; var builder = new codec.MessageV0Builder( kMirroringServiceHost_Start_Name, codec.align(MirroringServiceHost_Start_Params.encodedSize)); builder.encodeStruct(MirroringServiceHost_Start_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function MirroringServiceHostStub(delegate) { this.delegate_ = delegate; } MirroringServiceHostStub.prototype.start = function(params, observer, outboundChannel, inboundChannel) { return this.delegate_ && this.delegate_.start && this.delegate_.start(params, observer, outboundChannel, inboundChannel); } MirroringServiceHostStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMirroringServiceHost_Start_Name: var params = reader.decodeStruct(MirroringServiceHost_Start_Params); this.start(params.params, params.observer, params.outboundChannel, params.inboundChannel); return true; default: return false; } }; MirroringServiceHostStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { default: return false; } }; function validateMirroringServiceHostRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMirroringServiceHost_Start_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirroringServiceHost_Start_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateMirroringServiceHostResponse(messageValidator) { return validator.validationError.NONE; } var MirroringServiceHost = { name: 'mirroring.mojom.MirroringServiceHost', kVersion: 0, ptrClass: MirroringServiceHostPtr, proxyClass: MirroringServiceHostProxy, stubClass: MirroringServiceHostStub, validateRequest: validateMirroringServiceHostRequest, validateResponse: null, }; MirroringServiceHostStub.prototype.validator = validateMirroringServiceHostRequest; MirroringServiceHostProxy.prototype.validator = null; exports.MirroringServiceHost = MirroringServiceHost; exports.MirroringServiceHostPtr = MirroringServiceHostPtr; exports.MirroringServiceHostAssociatedPtr = MirroringServiceHostAssociatedPtr; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'components/mirroring/mojom/cast_message_channel.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mirroring.mojom'); var kRemotingNamespace = "urn:x-cast:com.google.cast.remoting"; var kWebRtcNamespace = "urn:x-cast:com.google.cast.webrtc"; function CastMessage(values) { this.initDefaults_(); this.initFields_(values); } CastMessage.prototype.initDefaults_ = function() { this.messageNamespace = null; this.jsonFormatData = null; }; CastMessage.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; CastMessage.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate CastMessage.messageNamespace err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate CastMessage.jsonFormatData err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; CastMessage.encodedSize = codec.kStructHeaderSize + 16; CastMessage.decode = function(decoder) { var packed; var val = new CastMessage(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.messageNamespace = decoder.decodeStruct(codec.String); val.jsonFormatData = decoder.decodeStruct(codec.String); return val; }; CastMessage.encode = function(encoder, val) { var packed; encoder.writeUint32(CastMessage.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.messageNamespace); encoder.encodeStruct(codec.String, val.jsonFormatData); }; function CastMessageChannel_Send_Params(values) { this.initDefaults_(); this.initFields_(values); } CastMessageChannel_Send_Params.prototype.initDefaults_ = function() { this.message = null; }; CastMessageChannel_Send_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; CastMessageChannel_Send_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate CastMessageChannel_Send_Params.message err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, CastMessage, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; CastMessageChannel_Send_Params.encodedSize = codec.kStructHeaderSize + 8; CastMessageChannel_Send_Params.decode = function(decoder) { var packed; var val = new CastMessageChannel_Send_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.message = decoder.decodeStructPointer(CastMessage); return val; }; CastMessageChannel_Send_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(CastMessageChannel_Send_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(CastMessage, val.message); }; var kCastMessageChannel_Send_Name = 774299308; function CastMessageChannelPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(CastMessageChannel, handleOrPtrInfo); } function CastMessageChannelAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( CastMessageChannel, associatedInterfacePtrInfo); } CastMessageChannelAssociatedPtr.prototype = Object.create(CastMessageChannelPtr.prototype); CastMessageChannelAssociatedPtr.prototype.constructor = CastMessageChannelAssociatedPtr; function CastMessageChannelProxy(receiver) { this.receiver_ = receiver; } CastMessageChannelPtr.prototype.send = function() { return CastMessageChannelProxy.prototype.send .apply(this.ptr.getProxy(), arguments); }; CastMessageChannelProxy.prototype.send = function(message) { var params_ = new CastMessageChannel_Send_Params(); params_.message = message; var builder = new codec.MessageV0Builder( kCastMessageChannel_Send_Name, codec.align(CastMessageChannel_Send_Params.encodedSize)); builder.encodeStruct(CastMessageChannel_Send_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function CastMessageChannelStub(delegate) { this.delegate_ = delegate; } CastMessageChannelStub.prototype.send = function(message) { return this.delegate_ && this.delegate_.send && this.delegate_.send(message); } CastMessageChannelStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kCastMessageChannel_Send_Name: var params = reader.decodeStruct(CastMessageChannel_Send_Params); this.send(params.message); return true; default: return false; } }; CastMessageChannelStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { default: return false; } }; function validateCastMessageChannelRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kCastMessageChannel_Send_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = CastMessageChannel_Send_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateCastMessageChannelResponse(messageValidator) { return validator.validationError.NONE; } var CastMessageChannel = { name: 'mirroring.mojom.CastMessageChannel', kVersion: 0, ptrClass: CastMessageChannelPtr, proxyClass: CastMessageChannelProxy, stubClass: CastMessageChannelStub, validateRequest: validateCastMessageChannelRequest, validateResponse: null, }; CastMessageChannelStub.prototype.validator = validateCastMessageChannelRequest; CastMessageChannelProxy.prototype.validator = null; exports.kRemotingNamespace = kRemotingNamespace; exports.kWebRtcNamespace = kWebRtcNamespace; exports.CastMessage = CastMessage; exports.CastMessageChannel = CastMessageChannel; exports.CastMessageChannelPtr = CastMessageChannelPtr; exports.CastMessageChannelAssociatedPtr = CastMessageChannelAssociatedPtr; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'components/mirroring/mojom/session_observer.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mirroring.mojom'); var SessionError = {}; SessionError.ANSWER_TIME_OUT = 0; SessionError.ANSWER_NOT_OK = SessionError.ANSWER_TIME_OUT + 1; SessionError.ANSWER_MISMATCHED_CAST_MODE = SessionError.ANSWER_NOT_OK + 1; SessionError.ANSWER_MISMATCHED_SSRC_LENGTH = SessionError.ANSWER_MISMATCHED_CAST_MODE + 1; SessionError.ANSWER_SELECT_MULTIPLE_AUDIO = SessionError.ANSWER_MISMATCHED_SSRC_LENGTH + 1; SessionError.ANSWER_SELECT_MULTIPLE_VIDEO = SessionError.ANSWER_SELECT_MULTIPLE_AUDIO + 1; SessionError.ANSWER_SELECT_INVALID_INDEX = SessionError.ANSWER_SELECT_MULTIPLE_VIDEO + 1; SessionError.ANSWER_NO_AUDIO_OR_VIDEO = SessionError.ANSWER_SELECT_INVALID_INDEX + 1; SessionError.AUDIO_CAPTURE_ERROR = SessionError.ANSWER_NO_AUDIO_OR_VIDEO + 1; SessionError.VIDEO_CAPTURE_ERROR = SessionError.AUDIO_CAPTURE_ERROR + 1; SessionError.RTP_STREAM_ERROR = SessionError.VIDEO_CAPTURE_ERROR + 1; SessionError.ENCODING_ERROR = SessionError.RTP_STREAM_ERROR + 1; SessionError.CAST_TRANSPORT_ERROR = SessionError.ENCODING_ERROR + 1; SessionError.MIN_VALUE = 0, SessionError.MAX_VALUE = 12, SessionError.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: return true; } return false; }; SessionError.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; function SessionObserver_OnError_Params(values) { this.initDefaults_(); this.initFields_(values); } SessionObserver_OnError_Params.prototype.initDefaults_ = function() { this.error = 0; }; SessionObserver_OnError_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; SessionObserver_OnError_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate SessionObserver_OnError_Params.error err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, SessionError); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; SessionObserver_OnError_Params.encodedSize = codec.kStructHeaderSize + 8; SessionObserver_OnError_Params.decode = function(decoder) { var packed; var val = new SessionObserver_OnError_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.error = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; SessionObserver_OnError_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(SessionObserver_OnError_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.error); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function SessionObserver_DidStart_Params(values) { this.initDefaults_(); this.initFields_(values); } SessionObserver_DidStart_Params.prototype.initDefaults_ = function() { }; SessionObserver_DidStart_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; SessionObserver_DidStart_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; SessionObserver_DidStart_Params.encodedSize = codec.kStructHeaderSize + 0; SessionObserver_DidStart_Params.decode = function(decoder) { var packed; var val = new SessionObserver_DidStart_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; SessionObserver_DidStart_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(SessionObserver_DidStart_Params.encodedSize); encoder.writeUint32(0); }; function SessionObserver_DidStop_Params(values) { this.initDefaults_(); this.initFields_(values); } SessionObserver_DidStop_Params.prototype.initDefaults_ = function() { }; SessionObserver_DidStop_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; SessionObserver_DidStop_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; SessionObserver_DidStop_Params.encodedSize = codec.kStructHeaderSize + 0; SessionObserver_DidStop_Params.decode = function(decoder) { var packed; var val = new SessionObserver_DidStop_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; SessionObserver_DidStop_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(SessionObserver_DidStop_Params.encodedSize); encoder.writeUint32(0); }; var kSessionObserver_OnError_Name = 1763532480; var kSessionObserver_DidStart_Name = 2054941130; var kSessionObserver_DidStop_Name = 699678780; function SessionObserverPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(SessionObserver, handleOrPtrInfo); } function SessionObserverAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( SessionObserver, associatedInterfacePtrInfo); } SessionObserverAssociatedPtr.prototype = Object.create(SessionObserverPtr.prototype); SessionObserverAssociatedPtr.prototype.constructor = SessionObserverAssociatedPtr; function SessionObserverProxy(receiver) { this.receiver_ = receiver; } SessionObserverPtr.prototype.onError = function() { return SessionObserverProxy.prototype.onError .apply(this.ptr.getProxy(), arguments); }; SessionObserverProxy.prototype.onError = function(error) { var params_ = new SessionObserver_OnError_Params(); params_.error = error; var builder = new codec.MessageV0Builder( kSessionObserver_OnError_Name, codec.align(SessionObserver_OnError_Params.encodedSize)); builder.encodeStruct(SessionObserver_OnError_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; SessionObserverPtr.prototype.didStart = function() { return SessionObserverProxy.prototype.didStart .apply(this.ptr.getProxy(), arguments); }; SessionObserverProxy.prototype.didStart = function() { var params_ = new SessionObserver_DidStart_Params(); var builder = new codec.MessageV0Builder( kSessionObserver_DidStart_Name, codec.align(SessionObserver_DidStart_Params.encodedSize)); builder.encodeStruct(SessionObserver_DidStart_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; SessionObserverPtr.prototype.didStop = function() { return SessionObserverProxy.prototype.didStop .apply(this.ptr.getProxy(), arguments); }; SessionObserverProxy.prototype.didStop = function() { var params_ = new SessionObserver_DidStop_Params(); var builder = new codec.MessageV0Builder( kSessionObserver_DidStop_Name, codec.align(SessionObserver_DidStop_Params.encodedSize)); builder.encodeStruct(SessionObserver_DidStop_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function SessionObserverStub(delegate) { this.delegate_ = delegate; } SessionObserverStub.prototype.onError = function(error) { return this.delegate_ && this.delegate_.onError && this.delegate_.onError(error); } SessionObserverStub.prototype.didStart = function() { return this.delegate_ && this.delegate_.didStart && this.delegate_.didStart(); } SessionObserverStub.prototype.didStop = function() { return this.delegate_ && this.delegate_.didStop && this.delegate_.didStop(); } SessionObserverStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kSessionObserver_OnError_Name: var params = reader.decodeStruct(SessionObserver_OnError_Params); this.onError(params.error); return true; case kSessionObserver_DidStart_Name: var params = reader.decodeStruct(SessionObserver_DidStart_Params); this.didStart(); return true; case kSessionObserver_DidStop_Name: var params = reader.decodeStruct(SessionObserver_DidStop_Params); this.didStop(); return true; default: return false; } }; SessionObserverStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { default: return false; } }; function validateSessionObserverRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kSessionObserver_OnError_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = SessionObserver_OnError_Params; break; case kSessionObserver_DidStart_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = SessionObserver_DidStart_Params; break; case kSessionObserver_DidStop_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = SessionObserver_DidStop_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateSessionObserverResponse(messageValidator) { return validator.validationError.NONE; } var SessionObserver = { name: 'mirroring.mojom.SessionObserver', kVersion: 0, ptrClass: SessionObserverPtr, proxyClass: SessionObserverProxy, stubClass: SessionObserverStub, validateRequest: validateSessionObserverRequest, validateResponse: null, }; SessionObserverStub.prototype.validator = validateSessionObserverRequest; SessionObserverProxy.prototype.validator = null; exports.SessionError = SessionError; exports.SessionObserver = SessionObserver; exports.SessionObserverPtr = SessionObserverPtr; exports.SessionObserverAssociatedPtr = SessionObserverAssociatedPtr; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'components/mirroring/mojom/session_parameters.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mirroring.mojom'); var ip_address$ = mojo.internal.exposeNamespace('network.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'services/network/public/mojom/ip_address.mojom', '../../../services/network/public/mojom/ip_address.mojom.js'); } var SessionType = {}; SessionType.AUDIO_ONLY = 0; SessionType.VIDEO_ONLY = SessionType.AUDIO_ONLY + 1; SessionType.AUDIO_AND_VIDEO = SessionType.VIDEO_ONLY + 1; SessionType.MIN_VALUE = 0, SessionType.MAX_VALUE = 2, SessionType.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: return true; } return false; }; SessionType.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; function SessionParameters(values) { this.initDefaults_(); this.initFields_(values); } SessionParameters.prototype.initDefaults_ = function() { this.type = 0; this.receiverAddress = null; this.receiverModelName = null; }; SessionParameters.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; SessionParameters.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 32} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate SessionParameters.type err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, SessionType); if (err !== validator.validationError.NONE) return err; // validate SessionParameters.receiverAddress err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, ip_address$.IPAddress, false); if (err !== validator.validationError.NONE) return err; // validate SessionParameters.receiverModelName err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; SessionParameters.encodedSize = codec.kStructHeaderSize + 24; SessionParameters.decode = function(decoder) { var packed; var val = new SessionParameters(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.type = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.receiverAddress = decoder.decodeStructPointer(ip_address$.IPAddress); val.receiverModelName = decoder.decodeStruct(codec.String); return val; }; SessionParameters.encode = function(encoder, val) { var packed; encoder.writeUint32(SessionParameters.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.type); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStructPointer(ip_address$.IPAddress, val.receiverAddress); encoder.encodeStruct(codec.String, val.receiverModelName); }; exports.SessionType = SessionType; exports.SessionParameters = SessionParameters; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'mojo/public/mojom/base/time.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mojoBase.mojom'); function Time(values) { this.initDefaults_(); this.initFields_(values); } Time.prototype.initDefaults_ = function() { this.internalValue = 0; }; Time.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; Time.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; Time.encodedSize = codec.kStructHeaderSize + 8; Time.decode = function(decoder) { var packed; var val = new Time(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.internalValue = decoder.decodeStruct(codec.Int64); return val; }; Time.encode = function(encoder, val) { var packed; encoder.writeUint32(Time.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int64, val.internalValue); }; function TimeDelta(values) { this.initDefaults_(); this.initFields_(values); } TimeDelta.prototype.initDefaults_ = function() { this.microseconds = 0; }; TimeDelta.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; TimeDelta.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; TimeDelta.encodedSize = codec.kStructHeaderSize + 8; TimeDelta.decode = function(decoder) { var packed; var val = new TimeDelta(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.microseconds = decoder.decodeStruct(codec.Int64); return val; }; TimeDelta.encode = function(encoder, val) { var packed; encoder.writeUint32(TimeDelta.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int64, val.microseconds); }; function TimeTicks(values) { this.initDefaults_(); this.initFields_(values); } TimeTicks.prototype.initDefaults_ = function() { this.internalValue = 0; }; TimeTicks.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; TimeTicks.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; TimeTicks.encodedSize = codec.kStructHeaderSize + 8; TimeTicks.decode = function(decoder) { var packed; var val = new TimeTicks(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.internalValue = decoder.decodeStruct(codec.Int64); return val; }; TimeTicks.encode = function(encoder, val) { var packed; encoder.writeUint32(TimeTicks.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int64, val.internalValue); }; exports.Time = Time; exports.TimeDelta = TimeDelta; exports.TimeTicks = TimeTicks; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'mojo/public/mojom/base/unguessable_token.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('mojoBase.mojom'); function UnguessableToken(values) { this.initDefaults_(); this.initFields_(values); } UnguessableToken.prototype.initDefaults_ = function() { this.high = 0; this.low = 0; }; UnguessableToken.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; UnguessableToken.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; UnguessableToken.encodedSize = codec.kStructHeaderSize + 16; UnguessableToken.decode = function(decoder) { var packed; var val = new UnguessableToken(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.high = decoder.decodeStruct(codec.Uint64); val.low = decoder.decodeStruct(codec.Uint64); return val; }; UnguessableToken.encode = function(encoder, val) { var packed; encoder.writeUint32(UnguessableToken.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Uint64, val.high); encoder.encodeStruct(codec.Uint64, val.low); }; exports.UnguessableToken = UnguessableToken; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'services/network/public/mojom/ip_address.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('network.mojom'); function IPAddress(values) { this.initDefaults_(); this.initFields_(values); } IPAddress.prototype.initDefaults_ = function() { this.addressBytes = null; }; IPAddress.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; IPAddress.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate IPAddress.addressBytes err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; IPAddress.encodedSize = codec.kStructHeaderSize + 8; IPAddress.decode = function(decoder) { var packed; var val = new IPAddress(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.addressBytes = decoder.decodeArrayPointer(codec.Uint8); return val; }; IPAddress.encode = function(encoder, val) { var packed; encoder.writeUint32(IPAddress.encodedSize); encoder.writeUint32(0); encoder.encodeArrayPointer(codec.Uint8, val.addressBytes); }; exports.IPAddress = IPAddress; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'services/network/public/mojom/ip_endpoint.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('network.mojom'); var ip_address$ = mojo.internal.exposeNamespace('network.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'services/network/public/mojom/ip_address.mojom', 'ip_address.mojom.js'); } function IPEndPoint(values) { this.initDefaults_(); this.initFields_(values); } IPEndPoint.prototype.initDefaults_ = function() { this.address = null; this.port = 0; }; IPEndPoint.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; IPEndPoint.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 24} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate IPEndPoint.address err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, ip_address$.IPAddress, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; IPEndPoint.encodedSize = codec.kStructHeaderSize + 16; IPEndPoint.decode = function(decoder) { var packed; var val = new IPEndPoint(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.address = decoder.decodeStructPointer(ip_address$.IPAddress); val.port = decoder.decodeStruct(codec.Uint16); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; IPEndPoint.encode = function(encoder, val) { var packed; encoder.writeUint32(IPEndPoint.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(ip_address$.IPAddress, val.address); encoder.encodeStruct(codec.Uint16, val.port); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; exports.IPEndPoint = IPEndPoint; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'url/mojom/origin.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('url.mojom'); var unguessable_token$ = mojo.internal.exposeNamespace('mojoBase.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'mojo/public/mojom/base/unguessable_token.mojom', '../../mojo/public/mojom/base/unguessable_token.mojom.js'); } function Origin(values) { this.initDefaults_(); this.initFields_(values); } Origin.prototype.initDefaults_ = function() { this.scheme = null; this.host = null; this.port = 0; this.nonceIfOpaque = null; }; Origin.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; Origin.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate Origin.scheme err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; // validate Origin.host err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) return err; // validate Origin.nonceIfOpaque err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 24, unguessable_token$.UnguessableToken, true); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; Origin.encodedSize = codec.kStructHeaderSize + 32; Origin.decode = function(decoder) { var packed; var val = new Origin(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.scheme = decoder.decodeStruct(codec.String); val.host = decoder.decodeStruct(codec.String); val.port = decoder.decodeStruct(codec.Uint16); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); val.nonceIfOpaque = decoder.decodeStructPointer(unguessable_token$.UnguessableToken); return val; }; Origin.encode = function(encoder, val) { var packed; encoder.writeUint32(Origin.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.scheme); encoder.encodeStruct(codec.String, val.host); encoder.encodeStruct(codec.Uint16, val.port); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.encodeStructPointer(unguessable_token$.UnguessableToken, val.nonceIfOpaque); }; exports.Origin = Origin; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'url/mojom/url.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('url.mojom'); function Url(values) { this.initDefaults_(); this.initFields_(values); } Url.prototype.initDefaults_ = function() { this.url = null; }; Url.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; Url.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate Url.url err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; Url.encodedSize = codec.kStructHeaderSize + 8; Url.decode = function(decoder) { var packed; var val = new Url(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.url = decoder.decodeStruct(codec.String); return val; }; Url.encode = function(encoder, val) { var packed; encoder.writeUint32(Url.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.String, val.url); }; exports.Url = Url; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'media/mojo/interfaces/mirror_service_remoting.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('media.mojom'); var remoting_common$ = mojo.internal.exposeNamespace('media.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( 'media/mojo/interfaces/remoting_common.mojom', 'remoting_common.mojom.js'); } function MirrorServiceRemoter_Start_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemoter_Start_Params.prototype.initDefaults_ = function() { }; MirrorServiceRemoter_Start_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemoter_Start_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemoter_Start_Params.encodedSize = codec.kStructHeaderSize + 0; MirrorServiceRemoter_Start_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemoter_Start_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; MirrorServiceRemoter_Start_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemoter_Start_Params.encodedSize); encoder.writeUint32(0); }; function MirrorServiceRemoter_StartDataStreams_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemoter_StartDataStreams_Params.prototype.initDefaults_ = function() { this.hasAudio = false; this.hasVideo = false; }; MirrorServiceRemoter_StartDataStreams_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemoter_StartDataStreams_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemoter_StartDataStreams_Params.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemoter_StartDataStreams_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemoter_StartDataStreams_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); packed = decoder.readUint8(); val.hasAudio = (packed >> 0) & 1 ? true : false; val.hasVideo = (packed >> 1) & 1 ? true : false; decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MirrorServiceRemoter_StartDataStreams_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemoter_StartDataStreams_Params.encodedSize); encoder.writeUint32(0); packed = 0; packed |= (val.hasAudio & 1) << 0 packed |= (val.hasVideo & 1) << 1 encoder.writeUint8(packed); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MirrorServiceRemoter_StartDataStreams_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemoter_StartDataStreams_ResponseParams.prototype.initDefaults_ = function() { this.audioStreamId = 0; this.videoStreamId = 0; }; MirrorServiceRemoter_StartDataStreams_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemoter_StartDataStreams_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemoter_StartDataStreams_ResponseParams.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemoter_StartDataStreams_ResponseParams.decode = function(decoder) { var packed; var val = new MirrorServiceRemoter_StartDataStreams_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.audioStreamId = decoder.decodeStruct(codec.Int32); val.videoStreamId = decoder.decodeStruct(codec.Int32); return val; }; MirrorServiceRemoter_StartDataStreams_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemoter_StartDataStreams_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.audioStreamId); encoder.encodeStruct(codec.Int32, val.videoStreamId); }; function MirrorServiceRemoter_Stop_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemoter_Stop_Params.prototype.initDefaults_ = function() { this.reason = 0; }; MirrorServiceRemoter_Stop_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemoter_Stop_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MirrorServiceRemoter_Stop_Params.reason err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, remoting_common$.RemotingStopReason); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemoter_Stop_Params.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemoter_Stop_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemoter_Stop_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.reason = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MirrorServiceRemoter_Stop_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemoter_Stop_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.reason); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MirrorServiceRemoter_SendMessageToSink_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemoter_SendMessageToSink_Params.prototype.initDefaults_ = function() { this.message = null; }; MirrorServiceRemoter_SendMessageToSink_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemoter_SendMessageToSink_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MirrorServiceRemoter_SendMessageToSink_Params.message err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemoter_SendMessageToSink_Params.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemoter_SendMessageToSink_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemoter_SendMessageToSink_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.message = decoder.decodeArrayPointer(codec.Uint8); return val; }; MirrorServiceRemoter_SendMessageToSink_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemoter_SendMessageToSink_Params.encodedSize); encoder.writeUint32(0); encoder.encodeArrayPointer(codec.Uint8, val.message); }; function MirrorServiceRemoter_EstimateTransmissionCapacity_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemoter_EstimateTransmissionCapacity_Params.prototype.initDefaults_ = function() { }; MirrorServiceRemoter_EstimateTransmissionCapacity_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemoter_EstimateTransmissionCapacity_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemoter_EstimateTransmissionCapacity_Params.encodedSize = codec.kStructHeaderSize + 0; MirrorServiceRemoter_EstimateTransmissionCapacity_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemoter_EstimateTransmissionCapacity_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; MirrorServiceRemoter_EstimateTransmissionCapacity_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemoter_EstimateTransmissionCapacity_Params.encodedSize); encoder.writeUint32(0); }; function MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.prototype.initDefaults_ = function() { this.rate = 0; }; MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.decode = function(decoder) { var packed; var val = new MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.rate = decoder.decodeStruct(codec.Double); return val; }; MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Double, val.rate); }; function MirrorServiceRemotingSource_OnSinkAvailable_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemotingSource_OnSinkAvailable_Params.prototype.initDefaults_ = function() { this.metadata = null; }; MirrorServiceRemotingSource_OnSinkAvailable_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemotingSource_OnSinkAvailable_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MirrorServiceRemotingSource_OnSinkAvailable_Params.metadata err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, remoting_common$.RemotingSinkMetadata, false); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemotingSource_OnSinkAvailable_Params.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemotingSource_OnSinkAvailable_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemotingSource_OnSinkAvailable_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.metadata = decoder.decodeStructPointer(remoting_common$.RemotingSinkMetadata); return val; }; MirrorServiceRemotingSource_OnSinkAvailable_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemotingSource_OnSinkAvailable_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStructPointer(remoting_common$.RemotingSinkMetadata, val.metadata); }; function MirrorServiceRemotingSource_OnMessageFromSink_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemotingSource_OnMessageFromSink_Params.prototype.initDefaults_ = function() { this.message = null; }; MirrorServiceRemotingSource_OnMessageFromSink_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemotingSource_OnMessageFromSink_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MirrorServiceRemotingSource_OnMessageFromSink_Params.message err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemotingSource_OnMessageFromSink_Params.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemotingSource_OnMessageFromSink_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemotingSource_OnMessageFromSink_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.message = decoder.decodeArrayPointer(codec.Uint8); return val; }; MirrorServiceRemotingSource_OnMessageFromSink_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemotingSource_OnMessageFromSink_Params.encodedSize); encoder.writeUint32(0); encoder.encodeArrayPointer(codec.Uint8, val.message); }; function MirrorServiceRemotingSource_OnStopped_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemotingSource_OnStopped_Params.prototype.initDefaults_ = function() { this.reason = 0; }; MirrorServiceRemotingSource_OnStopped_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemotingSource_OnStopped_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 16} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate MirrorServiceRemotingSource_OnStopped_Params.reason err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, remoting_common$.RemotingStopReason); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemotingSource_OnStopped_Params.encodedSize = codec.kStructHeaderSize + 8; MirrorServiceRemotingSource_OnStopped_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemotingSource_OnStopped_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.reason = decoder.decodeStruct(codec.Int32); decoder.skip(1); decoder.skip(1); decoder.skip(1); decoder.skip(1); return val; }; MirrorServiceRemotingSource_OnStopped_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemotingSource_OnStopped_Params.encodedSize); encoder.writeUint32(0); encoder.encodeStruct(codec.Int32, val.reason); encoder.skip(1); encoder.skip(1); encoder.skip(1); encoder.skip(1); }; function MirrorServiceRemotingSource_OnError_Params(values) { this.initDefaults_(); this.initFields_(values); } MirrorServiceRemotingSource_OnError_Params.prototype.initDefaults_ = function() { }; MirrorServiceRemotingSource_OnError_Params.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; MirrorServiceRemotingSource_OnError_Params.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 8} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; MirrorServiceRemotingSource_OnError_Params.encodedSize = codec.kStructHeaderSize + 0; MirrorServiceRemotingSource_OnError_Params.decode = function(decoder) { var packed; var val = new MirrorServiceRemotingSource_OnError_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); return val; }; MirrorServiceRemotingSource_OnError_Params.encode = function(encoder, val) { var packed; encoder.writeUint32(MirrorServiceRemotingSource_OnError_Params.encodedSize); encoder.writeUint32(0); }; var kMirrorServiceRemoter_Start_Name = 864384739; var kMirrorServiceRemoter_StartDataStreams_Name = 1555654096; var kMirrorServiceRemoter_Stop_Name = 622551634; var kMirrorServiceRemoter_SendMessageToSink_Name = 1961057848; var kMirrorServiceRemoter_EstimateTransmissionCapacity_Name = 1419162000; function MirrorServiceRemoterPtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(MirrorServiceRemoter, handleOrPtrInfo); } function MirrorServiceRemoterAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( MirrorServiceRemoter, associatedInterfacePtrInfo); } MirrorServiceRemoterAssociatedPtr.prototype = Object.create(MirrorServiceRemoterPtr.prototype); MirrorServiceRemoterAssociatedPtr.prototype.constructor = MirrorServiceRemoterAssociatedPtr; function MirrorServiceRemoterProxy(receiver) { this.receiver_ = receiver; } MirrorServiceRemoterPtr.prototype.start = function() { return MirrorServiceRemoterProxy.prototype.start .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemoterProxy.prototype.start = function() { var params_ = new MirrorServiceRemoter_Start_Params(); var builder = new codec.MessageV0Builder( kMirrorServiceRemoter_Start_Name, codec.align(MirrorServiceRemoter_Start_Params.encodedSize)); builder.encodeStruct(MirrorServiceRemoter_Start_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MirrorServiceRemoterPtr.prototype.startDataStreams = function() { return MirrorServiceRemoterProxy.prototype.startDataStreams .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemoterProxy.prototype.startDataStreams = function(hasAudio, hasVideo) { var params_ = new MirrorServiceRemoter_StartDataStreams_Params(); params_.hasAudio = hasAudio; params_.hasVideo = hasVideo; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMirrorServiceRemoter_StartDataStreams_Name, codec.align(MirrorServiceRemoter_StartDataStreams_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MirrorServiceRemoter_StartDataStreams_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MirrorServiceRemoter_StartDataStreams_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; MirrorServiceRemoterPtr.prototype.stop = function() { return MirrorServiceRemoterProxy.prototype.stop .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemoterProxy.prototype.stop = function(reason) { var params_ = new MirrorServiceRemoter_Stop_Params(); params_.reason = reason; var builder = new codec.MessageV0Builder( kMirrorServiceRemoter_Stop_Name, codec.align(MirrorServiceRemoter_Stop_Params.encodedSize)); builder.encodeStruct(MirrorServiceRemoter_Stop_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MirrorServiceRemoterPtr.prototype.sendMessageToSink = function() { return MirrorServiceRemoterProxy.prototype.sendMessageToSink .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemoterProxy.prototype.sendMessageToSink = function(message) { var params_ = new MirrorServiceRemoter_SendMessageToSink_Params(); params_.message = message; var builder = new codec.MessageV0Builder( kMirrorServiceRemoter_SendMessageToSink_Name, codec.align(MirrorServiceRemoter_SendMessageToSink_Params.encodedSize)); builder.encodeStruct(MirrorServiceRemoter_SendMessageToSink_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MirrorServiceRemoterPtr.prototype.estimateTransmissionCapacity = function() { return MirrorServiceRemoterProxy.prototype.estimateTransmissionCapacity .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemoterProxy.prototype.estimateTransmissionCapacity = function() { var params_ = new MirrorServiceRemoter_EstimateTransmissionCapacity_Params(); return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( kMirrorServiceRemoter_EstimateTransmissionCapacity_Name, codec.align(MirrorServiceRemoter_EstimateTransmissionCapacity_Params.encodedSize), codec.kMessageExpectsResponse, 0); builder.encodeStruct(MirrorServiceRemoter_EstimateTransmissionCapacity_Params, params_); var message = builder.finish(); this.receiver_.acceptAndExpectResponse(message).then(function(message) { var reader = new codec.MessageReader(message); var responseParams = reader.decodeStruct(MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams); resolve(responseParams); }).catch(function(result) { reject(Error("Connection error: " + result)); }); }.bind(this)); }; function MirrorServiceRemoterStub(delegate) { this.delegate_ = delegate; } MirrorServiceRemoterStub.prototype.start = function() { return this.delegate_ && this.delegate_.start && this.delegate_.start(); } MirrorServiceRemoterStub.prototype.startDataStreams = function(hasAudio, hasVideo) { return this.delegate_ && this.delegate_.startDataStreams && this.delegate_.startDataStreams(hasAudio, hasVideo); } MirrorServiceRemoterStub.prototype.stop = function(reason) { return this.delegate_ && this.delegate_.stop && this.delegate_.stop(reason); } MirrorServiceRemoterStub.prototype.sendMessageToSink = function(message) { return this.delegate_ && this.delegate_.sendMessageToSink && this.delegate_.sendMessageToSink(message); } MirrorServiceRemoterStub.prototype.estimateTransmissionCapacity = function() { return this.delegate_ && this.delegate_.estimateTransmissionCapacity && this.delegate_.estimateTransmissionCapacity(); } MirrorServiceRemoterStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMirrorServiceRemoter_Start_Name: var params = reader.decodeStruct(MirrorServiceRemoter_Start_Params); this.start(); return true; case kMirrorServiceRemoter_Stop_Name: var params = reader.decodeStruct(MirrorServiceRemoter_Stop_Params); this.stop(params.reason); return true; case kMirrorServiceRemoter_SendMessageToSink_Name: var params = reader.decodeStruct(MirrorServiceRemoter_SendMessageToSink_Params); this.sendMessageToSink(params.message); return true; default: return false; } }; MirrorServiceRemoterStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMirrorServiceRemoter_StartDataStreams_Name: var params = reader.decodeStruct(MirrorServiceRemoter_StartDataStreams_Params); this.startDataStreams(params.hasAudio, params.hasVideo).then(function(response) { var responseParams = new MirrorServiceRemoter_StartDataStreams_ResponseParams(); responseParams.audioStreamId = response.audioStreamId; responseParams.videoStreamId = response.videoStreamId; var builder = new codec.MessageV1Builder( kMirrorServiceRemoter_StartDataStreams_Name, codec.align(MirrorServiceRemoter_StartDataStreams_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MirrorServiceRemoter_StartDataStreams_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; case kMirrorServiceRemoter_EstimateTransmissionCapacity_Name: var params = reader.decodeStruct(MirrorServiceRemoter_EstimateTransmissionCapacity_Params); this.estimateTransmissionCapacity().then(function(response) { var responseParams = new MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams(); responseParams.rate = response.rate; var builder = new codec.MessageV1Builder( kMirrorServiceRemoter_EstimateTransmissionCapacity_Name, codec.align(MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams.encodedSize), codec.kMessageIsResponse, reader.requestID); builder.encodeStruct(MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams, responseParams); var message = builder.finish(); responder.accept(message); }); return true; default: return false; } }; function validateMirrorServiceRemoterRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMirrorServiceRemoter_Start_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirrorServiceRemoter_Start_Params; break; case kMirrorServiceRemoter_StartDataStreams_Name: if (message.expectsResponse()) paramsClass = MirrorServiceRemoter_StartDataStreams_Params; break; case kMirrorServiceRemoter_Stop_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirrorServiceRemoter_Stop_Params; break; case kMirrorServiceRemoter_SendMessageToSink_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirrorServiceRemoter_SendMessageToSink_Params; break; case kMirrorServiceRemoter_EstimateTransmissionCapacity_Name: if (message.expectsResponse()) paramsClass = MirrorServiceRemoter_EstimateTransmissionCapacity_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateMirrorServiceRemoterResponse(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMirrorServiceRemoter_StartDataStreams_Name: if (message.isResponse()) paramsClass = MirrorServiceRemoter_StartDataStreams_ResponseParams; break; case kMirrorServiceRemoter_EstimateTransmissionCapacity_Name: if (message.isResponse()) paramsClass = MirrorServiceRemoter_EstimateTransmissionCapacity_ResponseParams; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } var MirrorServiceRemoter = { name: 'media.mojom.MirrorServiceRemoter', kVersion: 0, ptrClass: MirrorServiceRemoterPtr, proxyClass: MirrorServiceRemoterProxy, stubClass: MirrorServiceRemoterStub, validateRequest: validateMirrorServiceRemoterRequest, validateResponse: validateMirrorServiceRemoterResponse, }; MirrorServiceRemoterStub.prototype.validator = validateMirrorServiceRemoterRequest; MirrorServiceRemoterProxy.prototype.validator = validateMirrorServiceRemoterResponse; var kMirrorServiceRemotingSource_OnSinkAvailable_Name = 341337265; var kMirrorServiceRemotingSource_OnMessageFromSink_Name = 1727300331; var kMirrorServiceRemotingSource_OnStopped_Name = 826958995; var kMirrorServiceRemotingSource_OnError_Name = 441783253; function MirrorServiceRemotingSourcePtr(handleOrPtrInfo) { this.ptr = new bindings.InterfacePtrController(MirrorServiceRemotingSource, handleOrPtrInfo); } function MirrorServiceRemotingSourceAssociatedPtr(associatedInterfacePtrInfo) { this.ptr = new associatedBindings.AssociatedInterfacePtrController( MirrorServiceRemotingSource, associatedInterfacePtrInfo); } MirrorServiceRemotingSourceAssociatedPtr.prototype = Object.create(MirrorServiceRemotingSourcePtr.prototype); MirrorServiceRemotingSourceAssociatedPtr.prototype.constructor = MirrorServiceRemotingSourceAssociatedPtr; function MirrorServiceRemotingSourceProxy(receiver) { this.receiver_ = receiver; } MirrorServiceRemotingSourcePtr.prototype.onSinkAvailable = function() { return MirrorServiceRemotingSourceProxy.prototype.onSinkAvailable .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemotingSourceProxy.prototype.onSinkAvailable = function(metadata) { var params_ = new MirrorServiceRemotingSource_OnSinkAvailable_Params(); params_.metadata = metadata; var builder = new codec.MessageV0Builder( kMirrorServiceRemotingSource_OnSinkAvailable_Name, codec.align(MirrorServiceRemotingSource_OnSinkAvailable_Params.encodedSize)); builder.encodeStruct(MirrorServiceRemotingSource_OnSinkAvailable_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MirrorServiceRemotingSourcePtr.prototype.onMessageFromSink = function() { return MirrorServiceRemotingSourceProxy.prototype.onMessageFromSink .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemotingSourceProxy.prototype.onMessageFromSink = function(message) { var params_ = new MirrorServiceRemotingSource_OnMessageFromSink_Params(); params_.message = message; var builder = new codec.MessageV0Builder( kMirrorServiceRemotingSource_OnMessageFromSink_Name, codec.align(MirrorServiceRemotingSource_OnMessageFromSink_Params.encodedSize)); builder.encodeStruct(MirrorServiceRemotingSource_OnMessageFromSink_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MirrorServiceRemotingSourcePtr.prototype.onStopped = function() { return MirrorServiceRemotingSourceProxy.prototype.onStopped .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemotingSourceProxy.prototype.onStopped = function(reason) { var params_ = new MirrorServiceRemotingSource_OnStopped_Params(); params_.reason = reason; var builder = new codec.MessageV0Builder( kMirrorServiceRemotingSource_OnStopped_Name, codec.align(MirrorServiceRemotingSource_OnStopped_Params.encodedSize)); builder.encodeStruct(MirrorServiceRemotingSource_OnStopped_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; MirrorServiceRemotingSourcePtr.prototype.onError = function() { return MirrorServiceRemotingSourceProxy.prototype.onError .apply(this.ptr.getProxy(), arguments); }; MirrorServiceRemotingSourceProxy.prototype.onError = function() { var params_ = new MirrorServiceRemotingSource_OnError_Params(); var builder = new codec.MessageV0Builder( kMirrorServiceRemotingSource_OnError_Name, codec.align(MirrorServiceRemotingSource_OnError_Params.encodedSize)); builder.encodeStruct(MirrorServiceRemotingSource_OnError_Params, params_); var message = builder.finish(); this.receiver_.accept(message); }; function MirrorServiceRemotingSourceStub(delegate) { this.delegate_ = delegate; } MirrorServiceRemotingSourceStub.prototype.onSinkAvailable = function(metadata) { return this.delegate_ && this.delegate_.onSinkAvailable && this.delegate_.onSinkAvailable(metadata); } MirrorServiceRemotingSourceStub.prototype.onMessageFromSink = function(message) { return this.delegate_ && this.delegate_.onMessageFromSink && this.delegate_.onMessageFromSink(message); } MirrorServiceRemotingSourceStub.prototype.onStopped = function(reason) { return this.delegate_ && this.delegate_.onStopped && this.delegate_.onStopped(reason); } MirrorServiceRemotingSourceStub.prototype.onError = function() { return this.delegate_ && this.delegate_.onError && this.delegate_.onError(); } MirrorServiceRemotingSourceStub.prototype.accept = function(message) { var reader = new codec.MessageReader(message); switch (reader.messageName) { case kMirrorServiceRemotingSource_OnSinkAvailable_Name: var params = reader.decodeStruct(MirrorServiceRemotingSource_OnSinkAvailable_Params); this.onSinkAvailable(params.metadata); return true; case kMirrorServiceRemotingSource_OnMessageFromSink_Name: var params = reader.decodeStruct(MirrorServiceRemotingSource_OnMessageFromSink_Params); this.onMessageFromSink(params.message); return true; case kMirrorServiceRemotingSource_OnStopped_Name: var params = reader.decodeStruct(MirrorServiceRemotingSource_OnStopped_Params); this.onStopped(params.reason); return true; case kMirrorServiceRemotingSource_OnError_Name: var params = reader.decodeStruct(MirrorServiceRemotingSource_OnError_Params); this.onError(); return true; default: return false; } }; MirrorServiceRemotingSourceStub.prototype.acceptWithResponder = function(message, responder) { var reader = new codec.MessageReader(message); switch (reader.messageName) { default: return false; } }; function validateMirrorServiceRemotingSourceRequest(messageValidator) { var message = messageValidator.message; var paramsClass = null; switch (message.getName()) { case kMirrorServiceRemotingSource_OnSinkAvailable_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirrorServiceRemotingSource_OnSinkAvailable_Params; break; case kMirrorServiceRemotingSource_OnMessageFromSink_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirrorServiceRemotingSource_OnMessageFromSink_Params; break; case kMirrorServiceRemotingSource_OnStopped_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirrorServiceRemotingSource_OnStopped_Params; break; case kMirrorServiceRemotingSource_OnError_Name: if (!message.expectsResponse() && !message.isResponse()) paramsClass = MirrorServiceRemotingSource_OnError_Params; break; } if (paramsClass === null) return validator.validationError.NONE; return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes()); } function validateMirrorServiceRemotingSourceResponse(messageValidator) { return validator.validationError.NONE; } var MirrorServiceRemotingSource = { name: 'media.mojom.MirrorServiceRemotingSource', kVersion: 0, ptrClass: MirrorServiceRemotingSourcePtr, proxyClass: MirrorServiceRemotingSourceProxy, stubClass: MirrorServiceRemotingSourceStub, validateRequest: validateMirrorServiceRemotingSourceRequest, validateResponse: null, }; MirrorServiceRemotingSourceStub.prototype.validator = validateMirrorServiceRemotingSourceRequest; MirrorServiceRemotingSourceProxy.prototype.validator = null; exports.MirrorServiceRemoter = MirrorServiceRemoter; exports.MirrorServiceRemoterPtr = MirrorServiceRemoterPtr; exports.MirrorServiceRemoterAssociatedPtr = MirrorServiceRemoterAssociatedPtr; exports.MirrorServiceRemotingSource = MirrorServiceRemotingSource; exports.MirrorServiceRemotingSourcePtr = MirrorServiceRemotingSourcePtr; exports.MirrorServiceRemotingSourceAssociatedPtr = MirrorServiceRemotingSourceAssociatedPtr; })();// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; (function() { var mojomId = 'media/mojo/interfaces/remoting_common.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; var validator = mojo.internal; var exports = mojo.internal.exposeNamespace('media.mojom'); var RemotingStopReason = {}; RemotingStopReason.ROUTE_TERMINATED = 0; RemotingStopReason.LOCAL_PLAYBACK = RemotingStopReason.ROUTE_TERMINATED + 1; RemotingStopReason.SOURCE_GONE = RemotingStopReason.LOCAL_PLAYBACK + 1; RemotingStopReason.MESSAGE_SEND_FAILED = RemotingStopReason.SOURCE_GONE + 1; RemotingStopReason.DATA_SEND_FAILED = RemotingStopReason.MESSAGE_SEND_FAILED + 1; RemotingStopReason.UNEXPECTED_FAILURE = RemotingStopReason.DATA_SEND_FAILED + 1; RemotingStopReason.SERVICE_GONE = RemotingStopReason.UNEXPECTED_FAILURE + 1; RemotingStopReason.USER_DISABLED = RemotingStopReason.SERVICE_GONE + 1; RemotingStopReason.MIN_VALUE = 0, RemotingStopReason.MAX_VALUE = 7, RemotingStopReason.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: return true; } return false; }; RemotingStopReason.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; var RemotingStartFailReason = {}; RemotingStartFailReason.CANNOT_START_MULTIPLE = 0; RemotingStartFailReason.ROUTE_TERMINATED = RemotingStartFailReason.CANNOT_START_MULTIPLE + 1; RemotingStartFailReason.SERVICE_NOT_CONNECTED = RemotingStartFailReason.ROUTE_TERMINATED + 1; RemotingStartFailReason.MIN_VALUE = 0, RemotingStartFailReason.MAX_VALUE = 2, RemotingStartFailReason.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: return true; } return false; }; RemotingStartFailReason.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; var RemotingSinkFeature = {}; RemotingSinkFeature.RENDERING = 0; RemotingSinkFeature.CONTENT_DECRYPTION = RemotingSinkFeature.RENDERING + 1; RemotingSinkFeature.MIN_VALUE = 0, RemotingSinkFeature.MAX_VALUE = 1, RemotingSinkFeature.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: return true; } return false; }; RemotingSinkFeature.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; var RemotingSinkAudioCapability = {}; RemotingSinkAudioCapability.CODEC_BASELINE_SET = 0; RemotingSinkAudioCapability.CODEC_AAC = RemotingSinkAudioCapability.CODEC_BASELINE_SET + 1; RemotingSinkAudioCapability.CODEC_OPUS = RemotingSinkAudioCapability.CODEC_AAC + 1; RemotingSinkAudioCapability.MIN_VALUE = 0, RemotingSinkAudioCapability.MAX_VALUE = 2, RemotingSinkAudioCapability.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: return true; } return false; }; RemotingSinkAudioCapability.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; var RemotingSinkVideoCapability = {}; RemotingSinkVideoCapability.SUPPORT_4K = 0; RemotingSinkVideoCapability.CODEC_BASELINE_SET = RemotingSinkVideoCapability.SUPPORT_4K + 1; RemotingSinkVideoCapability.CODEC_H264 = RemotingSinkVideoCapability.CODEC_BASELINE_SET + 1; RemotingSinkVideoCapability.CODEC_VP8 = RemotingSinkVideoCapability.CODEC_H264 + 1; RemotingSinkVideoCapability.CODEC_VP9 = RemotingSinkVideoCapability.CODEC_VP8 + 1; RemotingSinkVideoCapability.CODEC_HEVC = RemotingSinkVideoCapability.CODEC_VP9 + 1; RemotingSinkVideoCapability.MIN_VALUE = 0, RemotingSinkVideoCapability.MAX_VALUE = 5, RemotingSinkVideoCapability.isKnownEnumValue = function(value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: return true; } return false; }; RemotingSinkVideoCapability.validate = function(enumValue) { var isExtensible = false; if (isExtensible || this.isKnownEnumValue(enumValue)) return validator.validationError.NONE; return validator.validationError.UNKNOWN_ENUM_VALUE; }; function RemotingSinkMetadata(values) { this.initDefaults_(); this.initFields_(values); } RemotingSinkMetadata.prototype.initDefaults_ = function() { this.features = null; this.audioCapabilities = null; this.videoCapabilities = null; this.friendlyName = null; }; RemotingSinkMetadata.prototype.initFields_ = function(fields) { for(var field in fields) { if (this.hasOwnProperty(field)) this[field] = fields[field]; } }; RemotingSinkMetadata.validate = function(messageValidator, offset) { var err; err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize); if (err !== validator.validationError.NONE) return err; var kVersionSizes = [ {version: 0, numBytes: 40} ]; err = messageValidator.validateStructVersion(offset, kVersionSizes); if (err !== validator.validationError.NONE) return err; // validate RemotingSinkMetadata.features err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 4, new codec.Enum(RemotingSinkFeature), false, [0], 0); if (err !== validator.validationError.NONE) return err; // validate RemotingSinkMetadata.audioCapabilities err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 4, new codec.Enum(RemotingSinkAudioCapability), false, [0], 0); if (err !== validator.validationError.NONE) return err; // validate RemotingSinkMetadata.videoCapabilities err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 4, new codec.Enum(RemotingSinkVideoCapability), false, [0], 0); if (err !== validator.validationError.NONE) return err; // validate RemotingSinkMetadata.friendlyName err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 24, false) if (err !== validator.validationError.NONE) return err; return validator.validationError.NONE; }; RemotingSinkMetadata.encodedSize = codec.kStructHeaderSize + 32; RemotingSinkMetadata.decode = function(decoder) { var packed; var val = new RemotingSinkMetadata(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); val.features = decoder.decodeArrayPointer(new codec.Enum(RemotingSinkFeature)); val.audioCapabilities = decoder.decodeArrayPointer(new codec.Enum(RemotingSinkAudioCapability)); val.videoCapabilities = decoder.decodeArrayPointer(new codec.Enum(RemotingSinkVideoCapability)); val.friendlyName = decoder.decodeStruct(codec.String); return val; }; RemotingSinkMetadata.encode = function(encoder, val) { var packed; encoder.writeUint32(RemotingSinkMetadata.encodedSize); encoder.writeUint32(0); encoder.encodeArrayPointer(new codec.Enum(RemotingSinkFeature), val.features); encoder.encodeArrayPointer(new codec.Enum(RemotingSinkAudioCapability), val.audioCapabilities); encoder.encodeArrayPointer(new codec.Enum(RemotingSinkVideoCapability), val.videoCapabilities); encoder.encodeStruct(codec.String, val.friendlyName); }; exports.RemotingStopReason = RemotingStopReason; exports.RemotingStartFailReason = RemotingStartFailReason; exports.RemotingSinkFeature = RemotingSinkFeature; exports.RemotingSinkAudioCapability = RemotingSinkAudioCapability; exports.RemotingSinkVideoCapability = RemotingSinkVideoCapability; exports.RemotingSinkMetadata = RemotingSinkMetadata; })();PNG  IHDR**o`IDATx^1 C n.3(A$ހC;ߎDŽ,`N3QlyJ Ag uJ!C7'*膟.Ms *IENDB`PNG  IHDRJAuIDATx^Qj1@Q! ## K($y ,;ltYvBzO(#DQ6&}ɝE'̲ ,9VF|۲&ï&~! jY͑aRoFZ7'!fg7m>w%Za--4ȿޤI]IENDB`PNG  IHDR ?OIDATx3QƧb'Mm۶m۶ẝwoL5g| JzP(TrlI2hZHeDs]opӍzSl۩c] ӢYx-äp+iYy,<떐ح;Qr<<}<\6n5Kܾ#s@yӰ-Q,>6΀oF.@l|نثy0$ܼww޶!eGJ5fr3:pC O$~fN>ɣv 3&8Rt*.؉4 _ͷaVsb! )x;_7^ aP/q@p2Xw40Z: ۀ5HIb^b],IENDB`PNG  IHDR ?O)IDATxŖ|WƧ jĩqm۶mͱmϬ{{wTz\:rؗjDc9L6F 8,Xnzo3_}S# <+b5V{)|# RH0;Ҟ*|b;4rYxʱi#bQ7VzJDGԌʞhǰǏ88nLyZ٣&8{+k)%xM X(50N=_122Pwvؕ  ]X…KH1W, - (> ;pе Y$0 HW[\cYYDGQ*WFJ2pߧA@Um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