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

Side by Side Diff: chrome/browser/resources/file_manager/js/util.js

Issue 9567003: Prevented default backspace handler in File Browser Gallery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 8 years, 9 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 | « chrome/browser/resources/file_manager/js/image_editor/image_editor.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * Namespace for utility functions. 6 * Namespace for utility functions.
7 */ 7 */
8 var util = { 8 var util = {
9 /** 9 /**
10 * Returns a function that console.log's its arguments, prefixed by |msg|. 10 * Returns a function that console.log's its arguments, prefixed by |msg|.
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 for (var i = 2; i < arguments.length; i++) { 467 for (var i = 2; i < arguments.length; i++) {
468 var arg = arguments[i]; 468 var arg = arguments[i];
469 if (typeof(arg) == 'string') { 469 if (typeof(arg) == 'string') {
470 element.appendChild(document.createTextNode(arg)); 470 element.appendChild(document.createTextNode(arg));
471 } else { 471 } else {
472 element.appendChild(arg); 472 element.appendChild(arg);
473 } 473 }
474 } 474 }
475 475
476 return element; 476 return element;
477 },
478
479 /**
480 * Returns a string '[Ctrl-][Alt-][Shift-][Meta-]' depending on the event
481 * modifiers. Convenient for writing out conditions in keyboard handlers.
482 *
483 * @param {Event} event
484 * @return {string}
485 */
486 getKeyModifiers: function(event) {
487 return (event.ctrlKey ? 'Ctrl-' : '') +
488 (event.altKey ? 'Alt-' : '') +
489 (event.shiftKey ? 'Shift-' : '') +
490 (event.metaKey ? 'Meta-' : '');
477 } 491 }
478 }; 492 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/image_editor/image_editor.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698