| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Implementation of custom bindings for the contextMenus API. | 5 // Implementation of custom bindings for the contextMenus API. |
| 6 // This is used to implement the contextMenus API for extensions and for the | 6 // This is used to implement the contextMenus API for extensions and for the |
| 7 // <webview> tag (see chrome_web_view_experimental.js). | 7 // <webview> tag (see chrome_web_view_experimental.js). |
| 8 | 8 |
| 9 var contextMenuNatives = requireNative('context_menus'); | 9 var contextMenuNatives = requireNative('context_menus'); |
| 10 var sendRequest = require('sendRequest').sendRequest; | 10 var sendRequest = require('sendRequest').sendRequest; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 callbacks.removeAll = createCustomCallback(function(instanceId) { | 131 callbacks.removeAll = createCustomCallback(function(instanceId) { |
| 132 delete contextMenus.handlers[instanceId]; | 132 delete contextMenus.handlers[instanceId]; |
| 133 }); | 133 }); |
| 134 | 134 |
| 135 return { | 135 return { |
| 136 requestHandlers: requestHandlers, | 136 requestHandlers: requestHandlers, |
| 137 callbacks: callbacks | 137 callbacks: callbacks |
| 138 }; | 138 }; |
| 139 } | 139 } |
| 140 | 140 |
| 141 exports.create = createContextMenusHandlers; | 141 exports.$set('create', createContextMenusHandlers); |
| OLD | NEW |