Lines Matching refs:port
77 onConnect_: function(port) {
78 var tabId = this.getTabIdFromPort_(port);
81 if (port.name == 'authMain') {
82 this.bridges_[tabId].setupForAuthMain(port);
83 port.onDisconnect.addListener(function() {
86 } else if (port.name == 'injected') {
87 this.bridges_[tabId].setupForInjected(port);
89 console.error('Unexpected connection, port.name=' + port.name);
93 getTabIdFromPort_: function(port) {
94 return port.sender.tab ? port.sender.tab.id : -1;
145 setupForAuthMain: function(port) {
147 this.channelMain_.init(port);
176 setupForInjected: function(port) {
178 this.channelInjected_.init(port);