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

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

Issue 1582943003: [Media Router] Add cloud services preferences. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 <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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 function onCastModeSelected(event) { 74 function onCastModeSelected(event) {
75 /** @type {{castModeType: number}} */ 75 /** @type {{castModeType: number}} */
76 var detail = event.detail; 76 var detail = event.detail;
77 media_router.browserApi.reportSelectedCastMode(detail.castModeType); 77 media_router.browserApi.reportSelectedCastMode(detail.castModeType);
78 } 78 }
79 79
80 /** 80 /**
81 * Updates the preference that the user has seen the first run flow. 81 * Updates the preference that the user has seen the first run flow.
82 * Called when the user clicks on the acknowledgement button on the first run 82 * Called when the user clicks on the acknowledgement button on the first run
83 * flow. 83 * flow.
84 *
85 * @param {!Event} event
86 * Parameters in |event|.detail:
87 * optedIntoCloudServices - whether or not the user opted into cloud
88 * services.
84 */ 89 */
85 function onAcknowledgeFirstRunFlow() { 90 function onAcknowledgeFirstRunFlow(event) {
86 media_router.browserApi.acknowledgeFirstRunFlow(); 91 /** @type {{optedIntoCloudServices: boolean}} */
92 var detail = event.detail;
93 media_router.browserApi.acknowledgeFirstRunFlow(
94 detail.optedIntoCloudServices);
87 } 95 }
88 96
89 /** 97 /**
90 * Closes the dialog. 98 * Closes the dialog.
91 * Called when the user clicks the close button on the dialog. 99 * Called when the user clicks the close button on the dialog.
92 */ 100 */
93 function onCloseDialogEvent() { 101 function onCloseDialogEvent() {
94 container.maybeReportUserFirstAction( 102 container.maybeReportUserFirstAction(
95 media_router.MediaRouterUserAction.CLOSE); 103 media_router.MediaRouterUserAction.CLOSE);
96 media_router.browserApi.closeDialog(); 104 media_router.browserApi.closeDialog();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 var detail = event.detail; 294 var detail = event.detail;
287 media_router.browserApi.reportSinkCount(detail.sinkCount); 295 media_router.browserApi.reportSinkCount(detail.sinkCount);
288 } 296 }
289 297
290 return { 298 return {
291 initialize: initialize, 299 initialize: initialize,
292 }; 300 };
293 }); 301 });
294 302
295 window.addEventListener('load', media_router.initialize); 303 window.addEventListener('load', media_router.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698