-
Notifications
You must be signed in to change notification settings - Fork 33
/
chrome.go
101 lines (97 loc) · 3.64 KB
/
chrome.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package chrome
import "github.com/gopherjs/gopherjs/js"
type Object map[string]interface{}
type Chrome struct {
o js.Object
Alarms *Alarms
Bookmarks *Bookmarks
BrowserAction *BrowserAction
BrowsingData *BrowsingData
Commands *Commands
ContextMenus *ContextMenus
Cookies *Cookies
Debugger *Debugger
DeclarativeContent *DeclarativeContent
DesktopCapture *DesktopCapture
Downloads *Downloads
Enterprise *Enterprise
Extension *Extension
FileBrowserHandler *FileBrowserHandler
FileSystemProvider *FileSystemProvider
FontSettings *FontSettings
Gcm *Gcm
History *History
I18n *I18n
Identity *Identity
Idle *Idle
Input *Input
Notification *Notification
Omnibox *Omnibox
PageAction *PageAction
PageCapture *PageCapture
Permissions *Permissions
Power *Power
Privacy *Privacy
Proxy *Proxy
Runtime *Runtime
Sessions *Sessions
Storage *Storage
System *System
Tabs *Tabs
TabCapture *TabCapture
TopSites *TopSites
Tts *Tts
TtsEngine *TtsEngine
WebNavigation *WebNavigation
WebRequest *WebRequest
WebStore *WebStore
Windows *Windows
}
func NewChrome() *Chrome {
c := new(Chrome)
c.o = *js.Global.Get("chrome")
c.Alarms = &Alarms{o: c.o.Get("alarms")}
c.Bookmarks = &Bookmarks{o: c.o.Get("bookmarks")}
c.BrowserAction = &BrowserAction{o: c.o.Get("browserAction")}
c.BrowsingData = &BrowsingData{o: c.o.Get("browsingData")}
c.Commands = &Commands{o: c.o.Get("commands")}
c.ContextMenus = NewContextMenus(c.o.Get("contextMenus"))
c.Cookies = &Cookies{o: c.o.Get("cookies")}
c.Debugger = &Debugger{o: c.o.Get("debugger")}
c.DeclarativeContent = NewDeclarativeContent(c.o.Get("declarativeContent"))
c.DesktopCapture = &DesktopCapture{o: c.o.Get("desktopCapture")}
c.Downloads = &Downloads{o: c.o.Get("downloads")}
c.Enterprise = NewEnterprise(c.o.Get("enterprise"))
c.Extension = NewExtension(c.o.Get("extension"))
c.FileBrowserHandler = &FileBrowserHandler{o: c.o.Get("fileBrowserHandler")}
c.FileSystemProvider = &FileSystemProvider{o: c.o.Get("fileSystemProvider")}
c.FontSettings = &FontSettings{o: c.o.Get("fontSettings")}
c.Gcm = NewGcm(c.o.Get("gcm"))
c.History = &History{o: c.o.Get("history")}
c.I18n = &I18n{o: c.o.Get("i18n")}
c.Identity = &Identity{o: c.o.Get("identity")}
c.Idle = &Idle{o: c.o.Get("idle")}
c.Input = NewInput(c.o.Get("input"))
c.Notification = &Notification{o: c.o.Get("notification")}
c.Omnibox = &Omnibox{o: c.o.Get("omnibox")}
c.PageAction = &PageAction{o: c.o.Get("pageAction")}
c.PageCapture = &PageCapture{o: c.o.Get("pageCapture")}
c.Permissions = &Permissions{o: c.o.Get("permissions")}
c.Power = &Power{o: c.o.Get("power")}
c.Privacy = NewPrivacy(c.o.Get("privacy"))
c.Proxy = NewProxy(c.o.Get("proxy"))
c.Runtime = NewRuntime(c.o.Get("runtime"))
c.Sessions = NewSessions(c.o.Get("sessions"))
c.Storage = NewStorage(c.o.Get("storage"))
c.System = NewSystem(c.o.Get("system"))
c.Tabs = &Tabs{o: c.o.Get("tabs")}
c.TabCapture = &TabCapture{o: c.o.Get("tabCapture")}
c.TopSites = &TopSites{o: c.o.Get("topSites")}
c.Tts = &Tts{o: c.o.Get("tts")}
c.TtsEngine = &TtsEngine{o: c.o.Get("ttsEngine")}
c.WebNavigation = &WebNavigation{o: c.o.Get("webNavigation")}
c.WebRequest = NewWebRequest(c.o.Get("webRequest"))
c.WebStore = &WebStore{o: c.o.Get("webstore")}
c.Windows = NewWindows(c.o.Get("windows"))
return c
}