forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbrowser_process_handler.pyx
More file actions
46 lines (41 loc) · 1.8 KB
/
Copy pathbrowser_process_handler.pyx
File metadata and controls
46 lines (41 loc) · 1.8 KB
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
# Copyright (c) 2012 CEF Python, see the Authors file.
# All rights reserved. Licensed under BSD 3-clause license.
# Project website: https://github.com/cztomczak/cefpython
include "../cefpython.pyx"
cdef public void BrowserProcessHandler_OnContextInitialized() except * with gil:
try:
global g_context_initialized
Debug("BrowserProcessHandler_OnContextInitialized()")
g_context_initialized = True
# Browser creation is handled by BrowserProcessHandler_CreatePendingBrowsers,
# posted as a separate task in C++ so it runs at the outer message-loop level.
except:
(exc_type, exc_value, exc_trace) = sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
cdef public void BrowserProcessHandler_CreatePendingBrowsers() except * with gil:
try:
Debug("BrowserProcessHandler_CreatePendingBrowsers()")
if g_pending_browsers:
pending = list(g_pending_browsers)
del g_pending_browsers[:]
for params in pending:
CreateBrowserSync(**params)
except:
(exc_type, exc_value, exc_trace) = sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
cdef public void BrowserProcessHandler_OnRenderProcessThreadCreated(
CefRefPtr[CefListValue] extra_info
) except * with gil:
try:
pass
except:
(exc_type, exc_value, exc_trace) = sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
cdef public void BrowserProcessHandler_OnBeforeChildProcessLaunch(
CefRefPtr[CefCommandLine] cefCommandLine
) except * with gil:
try:
AppendSwitchesToCommandLine(cefCommandLine, g_commandLineSwitches)
except:
(exc_type, exc_value, exc_trace) = sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)