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

Side by Side Diff: ports/gdb/extension/background.js

Issue 1415743013: Run jshint over all JavaScript files (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@repo_conf
Patch Set: Created 5 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
« no previous file with comments | « ports/gdb/background.js ('k') | ports/gdb/extension/main.js » ('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) 2014 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 'use strict'; 7 'use strict';
8 8
9 // The background page of the debugger extension has a few purposes: 9 // The background page of the debugger extension has a few purposes:
10 // - Track and react to nacl process create / exit / suspend. 10 // - Track and react to nacl process create / exit / suspend.
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 }); 286 });
287 287
288 // Drop the listener on disconnect. 288 // Drop the listener on disconnect.
289 port.onDisconnect.addListener(function() { 289 port.onDisconnect.addListener(function() {
290 delete g_listeners[id]; 290 delete g_listeners[id];
291 }); 291 });
292 292
293 // Announce the new module. 293 // Announce the new module.
294 notifyListeners('join'); 294 notifyListeners('join');
295 }; 295 }
296 296
297 /** 297 /**
298 * Listen for internal connection events (from main.js). 298 * Listen for internal connection events (from main.js).
299 */ 299 */
300 chrome.runtime.onConnect.addListener(handleConnect); 300 chrome.runtime.onConnect.addListener(handleConnect);
301 301
302 /** 302 /**
303 * Allow an external connection only for testing and install check. 303 * Allow an external connection only for testing and install check.
304 */ 304 */
305 chrome.runtime.onConnectExternal.addListener(function(port) { 305 chrome.runtime.onConnectExternal.addListener(function(port) {
306 // Check the sender only when not in testing mode. 306 // Check the sender only when not in testing mode.
307 if (navigator.userAgent.indexOf('ChromeTestAgent/') < 0) { 307 if (navigator.userAgent.indexOf('ChromeTestAgent/') < 0) {
308 // Reject if the sender is an extension (unsupported for now). 308 // Reject if the sender is an extension (unsupported for now).
309 // Allow urls (as we're only whitelisting the install page). 309 // Allow urls (as we're only whitelisting the install page).
310 if (port.sender.id !== undefined) { 310 if (port.sender.id !== undefined) {
311 port.disconnect(); 311 port.disconnect();
312 return; 312 return;
313 } 313 }
314 } 314 }
315 handleConnect(port); 315 handleConnect(port);
316 }); 316 });
OLDNEW
« no previous file with comments | « ports/gdb/background.js ('k') | ports/gdb/extension/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698