Skip to content

Commit

Permalink
Merge pull request brave#9966 from brave/send-to-focused-window
Browse files Browse the repository at this point in the history
remove calls to `focusedWindow.webContents.send`
  • Loading branch information
NejcZdovc authored Aug 28, 2017
2 parents e691f76 + 93d6261 commit e1c2a24
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -1080,23 +1080,23 @@ function mainTemplateInit (nodeProps, frame, tab) {
enabled: tab.get('canGoBack'),
click: (item, focusedWindow) => {
if (focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_BACK)
CommonMenu.sendToFocusedWindow(focusedWindow, [messages.SHORTCUT_ACTIVE_FRAME_BACK])
}
}
}, {
label: locale.translation('forward'),
enabled: tab.get('canGoForward'),
click: (item, focusedWindow) => {
if (focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_FORWARD)
CommonMenu.sendToFocusedWindow(focusedWindow, [messages.SHORTCUT_ACTIVE_FRAME_FORWARD])
}
}
}, {
label: locale.translation('reloadPage'),
accelerator: 'CmdOrCtrl+R',
click: (item, focusedWindow) => {
if (focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_RELOAD)
CommonMenu.sendToFocusedWindow(focusedWindow, [messages.SHORTCUT_ACTIVE_FRAME_RELOAD])
}
}
},
Expand All @@ -1117,7 +1117,7 @@ function mainTemplateInit (nodeProps, frame, tab) {
label: locale.translation('find'),
accelerator: 'CmdOrCtrl+F',
click: function (item, focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_SHOW_FINDBAR)
CommonMenu.sendToFocusedWindow(focusedWindow, [messages.SHORTCUT_ACTIVE_FRAME_SHOW_FINDBAR])
}
})

Expand All @@ -1126,7 +1126,7 @@ function mainTemplateInit (nodeProps, frame, tab) {
label: locale.translation('print'),
accelerator: 'CmdOrCtrl+P',
click: function (item, focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_PRINT)
CommonMenu.sendToFocusedWindow(focusedWindow, [messages.SHORTCUT_ACTIVE_FRAME_PRINT])
}
})
}
Expand All @@ -1144,7 +1144,7 @@ function mainTemplateInit (nodeProps, frame, tab) {
accelerator: 'CmdOrCtrl+Alt+U',
click: (item, focusedWindow) => {
if (focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_VIEW_SOURCE)
CommonMenu.sendToFocusedWindow(focusedWindow, [messages.SHORTCUT_ACTIVE_FRAME_VIEW_SOURCE])
}
}
})
Expand Down

0 comments on commit e1c2a24

Please sign in to comment.