| 349 | Debug("ERROR LOADING URL : %s" % failedUrl) |
| 350 | |
| 351 | class CallbackClientHandler(object): |
| 352 | def __init__(self, onLoadStart=None, onLoadEnd=None): |
| 353 | self._onLoadStart = onLoadStart |
| 354 | self._onLoadEnd = onLoadEnd |
| 355 | |
| 356 | def OnLoadStart(self, browser, frame): |
| 357 | if self._onLoadStart and frame.GetUrl() != "about:blank": |
| 358 | self._onLoadStart(browser, frame) |
| 359 | |
| 360 | def OnLoadEnd(self, browser, frame, httpStatusCode): |
| 361 | if self._onLoadEnd and frame.GetUrl() != "about:blank": |
| 362 | self._onLoadEnd(browser, frame, httpStatusCode) |
| 363 | |
| 364 | def OnLoadError(self, browser, frame, errorCode, errorText, failedUrl): |
| 365 | # TODO |
| 366 | Debug("ERROR LOADING URL : %s, %s" % (failedUrl, frame.GetUrl())) |
| 367 | |
| 368 | #------------------------------------------------------------------------------- |
| 369 | |