api/labs/easyrtc_sc_extension/background-script.js
function portOnMessageHanlder(message) {
        if(message === 'get-sourceId' && !pending) {
            pending = true;
            chrome.desktopCapture.chooseDesktopMedia(session, port.sender.tab, onAccessApproved);
        }
    }
function portOnMessageHanlder(message) {
        if(message === 'get-sourceId' && !pending) {
            pending = true;
            chrome.desktopCapture.chooseDesktopMedia(session, port.sender.tab, onAccessApproved);
        }
    }
function portOnMessageHanlder ( message ) { if ( message === 'get-sourceId' && ! pending ) { pending = true ; chrome . desktopCapture . chooseDesktopMedia ( session , port . sender . tab , onAccessApproved ) ; } }
this one is called for each message from "content-script.js"
this one is called for each message from content - script . js