chrome 100 percent

chrome 100 percent


DisciplinaPedagogia116.260 materiais669.589 seguidores
Pré-visualização50 páginas
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.local_present = (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.local_present & 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 = 1979839528;
 var kMediaController_Pause_Name = 1798043069;
 var kMediaController_SetMute_Name = 380499888;
 var kMediaController_SetVolume_Name = 1675267881;
 var kMediaController_Seek_Name = 1719203829;
 var kMediaController_ConnectHangoutsMediaRouteController_Name = 1412467855;
 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(controller_request) {
 var params = new MediaController_ConnectHangoutsMediaRouteController_Params();
 params.controller_request = controller_request;
 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(controller_request) {
 return this.delegate_ && this.delegate_.connectHangoutsMediaRouteController && this.delegate_.connectHangoutsMediaRouteController(controller_request);
 }
 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);