Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Custom binding for the Display Source API. | |
| 6 | |
| 7 var binding = require('binding').Binding.create('displaySource'); | |
| 8 var natives = requireNative('display_source'); | |
| 9 | |
| 10 binding.registerCustomHook(function(bindingsAPI, extensionId) { | |
| 11 var apiFunctions = bindingsAPI.apiFunctions; | |
| 12 apiFunctions.setHandleRequest('startSession', | |
| 13 function(sessionInfo) { | |
| 14 natives.StartSession(sessionInfo); | |
| 15 }); | |
| 16 apiFunctions.setHandleRequest('terminateSession', | |
| 17 function(session_id, callback) { | |
| 18 natives.TerminateSession(session_id, callback); | |
| 19 }); | |
| 20 }); | |
| 21 | |
| 22 exports.binding = binding.generate(); | |
|
Devlin
2015/12/01 17:48:37
Drive-by. This is a security bug. Don't use expo
| |
| OLD | NEW |