| OLD | NEW |
| 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 var connection; | 4 var connection; |
| 5 var mojo_api; | 5 var mojo_api; |
| 6 var input_focused_event; | 6 var input_focused_event; |
| 7 | 7 |
| 8 if (!chrome.virtualKeyboardPrivate) { | 8 if (!chrome.virtualKeyboardPrivate) { |
| 9 define('main', [ | 9 define('main', [ |
| 10 'mojo/public/js/bindings/connection', | 10 'mojo/public/js/connection', |
| 11 'ui/keyboard/webui/keyboard.mojom', | 11 'ui/keyboard/webui/keyboard.mojom', |
| 12 'content/public/renderer/service_provider', | 12 'content/public/renderer/service_provider', |
| 13 ], function(connector, keyboard, serviceProvider) { | 13 ], function(connector, keyboard, serviceProvider) { |
| 14 'use strict'; | 14 'use strict'; |
| 15 function KeyboardImpl(kbd) { | 15 function KeyboardImpl(kbd) { |
| 16 console.log('Creating KeyboardImpl'); | 16 console.log('Creating KeyboardImpl'); |
| 17 this.keyboard_ = kbd; | 17 this.keyboard_ = kbd; |
| 18 mojo_api = this; | 18 mojo_api = this; |
| 19 } | 19 } |
| 20 | 20 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 BrowserEvent.prototype.forEach = function(callback) { | 69 BrowserEvent.prototype.forEach = function(callback) { |
| 70 for (var i = 0; i < this.listeners_.length; ++i) | 70 for (var i = 0; i < this.listeners_.length; ++i) |
| 71 callback(this.listeners_[i]); | 71 callback(this.listeners_[i]); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 input_focused_event = new BrowserEvent; | 74 input_focused_event = new BrowserEvent; |
| 75 chrome.virtualKeyboardPrivate.onTextInputBoxFocused = input_focused_event; | 75 chrome.virtualKeyboardPrivate.onTextInputBoxFocused = input_focused_event; |
| 76 } | 76 } |
| OLD | NEW |