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

Side by Side Diff: chrome/browser/resources/media_router/media_router_ui_interface.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: More adjustments to get dynamic height change working and updated domain handling. 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 // API invoked by the browser MediaRouterWebUIMessageHandler to communicate 5 // API invoked by the browser MediaRouterWebUIMessageHandler to communicate
6 // with this UI. 6 // with this UI.
7 cr.define('media_router.ui', function() { 7 cr.define('media_router.ui', function() {
8 'use strict'; 8 'use strict';
9 9
10 // The media-router-container element. 10 // The media-router-container element.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 /** 44 /**
45 * Populates the WebUI with data obtained from Media Router. 45 * Populates the WebUI with data obtained from Media Router.
46 * 46 *
47 * @param {{firstRunFlowCloudPrefLearnMoreUrl: string, 47 * @param {{firstRunFlowCloudPrefLearnMoreUrl: string,
48 * firstRunFlowLearnMoreUrl: string, 48 * firstRunFlowLearnMoreUrl: string,
49 * deviceMissingUrl: string, 49 * deviceMissingUrl: string,
50 * sinks: !Array<!media_router.Sink>, 50 * sinks: !Array<!media_router.Sink>,
51 * routes: !Array<!media_router.Route>, 51 * routes: !Array<!media_router.Route>,
52 * castModes: !Array<!media_router.CastMode>, 52 * castModes: !Array<!media_router.CastMode>,
53 * wasFirstRunFlowAcknowledged: boolean, 53 * wasFirstRunFlowAcknowledged: boolean,
54 * userEmail: string,
55 * userDomain: string,
56 * showEmail: boolean,
54 * showFirstRunFlowCloudPref: boolean}} data 57 * showFirstRunFlowCloudPref: boolean}} data
55 * Parameters in data: 58 * Parameters in data:
56 * firstRunFlowCloudPrefLearnMoreUrl - url to open when the cloud services 59 * firstRunFlowCloudPrefLearnMoreUrl - url to open when the cloud services
57 * pref learn more link is clicked. 60 * pref learn more link is clicked.
58 * firstRunFlowLearnMoreUrl - url to open when the first run flow learn 61 * firstRunFlowLearnMoreUrl - url to open when the first run flow learn
59 * more link is clicked. 62 * more link is clicked.
60 * deviceMissingUrl - url to be opened on "Device missing?" clicked. 63 * deviceMissingUrl - url to be opened on "Device missing?" clicked.
61 * sinks - list of sinks to be displayed. 64 * sinks - list of sinks to be displayed.
62 * routes - list of routes that are associated with the sinks. 65 * routes - list of routes that are associated with the sinks.
63 * castModes - list of available cast modes. 66 * castModes - list of available cast modes.
64 * wasFirstRunFlowAcknowledged - true if first run flow was previously 67 * wasFirstRunFlowAcknowledged - true if first run flow was previously
65 * acknowledged by user. 68 * acknowledged by user.
69 * userEmail - The email of the user if the user is signed in.
70 * userDomain - The domain of the user if the user is signed in.
71 * showEmail - true if the user email should be shown.
66 * showFirstRunFlowCloudPref - true if the cloud pref option should be 72 * showFirstRunFlowCloudPref - true if the cloud pref option should be
67 * shown. 73 * shown.
68 */ 74 */
69 function setInitialData(data) { 75 function setInitialData(data) {
70 container.firstRunFlowCloudPrefLearnMoreUrl = 76 container.firstRunFlowCloudPrefLearnMoreUrl =
71 data['firstRunFlowCloudPrefLearnMoreUrl']; 77 data['firstRunFlowCloudPrefLearnMoreUrl'];
72 container.firstRunFlowLearnMoreUrl = 78 container.firstRunFlowLearnMoreUrl =
73 data['firstRunFlowLearnMoreUrl']; 79 data['firstRunFlowLearnMoreUrl'];
74 container.deviceMissingUrl = data['deviceMissingUrl']; 80 container.deviceMissingUrl = data['deviceMissingUrl'];
75 container.castModeList = data['castModes']; 81 container.castModeList = data['castModes'];
76 container.allSinks = data['sinks']; 82 container.allSinks = data['sinks'];
77 container.routeList = data['routes']; 83 container.routeList = data['routes'];
84 container.userEmail = data['userEmail'];
85 container.userDomain = data['userDomain'];
86 container.showEmail = data['showEmail'];
78 container.showFirstRunFlowCloudPref = 87 container.showFirstRunFlowCloudPref =
79 data['showFirstRunFlowCloudPref']; 88 data['showFirstRunFlowCloudPref'];
80 // Some users acknowledged the first run flow before the cloud prefs 89 // Some users acknowledged the first run flow before the cloud prefs
81 // setting was implemented. These users will see the first run flow 90 // setting was implemented. These users will see the first run flow
82 // again. 91 // again.
83 container.showFirstRunFlow = !data['wasFirstRunFlowAcknowledged'] || 92 container.showFirstRunFlow = !data['wasFirstRunFlowAcknowledged'] ||
84 container.showFirstRunFlowCloudPref; 93 container.showFirstRunFlowCloudPref;
85 container.maybeShowRouteDetailsOnOpen(); 94 container.maybeShowRouteDetailsOnOpen();
86 media_router.browserApi.onInitialDataReceived(); 95 media_router.browserApi.onInitialDataReceived();
87 } 96 }
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 reportNavigateToView: reportNavigateToView, 318 reportNavigateToView: reportNavigateToView,
310 reportSelectedCastMode: reportSelectedCastMode, 319 reportSelectedCastMode: reportSelectedCastMode,
311 reportRouteCreation: reportRouteCreation, 320 reportRouteCreation: reportRouteCreation,
312 reportSinkCount: reportSinkCount, 321 reportSinkCount: reportSinkCount,
313 reportTimeToClickSink: reportTimeToClickSink, 322 reportTimeToClickSink: reportTimeToClickSink,
314 reportTimeToInitialActionClose: reportTimeToInitialActionClose, 323 reportTimeToInitialActionClose: reportTimeToInitialActionClose,
315 requestInitialData: requestInitialData, 324 requestInitialData: requestInitialData,
316 requestRoute: requestRoute, 325 requestRoute: requestRoute,
317 }; 326 };
318 }); 327 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698