| OLD | NEW |
| 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 /** | 5 /** |
| 6 * Javascript for omnibox.html, served from chrome://omnibox/ | 6 * Javascript for omnibox.html, served from chrome://omnibox/ |
| 7 * This is used to debug omnibox ranking. The user enters some text | 7 * This is used to debug omnibox ranking. The user enters some text |
| 8 * into a box, submits it, and then sees lots of debug information | 8 * into a box, submits it, and then sees lots of debug information |
| 9 * from the autocompleter that shows what omnibox would do with that | 9 * from the autocompleter that shows what omnibox would do with that |
| 10 * input. | 10 * input. |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 } | 419 } |
| 420 } | 420 } |
| 421 | 421 |
| 422 function OmniboxPageImpl(browser) { | 422 function OmniboxPageImpl(browser) { |
| 423 this.browser_ = browser; | 423 this.browser_ = browser; |
| 424 page = this; | 424 page = this; |
| 425 initialize(); | 425 initialize(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 OmniboxPageImpl.prototype = | 428 OmniboxPageImpl.prototype = |
| 429 Object.create(browser.OmniboxPageStub.prototype); | 429 Object.create(browser.OmniboxPage.stubClass.prototype); |
| 430 | 430 |
| 431 OmniboxPageImpl.prototype.handleNewAutocompleteResult = function(result) { | 431 OmniboxPageImpl.prototype.handleNewAutocompleteResult = function(result) { |
| 432 progressiveAutocompleteResults.push(result); | 432 progressiveAutocompleteResults.push(result); |
| 433 refresh(); | 433 refresh(); |
| 434 }; | 434 }; |
| 435 | 435 |
| 436 return function() { | 436 return function() { |
| 437 connection = new connector.Connection( | 437 connection = new connector.Connection( |
| 438 // TODO(sammc): Avoid using NAME_ directly. | |
| 439 serviceProvider.connectToService( | 438 serviceProvider.connectToService( |
| 440 browser.OmniboxUIHandlerMojoProxy.NAME_), | 439 browser.OmniboxUIHandlerMojo.name), |
| 441 OmniboxPageImpl, | 440 OmniboxPageImpl, |
| 442 browser.OmniboxUIHandlerMojoProxy); | 441 browser.OmniboxUIHandlerMojo.proxyClass); |
| 443 }; | 442 }; |
| 444 }); | 443 }); |
| OLD | NEW |