FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/cefpython/load_handler_cef1.pyx at cefpython31 · 2php/cefpython · GitHub
2php
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
cefpython
/
load_handler_cef1.pyx
Copy path
More file actions
More file actions
Latest commit
History
History
History
69 lines (66 loc) · 2.33 KB
Breadcrumbs
cefpython
/
cefpython
/
load_handler_cef1.pyx
Copy path
File metadata and controls
69 lines (66 loc) · 2.33 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
Copyright (c) 2012-2014 The CEF Python authors. All rights reserved.
#
License: New BSD License.
#
Website: http://code.google.com/p/cefpython/
cdef public
void
LoadHandler_OnLoadEnd(
CefRefPtr[CefBrowser] cefBrowser,
CefRefPtr[CefFrame] cefFrame,
int
httpStatusCode
)
except
*
with
gil:
cdef PyBrowser pyBrowser
cdef PyFrame pyFrame
cdef
object
callback
try
:
pyBrowser
=
GetPyBrowser(cefBrowser)
pyFrame
=
GetPyFrame(cefFrame)
callback
=
pyBrowser.GetClientCallback(
"
OnLoadEnd
"
)
if
callback:
callback(pyBrowser, pyFrame, httpStatusCode)
except
:
(exc_type, exc_value, exc_trace)
=
sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
cdef public
void
LoadHandler_OnLoadStart(
CefRefPtr[CefBrowser] cefBrowser,
CefRefPtr[CefFrame] cefFrame
)
except
*
with
gil:
cdef PyBrowser pyBrowser
cdef PyFrame pyFrame
cdef
object
callback
try
:
pyBrowser
=
GetPyBrowser(cefBrowser)
pyFrame
=
GetPyFrame(cefFrame)
callback
=
pyBrowser.GetClientCallback(
"
OnLoadStart
"
)
if
callback:
callback(pyBrowser, pyFrame)
except
:
(exc_type, exc_value, exc_trace)
=
sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
cdef public cpp_bool LoadHandler_OnLoadError(
CefRefPtr[CefBrowser] cefBrowser,
CefRefPtr[CefFrame] cefFrame,
cef_types.cef_handler_errorcode_t cefErrorCode,
CefString
&
cefFailedUrl,
CefString
&
cefErrorText
)
except
*
with
gil:
cdef PyBrowser pyBrowser
cdef PyFrame pyFrame
cdef
str
pyFailedUrl
cdef
object
callback
cdef
list
errorText
cdef py_bool ret
try
:
pyBrowser
=
GetPyBrowser(cefBrowser)
pyFrame
=
GetPyFrame(cefFrame)
pyFailedUrl
=
CefToPyString(cefFailedUrl)
callback
=
pyBrowser.GetClientCallback(
"
OnLoadError
"
)
if
callback:
errorText
=
[
"
"
]
ret
=
callback(
pyBrowser, pyFrame, cefErrorCode, pyFailedUrl, errorText)
if
ret:
PyToCefString(errorText[
0
], cefErrorText)
return
bool
(ret)
else
:
return
False
except
:
(exc_type, exc_value, exc_trace)
=
sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
Back
|
FazBrowse Home
|
New Git URL