Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/python/webview.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpgritti@gmail.com>2008-10-15 02:33:21 (GMT)
committer Marco Pesenti Gritti <mpgritti@gmail.com>2008-10-15 02:33:21 (GMT)
commitfe68d402ad560edd6bdb265a14cbd80b5f281ca7 (patch)
tree4d93a16ab81ac808742301c0bafedd063f10e53e /python/webview.py
parentd3fd80482ca4807c911173c50cc7b8ad2917fa4a (diff)
Better way to map from dom window to view.
Give up on trying to allow to user the view before it's realized, it's just not possible to do it with current mozilla implementation.
Diffstat (limited to 'python/webview.py')
-rw-r--r--python/webview.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/python/webview.py b/python/webview.py
index b4dc51f..c257f9c 100644
--- a/python/webview.py
+++ b/python/webview.py
@@ -25,8 +25,6 @@ from xpcom import components
from xpcom.components import interfaces
from xpcom.nsError import *
-_views = []
-
class _Chrome:
_com_interfaces_ = interfaces.nsIWebBrowserChrome, \
interfaces.nsIWebBrowserChrome2, \
@@ -147,6 +145,9 @@ class _Chrome:
#logging.debug("nsIEmbeddingSiteWindow.get_visibility: %r" % self.web_view.get_toplevel().props.visible)
return self.web_view.get_toplevel().props.visible
+ def get_webBrowser(self):
+ return self.web_view.browser
+
def get_chromeFlags(self):
return self._chrome_flags
@@ -206,6 +207,7 @@ class WebView(_hulahop.WebView):
'status' : (str, None, None, None,
gobject.PARAM_READABLE)
}
+
def __init__(self):
_hulahop.WebView.__init__(self)
@@ -226,15 +228,6 @@ class WebView(_hulahop.WebView):
self._status = ''
- self.create_window()
-
- self.connect('destroy', self.__destroy_cb)
-
- _views.append(self)
-
- def __destroy_cb(self):
- _views.remove(self)
-
def _notify_title_changed(self):
self.notify('title')
@@ -278,9 +271,3 @@ class WebView(_hulahop.WebView):
doc_shell = property(get_doc_shell)
web_progress = property(get_web_progress)
web_navigation = property(get_web_navigation)
-
-def lookup_view(chrome):
- for view in _views:
- if view._chrome == chrome:
- return view
- return None