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

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

Issue 1827473002: Make the process-wide ServiceRegistry available to JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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.
11 * 11 *
12 * The simple object defined in this javascript file listens for 12 * The simple object defined in this javascript file listens for
13 * certain events on omnibox.html, sends (when appropriate) the 13 * certain events on omnibox.html, sends (when appropriate) the
14 * input text to C++ code to start the omnibox autcomplete controller 14 * input text to C++ code to start the omnibox autcomplete controller
15 * working, and listens from callbacks from the C++ code saying that 15 * working, and listens from callbacks from the C++ code saying that
16 * results are available. When results (possibly intermediate ones) 16 * results are available. When results (possibly intermediate ones)
17 * are available, the Javascript formats them and displays them. 17 * are available, the Javascript formats them and displays them.
18 */ 18 */
19 define('main', [ 19 define('main', [
20 'mojo/public/js/bindings', 20 'mojo/public/js/bindings',
21 'mojo/public/js/core', 21 'mojo/public/js/core',
22 'mojo/public/js/connection', 22 'mojo/public/js/connection',
23 'chrome/browser/ui/webui/omnibox/omnibox.mojom', 23 'chrome/browser/ui/webui/omnibox/omnibox.mojom',
24 'content/public/renderer/service_provider', 24 'content/public/renderer/frame_service_registry',
25 ], function(bindings, core, connection, browser, serviceProvider) { 25 ], function(bindings, core, connection, browser, serviceProvider) {
26 'use strict'; 26 'use strict';
27 27
28 var page; 28 var page;
29 29
30 /** 30 /**
31 * Register our event handlers. 31 * Register our event handlers.
32 */ 32 */
33 function initialize() { 33 function initialize() {
34 $('omnibox-input-form').addEventListener( 34 $('omnibox-input-form').addEventListener(
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 }; 435 };
436 436
437 return function() { 437 return function() {
438 var browserProxy = connection.bindHandleToProxy( 438 var browserProxy = connection.bindHandleToProxy(
439 serviceProvider.connectToService( 439 serviceProvider.connectToService(
440 browser.OmniboxUIHandlerMojo.name), 440 browser.OmniboxUIHandlerMojo.name),
441 browser.OmniboxUIHandlerMojo); 441 browser.OmniboxUIHandlerMojo);
442 page = new OmniboxPageImpl(browserProxy); 442 page = new OmniboxPageImpl(browserProxy);
443 }; 443 };
444 }); 444 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/engagement/site_engagement.js ('k') | chrome/browser/resources/plugins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698