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

Side by Side Diff: chrome/browser/resources/omnibox/omnibox.js

Issue 628763002: Mojo JS bindings: simplify mojo.connectToService() usage - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed template indentation Created 6 years, 2 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
« no previous file with comments | « no previous file | content/test/data/web_ui_mojo.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 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
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 });
OLDNEW
« no previous file with comments | « no previous file | content/test/data/web_ui_mojo.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698