Chromium Code Reviews| Index: chrome/renderer/resources/extensions/automation_custom_bindings.js |
| diff --git a/chrome/renderer/resources/extensions/automation_custom_bindings.js b/chrome/renderer/resources/extensions/automation_custom_bindings.js |
| index b63bf85c30871f797b77f79f8ad983e9d86031c0..8d8b9399abf5fff5241dd17f555edea69d7836c9 100644 |
| --- a/chrome/renderer/resources/extensions/automation_custom_bindings.js |
| +++ b/chrome/renderer/resources/extensions/automation_custom_bindings.js |
| @@ -11,6 +11,8 @@ var automationInternal = |
| var eventBindings = require('event_bindings'); |
| var Event = eventBindings.Event; |
| var lastError = require('lastError'); |
| +var schema = |
| + requireNative('automationInternal').GetSchemaAdditions(); |
| // TODO(aboxhall): Look into using WeakMap |
| var idToAutomationTree = {}; |
| @@ -112,3 +114,8 @@ automationInternal.onAccessibilityEvent.addListener(function(data) { |
| }); |
| exports.binding = automation.generate(); |
| + |
| +// Additional bindings adopted from Accessibility. |
| +exports.binding.Event = schema.Event; |
| +exports.binding.Role = schema.Role; |
| +exports.binding.State = schema.State; |
|
not at google - send to devlin
2014/05/29 18:26:21
you could go:
forEach(schema, function(k, v) {
aboxhall
2014/05/29 18:35:49
-1 current code has same number of lines and is mo
not at google - send to devlin
2014/05/29 18:45:50
I don't think it's the job of this code to know wh
David Tseng
2014/05/29 19:04:40
Do you feel strongly? I could go either way on thi
not at google - send to devlin
2014/05/29 19:48:14
I rarely feel strongly to push back on a push back
David Tseng
2014/05/29 22:12:25
Ok; I've left a better comment. Also, I think we m
|