def __init__(self, win_id, tab_id, tabdata, private, parent=None): super().__init__(parent) self._win_id = win_id self._tabdata = tabdata self._is_shutting_down = False self._extension_handlers = { QWebPage.ErrorPageExtension: self._handle_errorpage, QWebPage.ChooseMultipleFilesExtension: self._handle_multiple_files, } self._ignore_load_started = False self.error_occurred = False self.open_target = usertypes.ClickTarget.normal self._networkmanager = networkmanager.NetworkManager(win_id=win_id, tab_id=tab_id, private=private, parent=self) self.setNetworkAccessManager(self._networkmanager) self.setForwardUnsupportedContent(True) self.reloading.connect(self._networkmanager.clear_rejected_ssl_errors) self.printRequested.connect(self.on_print_requested) self.downloadRequested.connect(self.on_download_requested) self.unsupportedContent.connect(self.on_unsupported_content) self.loadStarted.connect(self.on_load_started) self.featurePermissionRequested.connect( self._on_feature_permission_requested) self.saveFrameStateRequested.connect( self.on_save_frame_state_requested) self.restoreFrameStateRequested.connect( self.on_restore_frame_state_requested)
def __init__(self, parent=None): super().__init__(parent) self._networkmanager = networkmanager.NetworkManager( win_id=None, tab_id=None, private=config.val.content.private_browsing, parent=self)
def __init__(self, win_id, parent=None): super().__init__(parent) self._networkmanager = networkmanager.NetworkManager( win_id=win_id, tab_id=None, private=config.get('general', 'private-browsing'), parent=self)
def __init__(self, win_id, parent=None): super().__init__(parent) self._win_id = win_id self.downloads = [] self.questions = [] self._networkmanager = networkmanager.NetworkManager( win_id, None, self) self._update_timer = usertypes.Timer(self, 'download-update') self._update_timer.timeout.connect(self.update_gui) self._update_timer.setInterval(REFRESH_INTERVAL)
def test_init_with_private_mode(): nam = networkmanager.NetworkManager(win_id=0, tab_id=0, private=True) assert isinstance(nam.cookieJar(), cookies.RAMCookieJar) assert nam.cache() is None
def __init__(self, win_id, parent=None): super().__init__(parent) self._networkmanager = networkmanager.NetworkManager( win_id, None, self)