2022-12-07 15:50:59 +08:00
|
|
|
//----------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Licensed under GNU General Public License v3.0
|
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
2022-10-24 22:52:08 +08:00
|
|
|
package cef
|
|
|
|
|
|
|
|
type IEmitTarget interface {
|
|
|
|
GetBrowserId() int32
|
|
|
|
GetFrameId() int64
|
|
|
|
}
|
|
|
|
|
|
|
|
//GoEmit相关事件的接收目标
|
|
|
|
type EmitTarget struct {
|
|
|
|
BrowseId int32
|
|
|
|
FrameId int64
|
|
|
|
}
|
|
|
|
|
2022-11-06 22:10:24 +08:00
|
|
|
func NewEmitTarget(browserId int32, frameId int64) *EmitTarget {
|
|
|
|
return &EmitTarget{
|
|
|
|
BrowseId: browserId,
|
|
|
|
FrameId: frameId,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-24 22:52:08 +08:00
|
|
|
func (m *EmitTarget) GetBrowserId() int32 {
|
|
|
|
return m.BrowseId
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *EmitTarget) GetFrameId() int64 {
|
|
|
|
return m.FrameId
|
|
|
|
}
|