public void init ( ) { waitForHandshake ( ) ; availableServices = buildAvailableServices ( getHostInfo ( ) ) ; connect ( ) ; // We always need a debugger, and it should never be included in the set of required services if ( OperaDefaults . ENABLE_DEBUGGER && ! ( requiredServices . contains ( ScopeService . ECMASCRIPT ) || requiredServices . contains ( ScopeService . ECMASCRIPT_DEBUGGER ) ) ) { if ( availableServices . containsKey ( ScopeService . ECMASCRIPT ) ) { requiredServices . add ( ScopeService . ECMASCRIPT ) ; } else { requiredServices . add ( ScopeService . ECMASCRIPT_DEBUGGER ) ; } } else { debugger = new MockEcmascriptDebugger ( ) ; } services = createServices ( requiredServices ) ; enableServices ( services . values ( ) ) ; initializeServices ( services . values ( ) ) ; }
Gets the supported services from Opera and calls methods to enable the ones we requested .