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

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

Issue 651783004: DevTools: REGRESSION: can not copy Link address in console (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: for landing 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/Toolbox.js ('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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event s.SetUseSoftMenu, setUseSoftMenu); 217 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event s.SetUseSoftMenu, setUseSoftMenu);
218 /** 218 /**
219 * @param {!WebInspector.Event} event 219 * @param {!WebInspector.Event} event
220 */ 220 */
221 function setUseSoftMenu(event) 221 function setUseSoftMenu(event)
222 { 222 {
223 WebInspector.ContextMenu._useSoftMenu = /** @type {boolean} */ (event.da ta); 223 WebInspector.ContextMenu._useSoftMenu = /** @type {boolean} */ (event.da ta);
224 } 224 }
225 } 225 }
226 226
227 /**
228 * @param {!Document} doc
229 */
230 WebInspector.ContextMenu.installHandler = function(doc)
231 {
232 doc.body.addEventListener("contextmenu", handler, false);
233
234 /**
235 * @param {!Event} event
236 */
237 function handler(event)
238 {
239 var contextMenu = new WebInspector.ContextMenu(event);
240 contextMenu.appendApplicableItems(/** @type {!Object} */ (event.target)) ;
241 contextMenu.show();
242 }
243 }
244
227 WebInspector.ContextMenu.prototype = { 245 WebInspector.ContextMenu.prototype = {
228 /** 246 /**
229 * @return {number} 247 * @return {number}
230 */ 248 */
231 nextId: function() 249 nextId: function()
232 { 250 {
233 return this._id++; 251 return this._id++;
234 }, 252 },
235 253
236 show: function() 254 show: function()
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 367 }
350 368
351 WebInspector.ContextMenu.Provider.prototype = { 369 WebInspector.ContextMenu.Provider.prototype = {
352 /** 370 /**
353 * @param {!Event} event 371 * @param {!Event} event
354 * @param {!WebInspector.ContextMenu} contextMenu 372 * @param {!WebInspector.ContextMenu} contextMenu
355 * @param {!Object} target 373 * @param {!Object} target
356 */ 374 */
357 appendApplicableItems: function(event, contextMenu, target) { } 375 appendApplicableItems: function(event, contextMenu, target) { }
358 } 376 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/toolbox_bootstrap/Toolbox.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698