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

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

Issue 663083004: [DevTools] Remove remaining usages of global properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments 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
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 }, 287 },
288 288
289 _innerShow: function() 289 _innerShow: function()
290 { 290 {
291 var menuObject = this._buildDescriptor(); 291 var menuObject = this._buildDescriptor();
292 292
293 if (menuObject.length) { 293 if (menuObject.length) {
294 WebInspector._contextMenu = this; 294 WebInspector._contextMenu = this;
295 if (WebInspector.ContextMenu._useSoftMenu || InspectorFrontendHost.i sHostedMode()) { 295 if (WebInspector.ContextMenu._useSoftMenu || InspectorFrontendHost.i sHostedMode()) {
296 var softMenu = new WebInspector.SoftContextMenu(menuObject, this ._itemSelected.bind(this)); 296 var softMenu = new WebInspector.SoftContextMenu(menuObject, this ._itemSelected.bind(this));
297 softMenu.show(this._x, this._y); 297 softMenu.show(this._event.target.ownerDocument, this._x, this._y );
298 } else { 298 } else {
299 InspectorFrontendHost.showContextMenuAtPoint(this._x, this._y, m enuObject); 299 InspectorFrontendHost.showContextMenuAtPoint(this._x, this._y, m enuObject);
300 InspectorFrontendHost.events.addEventListener(InspectorFrontendH ostAPI.Events.ContextMenuCleared, this._menuCleared, this); 300 InspectorFrontendHost.events.addEventListener(InspectorFrontendH ostAPI.Events.ContextMenuCleared, this._menuCleared, this);
301 InspectorFrontendHost.events.addEventListener(InspectorFrontendH ostAPI.Events.ContextMenuItemSelected, this._onItemSelected, this); 301 InspectorFrontendHost.events.addEventListener(InspectorFrontendH ostAPI.Events.ContextMenuItemSelected, this._onItemSelected, this);
302 } 302 }
303 } 303 }
304 }, 304 },
305 305
306 /** 306 /**
307 * @param {number} id 307 * @param {number} id
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 368
369 WebInspector.ContextMenu.Provider.prototype = { 369 WebInspector.ContextMenu.Provider.prototype = {
370 /** 370 /**
371 * @param {!Event} event 371 * @param {!Event} event
372 * @param {!WebInspector.ContextMenu} contextMenu 372 * @param {!WebInspector.ContextMenu} contextMenu
373 * @param {!Object} target 373 * @param {!Object} target
374 */ 374 */
375 appendApplicableItems: function(event, contextMenu, target) { } 375 appendApplicableItems: function(event, contextMenu, target) { }
376 } 376 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/toolbox_bootstrap/Toolbox.js ('k') | Source/devtools/front_end/ui/DOMExtension.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698