diff --git a/python/webview.py b/python/webview.py
index 6b0af57..7e2b582 100644
|
a
|
b
|
|
| 25 | 25 | from xpcom.components import interfaces |
| 26 | 26 | from xpcom.nsError import * |
| 27 | 27 | |
| | 28 | _views = [] |
| | 29 | |
| 28 | 30 | class _Chrome: |
| 29 | 31 | _com_interfaces_ = interfaces.nsIWebBrowserChrome, \ |
| 30 | 32 | interfaces.nsIWebBrowserChrome2, \ |
| … |
… |
|
| 41 | 43 | |
| 42 | 44 | def provideWindow(self, parent, flags, position_specified, |
| 43 | 45 | size_specified, uri, name, features): |
| | 46 | if size_specified or position_specified or \ |
| | 47 | not flags & interfaces.nsIWebBrowserChrome.CHROME_ALL: |
| | 48 | return None, False |
| | 49 | |
| 44 | 50 | return parent, False |
| 45 | 51 | |
| 46 | 52 | # nsIWebBrowserChrome |
| … |
… |
|
| 223 | 229 | |
| 224 | 230 | self.create_window() |
| 225 | 231 | |
| | 232 | self.connect('destroy', self.__destroy_cb) |
| | 233 | |
| | 234 | _views.append(self) |
| | 235 | |
| | 236 | def __destroy_cb(self): |
| | 237 | _views.remove(self) |
| | 238 | |
| 226 | 239 | def _notify_title_changed(self): |
| 227 | 240 | self.notify('title') |
| 228 | 241 | |
| … |
… |
|
| 267 | 280 | web_progress = property(get_web_progress) |
| 268 | 281 | web_navigation = property(get_web_navigation) |
| 269 | 282 | |
| | 283 | def lookup_view(chrome): |
| | 284 | for view in _views: |
| | 285 | if view._chrome == chrome: |
| | 286 | return view |
| | 287 | return None |