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

Side by Side Diff: chrome/browser/resources/plugins.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 * Takes the |pluginsData| input argument which represents data about the 6 * Takes the |pluginsData| input argument which represents data about the
7 * currently installed/running plugins and populates the html jstemplate with 7 * currently installed/running plugins and populates the html jstemplate with
8 * that data. 8 * that data.
9 * @param {Object} pluginsData Detailed info about installed plugins. Same 9 * @param {Object} pluginsData Detailed info about installed plugins. Same
10 * expected format as returnPluginsData(). 10 * expected format as returnPluginsData().
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 * A promise to use for getting a reference to the proxy object allowing 269 * A promise to use for getting a reference to the proxy object allowing
270 * communication with the browser side. 270 * communication with the browser side.
271 * @type {!Promise} 271 * @type {!Promise}
272 */ 272 */
273 var whenBrowserProxyReady = new Promise(function(resolve, reject) { 273 var whenBrowserProxyReady = new Promise(function(resolve, reject) {
274 define([ 274 define([
275 'mojo/public/js/bindings', 275 'mojo/public/js/bindings',
276 'mojo/public/js/core', 276 'mojo/public/js/core',
277 'mojo/public/js/connection', 277 'mojo/public/js/connection',
278 'chrome/browser/ui/webui/plugins/plugins.mojom', 278 'chrome/browser/ui/webui/plugins/plugins.mojom',
279 'content/public/renderer/service_provider', 279 'content/public/renderer/frame_service_registry',
280 ], function(bindings, core, connection, pluginsMojom, serviceProvider) { 280 ], function(bindings, core, connection, pluginsMojom, serviceProvider) {
281 var browserProxy = connection.bindHandleToProxy( 281 var browserProxy = connection.bindHandleToProxy(
282 serviceProvider.connectToService( 282 serviceProvider.connectToService(
283 pluginsMojom.PluginsHandlerMojo.name), 283 pluginsMojom.PluginsHandlerMojo.name),
284 pluginsMojom.PluginsHandlerMojo); 284 pluginsMojom.PluginsHandlerMojo);
285 285
286 // Perform necessary setup for the C++ side to make calls to JS at will. 286 // Perform necessary setup for the C++ side to make calls to JS at will.
287 287
288 // Connect pipe handle to JS code. 288 // Connect pipe handle to JS code.
289 var pipe = core.createMessagePipe(); 289 var pipe = core.createMessagePipe();
(...skipping 26 matching lines...) Expand all
316 whenBrowserProxyReady 316 whenBrowserProxyReady
317 ]).then(function(results) { 317 ]).then(function(results) {
318 var browserProxy = results[1]; 318 var browserProxy = results[1];
319 browserProxy.getShowDetails().then(function(response) { 319 browserProxy.getShowDetails().then(function(response) {
320 // Set the |tmiModeExpanded| first otherwise the UI flickers when 320 // Set the |tmiModeExpanded| first otherwise the UI flickers when
321 // returnPlignsData executes. 321 // returnPlignsData executes.
322 loadShowDetailsFromPrefs(response.show_details); 322 loadShowDetailsFromPrefs(response.show_details);
323 return browserProxy.getPluginsData(); 323 return browserProxy.getPluginsData();
324 }).then(returnPluginsData); 324 }).then(returnPluginsData);
325 }); 325 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/omnibox/omnibox.js ('k') | content/renderer/mojo/service_registry_js_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698