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

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

Issue 1606303005: [Media Router] Add cloud services learn more link to first run flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * 43 *
44 * @param {!MediaRouterContainerElement} mediaRouterContainer 44 * @param {!MediaRouterContainerElement} mediaRouterContainer
45 */ 45 */
46 function setContainer(mediaRouterContainer) { 46 function setContainer(mediaRouterContainer) {
47 container = mediaRouterContainer; 47 container = mediaRouterContainer;
48 } 48 }
49 49
50 /** 50 /**
51 * Populates the WebUI with data obtained from Media Router. 51 * Populates the WebUI with data obtained from Media Router.
52 * 52 *
53 * @param {{deviceMissingUrl: string, 53 * @param {{firstRunFlowCloudPrefLearnMoreUrl: string,
54 * deviceMissingUrl: string,
54 * sinks: !Array<!media_router.Sink>, 55 * sinks: !Array<!media_router.Sink>,
55 * routes: !Array<!media_router.Route>, 56 * routes: !Array<!media_router.Route>,
56 * castModes: !Array<!media_router.CastMode>, 57 * castModes: !Array<!media_router.CastMode>,
57 * wasFirstRunFlowAcknowledged: boolean}} data 58 * wasFirstRunFlowAcknowledged: boolean}} data
58 * Parameters in data: 59 * Parameters in data:
60 * firstRunFlowCloudPrefLearnMoreUrl - url to be opened on "Lean More" from
imcheng 2016/01/25 19:21:07 make this comment consistent with the one in media
apacible 2016/01/25 22:39:43 Done.
61 * first run flow is clicked.
59 * deviceMissingUrl - url to be opened on "Device missing?" clicked. 62 * deviceMissingUrl - url to be opened on "Device missing?" clicked.
60 * sinks - list of sinks to be displayed. 63 * sinks - list of sinks to be displayed.
61 * routes - list of routes that are associated with the sinks. 64 * routes - list of routes that are associated with the sinks.
62 * castModes - list of available cast modes. 65 * castModes - list of available cast modes.
63 * wasFirstRunFlowAcknowledged - true if first run flow was previously 66 * wasFirstRunFlowAcknowledged - true if first run flow was previously
64 * acknowledged by user. 67 * acknowledged by user.
65 */ 68 */
66 function setInitialData(data) { 69 function setInitialData(data) {
70 container.firstRunFlowCloudPrefLearnMoreUrl =
71 data['firstRunFlowCloudPrefLearnMoreUrl'];
67 container.deviceMissingUrl = data['deviceMissingUrl']; 72 container.deviceMissingUrl = data['deviceMissingUrl'];
68 container.castModeList = data['castModes']; 73 container.castModeList = data['castModes'];
69 container.allSinks = data['sinks']; 74 container.allSinks = data['sinks'];
70 container.routeList = data['routes']; 75 container.routeList = data['routes'];
71 container.showFirstRunFlow = !data['wasFirstRunFlowAcknowledged']; 76 container.showFirstRunFlow = !data['wasFirstRunFlowAcknowledged'];
72 container.maybeShowRouteDetailsOnOpen(); 77 container.maybeShowRouteDetailsOnOpen();
73 media_router.browserApi.onInitialDataReceived(); 78 media_router.browserApi.onInitialDataReceived();
74 } 79 }
75 80
76 /** 81 /**
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 reportInitialState: reportInitialState, 289 reportInitialState: reportInitialState,
285 reportNavigateToView: reportNavigateToView, 290 reportNavigateToView: reportNavigateToView,
286 reportSelectedCastMode: reportSelectedCastMode, 291 reportSelectedCastMode: reportSelectedCastMode,
287 reportSinkCount: reportSinkCount, 292 reportSinkCount: reportSinkCount,
288 reportTimeToClickSink: reportTimeToClickSink, 293 reportTimeToClickSink: reportTimeToClickSink,
289 reportTimeToInitialActionClose: reportTimeToInitialActionClose, 294 reportTimeToInitialActionClose: reportTimeToInitialActionClose,
290 requestInitialData: requestInitialData, 295 requestInitialData: requestInitialData,
291 requestRoute: requestRoute, 296 requestRoute: requestRoute,
292 }; 297 };
293 }); 298 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698