-
lazyboy authored
Expose <webview>.contextMenus.onShow chrome EventTarget like object so one can "addListener" that can preventDefault() to cancel bringing up <webview> context menu. BUG=465733 Test=Open a chrome app with <webview>. E.g. Load a <webview> in a chrome app, e.g. the browser sample app: https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/webview-samples/browser Right click on the <webview>, context menu is expected to be shown. Now open the app's inspector: from chrome://inspect, switch to "Apps" then select to inspect "Browser sample". Register a listener to disable context menu: document.querySelector('webview').contextMenus.onShow.addListener(function(e) { e.preventDefault(); }); Right click on the <webview> again, context menu should not show up. Review URL: https://codereview.chromium.org/1026383003 Cr-Commit-Position: refs/heads/master@{#322477}
51428658