From 557a417719340e0d1041e51d31968c0abca09f6a Mon Sep 17 00:00:00 2001 From: Manuel QuiƱones Date: Mon, 15 Apr 2013 19:03:43 +0000 Subject: Remove unused files from xpcom This are not referenced anymore in the current webkit based source. Signed-off-by: Manuel QuiƱones --- diff --git a/agent-stylesheet.css b/agent-stylesheet.css deleted file mode 100644 index 6c94d0e..0000000 --- a/agent-stylesheet.css +++ /dev/null @@ -1,8 +0,0 @@ -/* Prevent flash animations from playing until you click on them. */ -object[classid$=":D27CDB6E-AE6D-11cf-96B8-444553540000"], -object[codebase*="swflash.cab"], -object[type="application/x-shockwave-flash"], -embed[type="application/x-shockwave-flash"], -embed[src$=".swf"] -{ -moz-binding: url("clickToView.xml#flash"); } - diff --git a/clickToView.xml b/clickToView.xml deleted file mode 100644 index 6164c73..0000000 --- a/clickToView.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/progresslistener.py b/progresslistener.py deleted file mode 100644 index 2a78c42..0000000 --- a/progresslistener.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (C) 2006, Red Hat, Inc. -# Copyright (C) 2007, One Laptop Per Child -# Copyright (C) 2009, Tomeu Vizoso -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -from gi.repository import GObject -import xpcom -from xpcom.components import interfaces - - -class ProgressListener(GObject.GObject): - _com_interfaces_ = interfaces.nsIWebProgressListener - - def __init__(self): - GObject.GObject.__init__(self) - - self._location = None - self._loading = False - self._progress = 0.0 - self._total_requests = 0 - self._completed_requests = 0 - - self._wrapped_self = xpcom.server.WrapObject( \ - self, interfaces.nsIWebProgressListener) - weak_ref = xpcom.client.WeakReference(self._wrapped_self) - - def setup(self, browser): - mask = interfaces.nsIWebProgress.NOTIFY_STATE_NETWORK | \ - interfaces.nsIWebProgress.NOTIFY_STATE_REQUEST | \ - interfaces.nsIWebProgress.NOTIFY_LOCATION - - browser.web_progress.addProgressListener(self._wrapped_self, mask) - - def _reset_requests_count(self): - self._total_requests = 0 - self._completed_requests = 0 - - def onLocationChange(self, webProgress, request, location): - self._location = location - self.notify('location') - - def onProgressChange(self, webProgress, request, curSelfProgress, - maxSelfProgress, curTotalProgress, maxTotalProgress): - pass - - def onSecurityChange(self, webProgress, request, state): - pass - - def onStateChange(self, webProgress, request, stateFlags, status): - if stateFlags & interfaces.nsIWebProgressListener.STATE_IS_REQUEST: - if stateFlags & interfaces.nsIWebProgressListener.STATE_START: - self._total_requests += 1 - elif stateFlags & interfaces.nsIWebProgressListener.STATE_STOP: - self._completed_requests += 1 - - if stateFlags & interfaces.nsIWebProgressListener.STATE_IS_NETWORK: - if stateFlags & interfaces.nsIWebProgressListener.STATE_START: - self._loading = True - self._reset_requests_count() - self.notify('loading') - elif stateFlags & interfaces.nsIWebProgressListener.STATE_STOP: - self._loading = False - self.notify('loading') - - if self._total_requests < self._completed_requests: - self._progress = 1.0 - elif self._total_requests > 0: - self._progress = \ - self._completed_requests / float(self._total_requests) - else: - self._progress = 0.0 - self.notify('progress') - - def onStatusChange(self, webProgress, request, status, message): - pass - - def _get_location(self): - return self._location - - location = GObject.property(type=object, getter=_get_location) - - def _get_loading(self): - return self._loading - - loading = GObject.property(type=bool, default=False, getter=_get_loading) - - def _get_progress(self): - return self._progress - - progress = GObject.property(type=float, getter=_get_progress) diff --git a/promptservice.py b/promptservice.py deleted file mode 100644 index 31ba0da..0000000 --- a/promptservice.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (C) 2007, One Laptop Per Child -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -import logging - -from xpcom.components import interfaces - - -class PromptService: - _com_interfaces_ = interfaces.nsIPromptService - - cid = '{836a90cb-6304-44f0-97df-c29913b908b7}' - description = 'Sugar Prompt Service' - - def __init__(self): - pass - - def alert(self, parent, dialogTitle, text): - logging.debug('nsIPromptService.alert()') - - def alertCheck(self, parent, dialogTitle, text, checkMsg, checkState): - logging.debug('nsIPromptService.alertCheck()') - - def confirm(self, parent, dialogTitle, text): - logging.debug('nsIPromptService.confirm()') - - def confirmCheck(self, parent, dialogTitle, text, checkMsg, checkState): - logging.debug('nsIPromptService.confirmCheck()') - - def confirmEx(self, parent, dialogTitle, text, buttonFlags, button0Title, - button1Title, button2Title, checkMsg, checkState): - logging.debug('nsIPromptService.confirmEx()') - - def prompt(self, parent, dialogTitle, text, value, checkMsg, checkState): - logging.debug('nsIPromptService.prompt()') - - def promptPassword(self, parent, dialogTitle, text, password, checkMsg, - checkState): - logging.debug('nsIPromptService.promptPassword()') - - def promptUsernameAndPassword(self, parent, dialogTitle, text, username, - password, checkMsg, checkState): - logging.debug('nsIPromptService.promptUsernameAndPassword()') - - def select(self, parent, dialogTitle, text, count, selectList, - outSelection): - logging.debug('nsIPromptService.select()') - - -#components.registrar.registerFactory( -# PromptService.cid, -# PromptService.description, -# '@mozilla.org/embedcomp/prompt-service;1', -# Factory(PromptService)) diff --git a/securitydialogs.py b/securitydialogs.py deleted file mode 100644 index f3d20fb..0000000 --- a/securitydialogs.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2007, One Laptop Per Child -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -import logging - -from xpcom.components import interfaces - - -class SecurityDialogs: - _com_interfaces_ = interfaces.nsIBadCertListener - - cid = '{267d2fc2-1810-11dc-8314-0800200c9a66}' - description = 'Sugar Security Dialogs' - - def __init__(self): - pass - - def confirmCertExpired(socketInfo, cert): - logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmCertExpired()') - return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True - - def confirmMismatchDomain(socketInfo, targetURL, cert): - logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmMismatchDomain()') - return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True - - def confirmUnknownIssuer(socketInfo, cert, certAddType): - logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmUnknownIssuer()') - return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True - - def notifyCrlNextupdate(socketInfo, targetURL, cert): - logging.debug('UNIMPLEMENTED: SecurityDialogs.notifyCrlNextupdate()') - -""" -components.registrar.registerFactory(SecurityDialogs.cid, - SecurityDialogs.description, - '@mozilla.org/nsBadCertListener;1', - Factory(SecurityDialogs)) -""" diff --git a/sessionhistory.py b/sessionhistory.py deleted file mode 100644 index 615a98d..0000000 --- a/sessionhistory.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (C) 2007, One Laptop Per Child -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -import logging - -from gi.repository import GObject -import xpcom -from xpcom.components import interfaces - - -class HistoryListener(GObject.GObject): - _com_interfaces_ = interfaces.nsISHistoryListener - - __gsignals__ = { - 'session-history-changed': (GObject.SignalFlags.RUN_FIRST, - None, - ([int])), - 'session-link-changed': (GObject.SignalFlags.RUN_FIRST, None, - ([str])), - } - - def __init__(self): - GObject.GObject.__init__(self) - - self._wrapped_self = xpcom.server.WrapObject( \ - self, interfaces.nsISHistoryListener) - weak_ref = xpcom.client.WeakReference(self._wrapped_self) - - def setup(self, web_navigation): - self._session_history = web_navigation.sessionHistory - self._session_history.addSHistoryListener(self._wrapped_self) - - def OnHistoryGoBack(self, back_uri): - logging.debug('OnHistoryGoBack: %s', back_uri.spec) - self.emit('session-link-changed', back_uri.spec) - self.emit('session-history-changed', self._session_history.index - 1) - return True - - def OnHistoryGoForward(self, forward_uri): - logging.debug('OnHistoryGoForward: %s', forward_uri.spec) - self.emit('session-link-changed', forward_uri.spec) - self.emit('session-history-changed', self._session_history.index + 1) - return True - - def OnHistoryGotoIndex(self, index, goto_uri): - logging.debug('OnHistoryGotoIndex: %i %s', index, goto_uri.spec) - self.emit('session-link-changed', goto_uri.spec) - self.emit('session-history-changed', index) - return True - - def OnHistoryNewEntry(self, new_uri): - logging.debug('OnHistoryNewEntry: %s', new_uri.spec) - self.emit('session-link-changed', new_uri.spec) - self.emit('session-history-changed', self._session_history.index + 1) - - def OnHistoryPurge(self, num_entries): - logging.debug('OnHistoryPurge: %i', num_entries) - #self.emit('session-history-changed') - return True - - def OnHistoryReload(self, reload_uri, reload_flags): - self.emit('session-link-changed', reload_uri.spec) - logging.debug('OnHistoryReload: %s', reload_uri.spec) - return True -- cgit v0.9.1