| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 _innerShow: function() | 289 _innerShow: function() |
| 290 { | 290 { |
| 291 var menuObject = this._buildDescriptor(); | 291 var menuObject = this._buildDescriptor(); |
| 292 | 292 |
| 293 WebInspector._contextMenu = this; | 293 WebInspector._contextMenu = this; |
| 294 if (WebInspector.ContextMenu._useSoftMenu || InspectorFrontendHost.isHos
tedMode()) { | 294 if (WebInspector.ContextMenu._useSoftMenu || InspectorFrontendHost.isHos
tedMode()) { |
| 295 var softMenu = new WebInspector.SoftContextMenu(menuObject, this._it
emSelected.bind(this)); | 295 var softMenu = new WebInspector.SoftContextMenu(menuObject, this._it
emSelected.bind(this)); |
| 296 softMenu.show(this._event.target.ownerDocument, this._x, this._y); | 296 softMenu.show(this._event.target.ownerDocument, this._x, this._y); |
| 297 } else { | 297 } else { |
| 298 InspectorFrontendHost.showContextMenuAtPoint(this._x, this._y, menuO
bject); | 298 InspectorFrontendHost.showContextMenuAtPoint(this._x, this._y, menuO
bject, this._event.target.ownerDocument); |
| 299 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostA
PI.Events.ContextMenuCleared, this._menuCleared, this); | 299 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostA
PI.Events.ContextMenuCleared, this._menuCleared, this); |
| 300 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostA
PI.Events.ContextMenuItemSelected, this._onItemSelected, this); | 300 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostA
PI.Events.ContextMenuItemSelected, this._onItemSelected, this); |
| 301 } | 301 } |
| 302 }, | 302 }, |
| 303 | 303 |
| 304 /** | 304 /** |
| 305 * @param {number} id | 305 * @param {number} id |
| 306 * @param {function(?)} handler | 306 * @param {function(?)} handler |
| 307 */ | 307 */ |
| 308 _setHandler: function(id, handler) | 308 _setHandler: function(id, handler) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 365 } |
| 366 | 366 |
| 367 WebInspector.ContextMenu.Provider.prototype = { | 367 WebInspector.ContextMenu.Provider.prototype = { |
| 368 /** | 368 /** |
| 369 * @param {!Event} event | 369 * @param {!Event} event |
| 370 * @param {!WebInspector.ContextMenu} contextMenu | 370 * @param {!WebInspector.ContextMenu} contextMenu |
| 371 * @param {!Object} target | 371 * @param {!Object} target |
| 372 */ | 372 */ |
| 373 appendApplicableItems: function(event, contextMenu, target) { } | 373 appendApplicableItems: function(event, contextMenu, target) { } |
| 374 } | 374 } |
| OLD | NEW |