OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 /** | 5 /** |
6 * @fileoverview Oobe Voice Interaction Value Prop screen implementation. | 6 * @fileoverview Oobe Voice Interaction Value Prop screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen( | 9 login.createScreen( |
10 'VoiceInteractionValuePropScreen', 'voice-interaction-value-prop', | 10 'VoiceInteractionValuePropScreen', 'voice-interaction-value-prop', |
11 function() { | 11 function() { |
12 return { | 12 return { |
13 | 13 |
| 14 /** |
| 15 * Returns a control which should receive an initial focus. |
| 16 */ |
| 17 get defaultControl() { |
| 18 return $('voice-interaction-value-prop-md') |
| 19 .getElement('continueButton'); |
| 20 }, |
| 21 |
14 /** @Override */ | 22 /** @Override */ |
15 onBeforeShow: function(data) { | 23 onBeforeShow: function(data) { |
16 var valueView = $('voice-interaction-value-prop-md') | 24 var valueView = $('voice-interaction-value-prop-md') |
17 .getElement('value-prop-view'); | 25 .getElement('value-prop-view'); |
18 | 26 |
19 valueView.addContentScripts([{ | 27 valueView.addContentScripts([{ |
20 name: 'stripLinks', | 28 name: 'stripLinks', |
21 matches: ['<all_urls>'], | 29 matches: ['<all_urls>'], |
22 js: { | 30 js: { |
23 code: 'document.querySelectorAll(\'a\').forEach(' + | 31 code: 'document.querySelectorAll(\'a\').forEach(' + |
(...skipping 15 matching lines...) Expand all Loading... |
39 }, {urls: ['<all_urls>'], types: ['main_frame']}); | 47 }, {urls: ['<all_urls>'], types: ['main_frame']}); |
40 | 48 |
41 var locale = loadTimeData.getString('locale'); | 49 var locale = loadTimeData.getString('locale'); |
42 valueView.src = 'https://www.gstatic.com/opa-chromeos/oobe/' + | 50 valueView.src = 'https://www.gstatic.com/opa-chromeos/oobe/' + |
43 locale + '/value_proposition.html'; | 51 locale + '/value_proposition.html'; |
44 | 52 |
45 Oobe.getInstance().headerHidden = true; | 53 Oobe.getInstance().headerHidden = true; |
46 } | 54 } |
47 }; | 55 }; |
48 }); | 56 }); |
OLD | NEW |