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

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

Issue 12313142: Revert 184837 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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
Property Changes:
Deleted: svn:mime-type
- text/javascript
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 binding for the experimental offscreenTabs API. 5 // Custom bindings for the experimental offscreenTabs API.
6 6
7 var binding = require('binding').Binding.create('experimental.offscreenTabs'); 7 (function() {
8 8
9 binding.registerCustomHook( 9 native function GetChromeHidden();
10
11 GetChromeHidden().registerCustomHook(
10 'experimental.offscreenTabs', function(api) { 12 'experimental.offscreenTabs', function(api) {
11 var apiFunctions = api.apiFunctions; 13 var apiFunctions = api.apiFunctions;
12 14
13 function maybeCopy(src, prop, dest) { 15 function maybeCopy(src, prop, dest) {
14 if (src[prop] !== undefined) 16 if (src[prop] !== undefined)
15 dest[prop] = src[prop]; 17 dest[prop] = src[prop];
16 }; 18 };
17 19
18 function keyboardEventFilter(e) { 20 function keyboardEventFilter(e) {
19 var result = { 21 var result = {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 53 }
52 54
53 apiFunctions.setUpdateArgumentsPreValidate( 55 apiFunctions.setUpdateArgumentsPreValidate(
54 'sendKeyboardEvent', 56 'sendKeyboardEvent',
55 function() { return validate(arguments, keyboardEventFilter); }); 57 function() { return validate(arguments, keyboardEventFilter); });
56 apiFunctions.setUpdateArgumentsPreValidate( 58 apiFunctions.setUpdateArgumentsPreValidate(
57 'sendMouseEvent', 59 'sendMouseEvent',
58 function() { return validate(arguments, mouseEventFilter); }); 60 function() { return validate(arguments, mouseEventFilter); });
59 }); 61 });
60 62
61 exports.binding = binding.generate(); 63 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698