X Tutup
Skip to content

Commit 3072397

Browse files
committed
Save before cython refactoring.
1 parent 556e8f7 commit 3072397

File tree

6 files changed

+62
-42
lines changed

6 files changed

+62
-42
lines changed

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
build/
2-
setup/build/
3-
*.pyc
1+
/build/
2+
/setup/build/
3+
*.pyc
4+
5+
# If you want to ignore an already commited directory run:
6+
# git rm --cached -r .idea
7+
/.idea/

browser.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# License: New BSD License.
33
# Website: http://code.google.com/p/cefpython/
44

5+
from cef_ptr cimport *
6+
from cef_browser cimport *
7+
58
# Global variables.
69

710
cdef map[int, CefRefPtr[CefBrowser]] __cefBrowsers # innerWindowID : browser
@@ -25,7 +28,7 @@ class PyBrowser:
2528
handlers = {}
2629

2730
def __init__(self, topWindowID, innerWindowID, handlers):
28-
31+
2932
self.topWindowID = topWindowID
3033
self.innerWindowID = innerWindowID
3134

cefexample/cefadvanced.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def CefAdvanced():
6969
def DocumentReady(browser, frame):
7070

7171
print "OnLoadStart(): frame URL: %s" % frame.GetURL()
72-
browser.GetMainFrame().ExecuteJavascript("window.open('about:blank', '', 'width=500,height=500')")
72+
#browser.GetMainFrame().ExecuteJavascript("window.open('about:blank', '', 'width=500,height=500')")
7373
if frame.IsMain():
7474
return
75-
print "HidePopup(): %s" % browser.HidePopup()
75+
#print "HidePopup(): %s" % browser.HidePopup()
7676

7777
def OnLoadError(browser, frame, errorCode, failedURL, errorText):
7878

cefexample/debug.log

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
1-
[0707/093114:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
2-
[0707/093120:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
3-
[0707/093125:INFO:CONSOLE(0)] "Refused to display document because display forbidden by X-Frame-Options.
4-
," source: (0)
5-
[0707/093133:VERBOSE1:ssl_host_info.cc(113)] Kicking off verification for plusone.google.com
6-
[0707/093133:VERBOSE1:ssl_host_info.cc(193)] Verification took 0ms
7-
[0707/094216:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
8-
[0707/094219:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
9-
[0707/094222:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
10-
[0707/101022:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
11-
[0707/101036:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
12-
[0707/101046:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
13-
[0707/101128:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
14-
[0707/101241:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
15-
[0707/101246:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
16-
[0707/101443:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
17-
[0707/101451:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
18-
[0707/101500:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
19-
[0707/101504:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
20-
[0707/111824:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
21-
[0707/111845:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
22-
[0707/112203:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
23-
[0707/112237:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
24-
[0707/112416:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
25-
[0707/112644:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
26-
[0707/135335:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
27-
[0707/142644:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
1+
[0707/093114:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
2+
[0707/093120:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
3+
[0707/093125:INFO:CONSOLE(0)] "Refused to display document because display forbidden by X-Frame-Options.
4+
," source: (0)
5+
[0707/093133:VERBOSE1:ssl_host_info.cc(113)] Kicking off verification for plusone.google.com
6+
[0707/093133:VERBOSE1:ssl_host_info.cc(193)] Verification took 0ms
7+
[0707/094216:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
8+
[0707/094219:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
9+
[0707/094222:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
10+
[0707/101022:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
11+
[0707/101036:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
12+
[0707/101046:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
13+
[0707/101128:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
14+
[0707/101241:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
15+
[0707/101246:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
16+
[0707/101443:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
17+
[0707/101451:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
18+
[0707/101500:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
19+
[0707/101504:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
20+
[0707/111824:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
21+
[0707/111845:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
22+
[0707/112203:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
23+
[0707/112237:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
24+
[0707/112416:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
25+
[0707/112644:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
26+
[0707/135335:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
27+
[0707/142644:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
28+
[0708/062540:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
29+
[0708/063400:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
30+
[0708/063620:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
31+
[0708/065257:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
32+
[0708/065425:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
33+
[0708/080641:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
34+
[0708/081116:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
35+
[0708/081131:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
36+
[0708/081205:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
37+
[0708/081405:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
38+
[0708/081433:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
39+
[0708/081458:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091
40+
[0708/081920:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 10091

compile.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ del "setup\cefpython.pyd"
44
del "setup\cefpython.cpp"
55
rmdir /S /Q "setup/build"
66

7-
REM for /R %~dp0\pyinclude\ %%f in (*.pxd) do copy %%f %~dp0\setup\
7+
REM copy all src\*.pyx to src\setup\:
8+
for /R %~dp0\ %%f in (*.pyx) do copy %%f %~dp0\setup\
89

910
cd "setup"
1011

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def SetFunction(self, name, func):
2121
def SetProperty(self, name, value):
2222

2323
allowed = self.__IsTypeAllowed(value) # returns True or string.
24-
if allowed != True:
24+
if allowed is not True:
2525
raise Exception("JavascriptBindings.SetProperty(): not allowed type: %s" % allowed)
2626
self.__properties[name] = value
2727

@@ -39,26 +39,25 @@ def __IsTypeAllowed(self, value):
3939
valueType = type(value)
4040
if valueType == types.ListType:
4141
for val in value:
42-
valueType2 = self.__IsTypeAllowed(val):
43-
if valueType2 != True:
42+
valueType2 = self.__IsTypeAllowed(val)
43+
if valueType2 is not True:
4444
return valueType2.__name__
4545
return True
46-
elif valueType == types.BoolType:
46+
elif valueType == types.BooleanType:
4747
return True
48-
elif valueType == types.DoubleType:
48+
elif valueType == types.FloatType:
4949
return True
5050
elif valueType == types.IntType:
5151
return True
5252
elif valueType == types.NoneType:
5353
return True
5454
elif valueType == types.DictType:
5555
for key in value:
56-
valueType2 = self.__IsTypeAllowed(value[key]):
57-
if valueType2 != True:
56+
valueType2 = self.__IsTypeAllowed(value[key])
57+
if valueType2 is not True:
5858
return valueType2.__name__
5959
return True
6060
elif valueType == types.StringType:
6161
return True
6262
else:
6363
return valueType.__name__
64-
return valueType.__name__

0 commit comments

Comments
 (0)
X Tutup