upgrade-dev v2.2.12

This commit is contained in:
杨红岩 2023-03-14 11:19:09 +08:00
parent b17eee65cb
commit f637e7e19b

View File

@ -12,7 +12,6 @@
package cef
import (
"fmt"
"github.com/energye/energy/common"
"github.com/energye/energy/common/imports"
. "github.com/energye/energy/consts"
@ -54,10 +53,8 @@ func (m *TCEFApplication) AddCrDelegate() {
func (m *TCEFApplication) registerDefaultEvent() {
m.defaultSetOnContextCreated()
m.defaultSetOnProcessMessageReceived()
m.defaultSetOnRenderLoadStart()
//m.defaultSetOnBeforeChildProcessLaunch()
m.SetOnRenderLoadStart(func(browser *ICefBrowser, frame *ICefFrame, transitionType TCefTransitionType) {
fmt.Println("SetOnLoadStart")
})
}
// Instance 实例
@ -220,6 +217,12 @@ func (m *TCEFApplication) SetOnRenderLoadStart(fn GlobalCEFAppEventOnRenderLoadS
imports.Proc(internale_CEFGlobalApp_SetOnRenderLoadStart).Call(api.MakeEventDataPtr(fn))
}
func (m *TCEFApplication) defaultSetOnRenderLoadStart() {
m.SetOnRenderLoadStart(func(browser *ICefBrowser, frame *ICefFrame, transitionType TCefTransitionType) {
})
}
func (m *TCEFApplication) SetOnRenderLoadEnd(fn GlobalCEFAppEventOnRenderLoadEnd) {
imports.Proc(internale_CEFGlobalApp_SetOnRenderLoadEnd).Call(api.MakeEventDataPtr(fn))
}