Index: chrome/browser/resources/media_router/media_router_ui_interface.js |
diff --git a/chrome/browser/resources/media_router/media_router_ui_interface.js b/chrome/browser/resources/media_router/media_router_ui_interface.js |
index 44d9479866005beb241c9beae2ca76dd99b9bebf..0665bc67488c6d4ea4ac69d5e323701c1f07960d 100644 |
--- a/chrome/browser/resources/media_router/media_router_ui_interface.js |
+++ b/chrome/browser/resources/media_router/media_router_ui_interface.js |
@@ -54,7 +54,8 @@ cr.define('media_router.ui', function() { |
* sinks: !Array<!media_router.Sink>, |
* routes: !Array<!media_router.Route>, |
* castModes: !Array<!media_router.CastMode>, |
- * wasFirstRunFlowAcknowledged: boolean}} data |
+ * wasFirstRunFlowAcknowledged: boolean, |
+ * showFirstRunFlowCloudPref: boolean}} data |
* Parameters in data: |
* deviceMissingUrl - url to be opened on "Device missing?" clicked. |
* sinks - list of sinks to be displayed. |
@@ -62,6 +63,8 @@ cr.define('media_router.ui', function() { |
* castModes - list of available cast modes. |
* wasFirstRunFlowAcknowledged - true if first run flow was previously |
* acknowledged by user. |
+ * showFirstRunFlowCloudPref - true if the cloud pref option should be |
+ * shown. |
*/ |
function setInitialData(data) { |
container.deviceMissingUrl = data['deviceMissingUrl']; |
@@ -69,6 +72,8 @@ cr.define('media_router.ui', function() { |
container.allSinks = data['sinks']; |
container.routeList = data['routes']; |
container.showFirstRunFlow = !data['wasFirstRunFlowAcknowledged']; |
+ container.showFirstRunFlowCloudPref = |
+ data['showFirstRunFlowCloudPref']; |
container.maybeShowRouteDetailsOnOpen(); |
media_router.browserApi.onInitialDataReceived(); |
} |
@@ -129,9 +134,12 @@ cr.define('media_router.browserApi', function() { |
/** |
* Indicates that the user has acknowledged the first run flow. |
+ * |
+ * @param {boolean} optedIntoCloudServices Whether or not the user opted into |
+ * cloud services. |
*/ |
- function acknowledgeFirstRunFlow() { |
- chrome.send('acknowledgeFirstRunFlow'); |
+ function acknowledgeFirstRunFlow(optedIntoCloudServices) { |
+ chrome.send('acknowledgeFirstRunFlow', [optedIntoCloudServices]); |
} |
/** |