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

Side by Side Diff: chrome/renderer/resources/extensions/experimental.offscreenTabs_custom_bindings.js

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more progress Created 7 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Custom bindings for the experimental offscreenTabs API. 5 // Custom bindings for the experimental offscreenTabs API.
6 6
7 (function() { 7 var Bindings = require('schema_binding_generator').Bindings;
8 var bindings = new Bindings('experimental.offscreenTabs');
8 9
9 native function GetChromeHidden(); 10 bindings.registerCustomHook(
10
11 GetChromeHidden().registerCustomHook(
12 'experimental.offscreenTabs', function(api) { 11 'experimental.offscreenTabs', function(api) {
13 var apiFunctions = api.apiFunctions; 12 var apiFunctions = api.apiFunctions;
14 13
15 function maybeCopy(src, prop, dest) { 14 function maybeCopy(src, prop, dest) {
16 if (src[prop] !== undefined) 15 if (src[prop] !== undefined)
17 dest[prop] = src[prop]; 16 dest[prop] = src[prop];
18 }; 17 };
19 18
20 function keyboardEventFilter(e) { 19 function keyboardEventFilter(e) {
21 var result = { 20 var result = {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 52 }
54 53
55 apiFunctions.setUpdateArgumentsPreValidate( 54 apiFunctions.setUpdateArgumentsPreValidate(
56 'sendKeyboardEvent', 55 'sendKeyboardEvent',
57 function() { return validate(arguments, keyboardEventFilter); }); 56 function() { return validate(arguments, keyboardEventFilter); });
58 apiFunctions.setUpdateArgumentsPreValidate( 57 apiFunctions.setUpdateArgumentsPreValidate(
59 'sendMouseEvent', 58 'sendMouseEvent',
60 function() { return validate(arguments, mouseEventFilter); }); 59 function() { return validate(arguments, mouseEventFilter); });
61 }); 60 });
62 61
63 })(); 62 exports.bindings = bindings.generate();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698