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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_screen_voice_interaction_value_prop.js

Issue 2912593002: Create OOBE screen for Voice Interaction value proposition (Closed)
Patch Set: Create OOBE screen for Voice Interaction value proposition Created 3 years, 6 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Oobe Voice Interaction Value Prop screen implementation.
7 */
8
9 login.createScreen('VoiceInteractionValuePropScreen',
10 'voice-interaction-value-prop', function() {
11 return {
12
13 /**
14 * Event handler that is invoked just before the screen is shown.
15 * @param {object} data Screen init payload.
16 */
xiyuan 2017/06/02 22:12:33 nit: This can be just /** @override */ for ove
yueli 2017/06/06 17:38:19 Done.
17 onBeforeShow: function(data) {
18 var valueView = $('voice-interaction-value-prop-md').
19 getElement('value-prop-view');
20
21 valueView.request.onHeadersReceived.addListener(function(details) {
xiyuan 2017/06/02 22:12:33 Should we use onErrorOccurred to catch all errors
22 if (details.statusLine.match(/^HTTP.*404/)) {
xiyuan 2017/06/02 22:12:34 details.statusCode instead of manually parsing. An
23 valueView.src =
24 'https://www.gstatic.com/opa-chromeos/oobe/en/value_proposition.ht ml';
xc 2017/06/02 18:53:48 if the "en" url were also 404, which should never
xiyuan 2017/06/02 22:12:34 Good point. Please do. The simplest way is to chec
yueli 2017/06/06 17:38:19 Done.
25 }
26 }, {urls: ['<all_urls>']});
xiyuan 2017/06/02 22:12:33 Think we only care about main frame loading proble
yueli 2017/06/06 17:38:19 Done.
27
28 var locale = loadTimeData.getString('locale');
29 valueView.src = 'https://www.gstatic.com/opa-chromeos/oobe/' + locale
30 + '/value_proposition.html';
31
32 Oobe.getInstance().headerHidden = true;
33 }
34 };
35 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698