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

Side by Side Diff: Source/devtools/front_end/ExtensionServer.js

Issue 20034002: Add support for KeyboardEvent.location attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/ExtensionAPI.js ('k') | Source/web/WebInputEventConversion.cpp » ('j') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 _onForwardKeyboardEvent: function(message) 573 _onForwardKeyboardEvent: function(message)
574 { 574 {
575 const Esc = "U+001B"; 575 const Esc = "U+001B";
576 576
577 if (!message.ctrlKey && !message.altKey && !message.metaKey && !/^F\d+$/ .test(message.keyIdentifier) && message.keyIdentifier !== Esc) 577 if (!message.ctrlKey && !message.altKey && !message.metaKey && !/^F\d+$/ .test(message.keyIdentifier) && message.keyIdentifier !== Esc)
578 return; 578 return;
579 // Fool around closure compiler -- it has its own notion of both Keyboar dEvent constructor 579 // Fool around closure compiler -- it has its own notion of both Keyboar dEvent constructor
580 // and initKeyboardEvent methods and overriding these in externs.js does not have effect. 580 // and initKeyboardEvent methods and overriding these in externs.js does not have effect.
581 var event = new window.KeyboardEvent(message.eventType, { 581 var event = new window.KeyboardEvent(message.eventType, {
582 keyIdentifier: message.keyIdentifier, 582 keyIdentifier: message.keyIdentifier,
583 keyLocation: message.keyLocation, 583 location: message.location,
584 ctrlKey: message.ctrlKey, 584 ctrlKey: message.ctrlKey,
585 altKey: message.altKey, 585 altKey: message.altKey,
586 shiftKey: message.shiftKey, 586 shiftKey: message.shiftKey,
587 metaKey: message.metaKey 587 metaKey: message.metaKey
588 }); 588 });
589 document.dispatchEvent(event); 589 document.dispatchEvent(event);
590 }, 590 },
591 591
592 _dispatchCallback: function(requestId, port, result) 592 _dispatchCallback: function(requestId, port, result)
593 { 593 {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 901
902 WebInspector.extensionServer = new WebInspector.ExtensionServer(); 902 WebInspector.extensionServer = new WebInspector.ExtensionServer();
903 903
904 window.addExtension = function(page, name) 904 window.addExtension = function(page, name)
905 { 905 {
906 WebInspector.extensionServer._addExtension({ 906 WebInspector.extensionServer._addExtension({
907 startPage: page, 907 startPage: page,
908 name: name, 908 name: name,
909 }); 909 });
910 } 910 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ExtensionAPI.js ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698