Changeset 695:c33fc35b99a1
- Timestamp:
- 10/25/15 06:23:05 (9 years ago)
- Branch:
- cef
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/cef.py
r692 r695 110 110 self._driver = None 111 111 112 self._simBriefBrowser = None 113 112 114 self._toQuit = False 113 115 … … 116 118 """Get the program directory.""" 117 119 return self._programDirectory 120 121 @property 122 def simBriefInitURL(self): 123 """Get the initial URL for the SimBrief browser.""" 124 return "file://" + os.path.join(self.programDirectory, "simbrief.html") 118 125 119 126 def run(self): … … 147 154 148 155 driver.quit() 156 157 def initializeSimBrief(self): 158 """Create and initialize the browser used for Simbrief.""" 159 windowInfo = cefpython.WindowInfo() 160 windowInfo.SetAsOffscreen(int(0)) 161 162 url = self.simBriefInitURL 163 self._simBriefBrowser = \ 164 cefpython.CreateBrowserSync(windowInfo, browserSettings = {}, 165 navigateUrl = self.simBriefInitURL) 166 self._simBriefBrowser.SetClientHandler(OffscreenRenderHandler()) 167 self._simBriefBrowser.SetFocus(True) 149 168 150 169 def callSimBrief(self, plan, getCredentials, updateProgress, … … 345 364 def initializeSimBrief(): 346 365 """Initialize the (hidden) browser window for SimBrief.""" 347 windowInfo = cefpython.WindowInfo() 348 windowInfo.SetAsOffscreen(int(0)) 349 350 url = "file://" + os.path.join(_seleniumHandler.programDirectory, 351 "simbrief.html") 352 simBriefBrowser = cefpython.CreateBrowserSync(windowInfo, 353 browserSettings = {}, 354 navigateUrl = url) 355 simBriefBrowser.SetClientHandler(OffscreenRenderHandler()) 356 357 simBriefBrowser.SetFocus(True) 366 _seleniumHandler.initializeSimBrief() 358 367 359 368 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.