From 93d62619564b76ad6345fdbb7c882097a59e6208 Mon Sep 17 00:00:00 2001 From: bridiver Date: Tue, 11 Jul 2017 13:45:55 -0700 Subject: [PATCH] remove some calls to `focusedWindow.webContents.send` --- js/contextMenus.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/contextMenus.js b/js/contextMenus.js index 107767a10d3..da43b5c9854 100644 --- a/js/contextMenus.js +++ b/js/contextMenus.js @@ -1080,7 +1080,7 @@ 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]) } } }, { @@ -1088,7 +1088,7 @@ function mainTemplateInit (nodeProps, frame, tab) { 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]) } } }, { @@ -1096,7 +1096,7 @@ function mainTemplateInit (nodeProps, frame, tab) { accelerator: 'CmdOrCtrl+R', click: (item, focusedWindow) => { if (focusedWindow) { - focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_RELOAD) + CommonMenu.sendToFocusedWindow(focusedWindow, [messages.SHORTCUT_ACTIVE_FRAME_RELOAD]) } } }, @@ -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]) } }) @@ -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]) } }) } @@ -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]) } } })