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

Side by Side Diff: extensions/renderer/resources/binding.js

Issue 411733002: WIP: diff which plumbs through the event URL. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « extensions/renderer/event_bindings.cc ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 var Event = require('event_bindings').Event; 5 var Event = require('event_bindings').Event;
6 var forEach = require('utils').forEach; 6 var forEach = require('utils').forEach;
7 var GetAvailability = requireNative('v8_context').GetAvailability; 7 var GetAvailability = requireNative('v8_context').GetAvailability;
8 var logActivity = requireNative('activityLogger'); 8 var logActivity = requireNative('activityLogger');
9 var logging = requireNative('logging'); 9 var logging = requireNative('logging');
10 var process = requireNative('process'); 10 var process = requireNative('process');
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 425
426 // The special case is runtime.lastError which is only occasionally set, so 426 // The special case is runtime.lastError which is only occasionally set, so
427 // specifically check its availability. 427 // specifically check its availability.
428 if (schema.namespace == 'runtime' && 428 if (schema.namespace == 'runtime' &&
429 GetAvailability('runtime.lastError').is_available) { 429 GetAvailability('runtime.lastError').is_available) {
430 success = true; 430 success = true;
431 } 431 }
432 432
433 if (!success) { 433 if (!success) {
434 // If an API was available it should have been successfully generated. 434 // If an API was available it should have been successfully generated.
435 logging.DCHECK(!GetAvailability(schema.namespace).is_available); 435 var availability = GetAvailability(schema.namespace);
436 logging.DCHECK(!availability.is_available);
436 console.error('chrome.' + schema.namespace + ' is not available: ' + 437 console.error('chrome.' + schema.namespace + ' is not available: ' +
437 availability.message); 438 availability.message);
438 return; 439 return;
439 } 440 }
440 441
441 this.runHooks_(mod); 442 this.runHooks_(mod);
442 return mod; 443 return mod;
443 } 444 }
444 }; 445 };
445 446
446 exports.Binding = Binding; 447 exports.Binding = Binding;
OLDNEW
« no previous file with comments | « extensions/renderer/event_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698