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

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

Issue 1680743006: [Media Router] Show user email in header if cloud sink is present. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address final comments Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <include src="media_router_data.js"> 5 <include src="media_router_data.js">
6 <include src="media_router_ui_interface.js"> 6 <include src="media_router_ui_interface.js">
7 7
8 // Handles user events for the Media Router UI. 8 // Handles user events for the Media Router UI.
9 cr.define('media_router', function() { 9 cr.define('media_router', function() {
10 'use strict'; 10 'use strict';
(...skipping 10 matching lines...) Expand all
21 21
22 /** 22 /**
23 * Initializes the Media Router WebUI and requests initial media 23 * Initializes the Media Router WebUI and requests initial media
24 * router content, such as the media sink and media route lists. 24 * router content, such as the media sink and media route lists.
25 */ 25 */
26 function initialize() { 26 function initialize() {
27 media_router.browserApi.requestInitialData(); 27 media_router.browserApi.requestInitialData();
28 28
29 container = /** @type {!MediaRouterContainerElement} */ 29 container = /** @type {!MediaRouterContainerElement} */
30 ($('media-router-container')); 30 ($('media-router-container'));
31 media_router.ui.setContainer(container); 31
32 media_router.ui.setElements(container,
33 /** @type {!MediaRouterHeaderElement} */
34 (container.$['container-header']));
32 35
33 container.addEventListener('acknowledge-first-run-flow', 36 container.addEventListener('acknowledge-first-run-flow',
34 onAcknowledgeFirstRunFlow); 37 onAcknowledgeFirstRunFlow);
35 container.addEventListener('back-click', onNavigateToSinkList); 38 container.addEventListener('back-click', onNavigateToSinkList);
36 container.addEventListener('cast-mode-selected', onCastModeSelected); 39 container.addEventListener('cast-mode-selected', onCastModeSelected);
37 container.addEventListener('close-button-click', onCloseDialogEvent); 40 container.addEventListener('close-button-click', onCloseDialogEvent);
38 container.addEventListener('close-dialog', onCloseDialogEvent); 41 container.addEventListener('close-dialog', onCloseDialogEvent);
39 container.addEventListener('close-route-click', onCloseRouteClick); 42 container.addEventListener('close-route-click', onCloseRouteClick);
40 container.addEventListener('create-route', onCreateRoute); 43 container.addEventListener('create-route', onCreateRoute);
41 container.addEventListener('issue-action-click', onIssueActionClick); 44 container.addEventListener('issue-action-click', onIssueActionClick);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 var detail = event.detail; 296 var detail = event.detail;
294 media_router.browserApi.reportSinkCount(detail.sinkCount); 297 media_router.browserApi.reportSinkCount(detail.sinkCount);
295 } 298 }
296 299
297 return { 300 return {
298 initialize: initialize, 301 initialize: initialize,
299 }; 302 };
300 }); 303 });
301 304
302 window.addEventListener('load', media_router.initialize); 305 window.addEventListener('load', media_router.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698