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

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

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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
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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 setImmediate(innerDispatch); 511 setImmediate(innerDispatch);
512 else 512 else
513 innerDispatch(); 513 innerDispatch();
514 514
515 function innerDispatch() 515 function innerDispatch()
516 { 516 {
517 // Single argument methods get dispatched with the param. 517 // Single argument methods get dispatched with the param.
518 if (signature.length < 2) { 518 if (signature.length < 2) {
519 try { 519 try {
520 InspectorFrontendHost.events.dispatchEventToListeners(na me, params[0]); 520 InspectorFrontendHost.events.dispatchEventToListeners(na me, params[0]);
521 } catch(e) { 521 } catch (e) {
522 console.error(e + " " + e.stack); 522 console.error(e + " " + e.stack);
523 } 523 }
524 return; 524 return;
525 } 525 }
526 var data = {}; 526 var data = {};
527 for (var i = 0; i < signature.length; ++i) 527 for (var i = 0; i < signature.length; ++i)
528 data[signature[i]] = params[i]; 528 data[signature[i]] = params[i];
529 try { 529 try {
530 InspectorFrontendHost.events.dispatchEventToListeners(name, data); 530 InspectorFrontendHost.events.dispatchEventToListeners(name, data);
531 } catch(e) { 531 } catch (e) {
532 console.error(e + " " + e.stack); 532 console.error(e + " " + e.stack);
533 } 533 }
534 } 534 }
535 }, 535 },
536 536
537 /** 537 /**
538 * @param {number} id 538 * @param {number} id
539 * @param {string} chunk 539 * @param {string} chunk
540 */ 540 */
541 streamWrite: function(id, chunk) 541 streamWrite: function(id, chunk)
542 { 542 {
543 WebInspector.ResourceLoader.streamWrite(id, chunk); 543 WebInspector.ResourceLoader.streamWrite(id, chunk);
544 } 544 }
545 } 545 }
546 546
547 // FIXME: This file is included into both apps, since the devtools_app needs the InspectorFrontendHostAPI only, 547 // FIXME: This file is included into both apps, since the devtools_app needs the InspectorFrontendHostAPI only,
548 // so the host instance should not initialized there. 548 // so the host instance should not initialized there.
549 initializeInspectorFrontendHost(); 549 initializeInspectorFrontendHost();
550 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl(); 550 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl();
551 WebInspector.setLocalizationPlatform(InspectorFrontendHost.platform()); 551 WebInspector.setLocalizationPlatform(InspectorFrontendHost.platform());
552 })(); 552 })();
553 553
554 /** 554 /**
555 * @type {!WebInspector.EventTarget} 555 * @type {!WebInspector.EventTarget}
556 */ 556 */
557 InspectorFrontendHost.events; 557 InspectorFrontendHost.events;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698