Add a frameId key to chrome.contextMenus.onClicked event [1] where the frameUrl parameter is set, so that it can be used (together with tabId) to identify the frame where the event originates from. [1] https://developer.chrome.com/extensions/contextMenus#event-onClicked
CL: https://codereview.chromium.org/1772513002/
cc myself and some extension folks. Antony, I think you did the original context menu API. Do you or Devlin have any issues with this change to the API? Are frame IDs exposed to extensions anywhere else?
We expose and/or use frame id's in the webnavigation and tabs APIs. I think it's fine to include them in contextMenus also.
Agreed.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cbe35bac4f296de200b2821d8406d921b83956ba commit cbe35bac4f296de200b2821d8406d921b83956ba Author: rob <rob@robwu.nl> Date: Thu Mar 10 01:20:49 2016 Add frameId to contextMenus.onClicked / onclick. BUG= 592250 TEST=./browser_tests --gtest_filter=ExtensionContextMenuBrowserTest.ClickInFrame:ExtensionContextMenuBrowserLazyTest.EventPage Review URL: https://codereview.chromium.org/1772513002 Cr-Commit-Position: refs/heads/master@{#380284} [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/extensions/context_menu_matcher.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/extensions/context_menu_matcher.h [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/extensions/extension_context_menu_browsertest.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/extensions/extension_context_menu_model.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/extensions/menu_manager.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/extensions/menu_manager.h [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/extensions/menu_manager_unittest.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/renderer_context_menu/render_view_context_menu.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/ui/app_list/extension_app_context_menu.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/browser/ui/ash/launcher/launcher_context_menu.cc [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/common/extensions/api/context_menus_internal.json [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/test/data/extensions/context_menus/event_page/test.js [modify] https://crrev.com/cbe35bac4f296de200b2821d8406d921b83956ba/chrome/test/data/extensions/context_menus/frames/test.js
Implemented, nothing else to do here.
Comment 1 by rob@robwu.nl
, Mar 6 2016Status: Started (was: Assigned)