Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: Source/devtools/front_end/ui/ContextMenu.js

Issue 653613002: [DevTools] Inject element into toolbox window, do not load modules there. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/toolbox_bootstrap/module.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/toolbox_bootstrap/module.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698