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

Side by Side Diff: Source/devtools/front_end/host/InspectorFrontendHost.js

Issue 702583003: DevTools: handle zoom shortcuts in hosted mode on Mac OS X (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 * @suppressGlobalPropertiesCheck 299 * @suppressGlobalPropertiesCheck
300 */ 300 */
301 WebInspector.InspectorFrontendHostStub = function() 301 WebInspector.InspectorFrontendHostStub = function()
302 { 302 {
303 /** 303 /**
304 * @param {!Event} event 304 * @param {!Event} event
305 */ 305 */
306 function stopEventPropagation(event) 306 function stopEventPropagation(event)
307 { 307 {
308 // Let browser handle Ctrl+/Ctrl- shortcuts in hosted mode. 308 // Let browser handle Ctrl+/Ctrl- shortcuts in hosted mode.
309 if (event.ctrlKey && (event.keyCode === 187 || event.keyCode === 189)) 309 var zoomModifier = WebInspector.isMac() ? event.metaKey : event.ctrlKey;
310 if (zoomModifier && (event.keyCode === 187 || event.keyCode === 189))
310 event.stopPropagation(); 311 event.stopPropagation();
311 } 312 }
312 document.addEventListener("keydown", stopEventPropagation, true); 313 document.addEventListener("keydown", stopEventPropagation, true);
313 } 314 }
314 315
315 WebInspector.InspectorFrontendHostStub.prototype = { 316 WebInspector.InspectorFrontendHostStub.prototype = {
316 /** 317 /**
317 * @return {string} 318 * @return {string}
318 */ 319 */
319 getSelectionBackgroundColor: function() 320 getSelectionBackgroundColor: function()
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 * @param {number} id 702 * @param {number} id
702 * @param {?string} error 703 * @param {?string} error
703 */ 704 */
704 embedderMessageAck: function(id, error) 705 embedderMessageAck: function(id, error)
705 { 706 {
706 InspectorFrontendHost["embedderMessageAck"](id, error); 707 InspectorFrontendHost["embedderMessageAck"](id, error);
707 } 708 }
708 } 709 }
709 710
710 var InspectorFrontendAPI = new InspectorFrontendAPIImpl(); 711 var InspectorFrontendAPI = new InspectorFrontendAPIImpl();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698