github.com/ckxng/wakeup@v0.0.0-20190105202853-90356a5f5a15/src/wakeup/window/window.go (about) 1 // Copyright (c) 2015 Cameron King. All rights reserved. 2 // License: BSD 2-clause. 3 // Website: https://github.com/ckxng/wakeup 4 5 package window 6 7 import ( 8 "log" 9 "os" 10 "cef" 11 "wakeup/config" 12 ) 13 14 var logger *log.Logger = log.New(os.Stdout, "[window] ", log.Lshortfile) 15 16 func Go(cfg *config.Config, c chan int) { 17 logger.Println("executeCEFSubprocess") 18 executeCEFSubprocess() 19 20 logger.Println("initializeCEFSettings") 21 initializeCEFSettings(cfg) 22 23 logger.Println("createWindow") 24 createWindow(cfg) 25 26 logger.Println("cef.RunMessageLoop") 27 cef.RunMessageLoop() 28 29 logger.Println("cef.Shutdown") 30 cef.Shutdown() 31 c <- 0 32 } 33 34 func initializeCEFSettings(cfg *config.Config) { 35 settings := cef.Settings{} 36 settings.CachePath = cfg.CachePath 37 settings.LogSeverity = cef.LOGSEVERITY_DEFAULT 38 cef.Initialize(settings) 39 }