OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 Enable developer features screen implementation. | 6 * @fileoverview Enable developer features screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('EnableDebuggingScreen', 'debugging', function() { | 9 login.createScreen('EnableDebuggingScreen', 'debugging', function() { |
10 return { | 10 return { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 }, | 99 }, |
100 | 100 |
101 /** | 101 /** |
102 * Returns a control which should receive an initial focus. | 102 * Returns a control which should receive an initial focus. |
103 */ | 103 */ |
104 get defaultControl() { | 104 get defaultControl() { |
105 if (this.state_ == this.UI_STATE.REMOVE_PROTECTION) | 105 if (this.state_ == this.UI_STATE.REMOVE_PROTECTION) |
106 return $('debugging-remove-protection-button'); | 106 return $('debugging-remove-protection-button'); |
107 else if (this.state_ == this.UI_STATE.SETUP) | 107 else if (this.state_ == this.UI_STATE.SETUP) |
108 return $('enable-debugging-password'); | 108 return $('enable-debugging-password'); |
109 else if (this.state_ == this.UI_STATE.DONE) | 109 else if (this.state_ == this.UI_STATE.DONE || |
| 110 this.state_ == this.UI_STATE.ERROR) { |
110 return $('debugging-ok-button'); | 111 return $('debugging-ok-button'); |
| 112 } |
111 | 113 |
112 return $('debugging-cancel-button'); | 114 return $('debugging-cancel-button'); |
113 }, | 115 }, |
114 | 116 |
115 /** | 117 /** |
116 * Cancels the enable debugging screen and drops the user back to the | 118 * Cancels the enable debugging screen and drops the user back to the |
117 * network settings. | 119 * network settings. |
118 */ | 120 */ |
119 cancel: function() { | 121 cancel: function() { |
120 chrome.send('enableDebuggingOnCancel'); | 122 chrome.send('enableDebuggingOnCancel'); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 157 |
156 if (Oobe.getInstance().currentScreen === this) | 158 if (Oobe.getInstance().currentScreen === this) |
157 Oobe.getInstance().updateScreenSize(this); | 159 Oobe.getInstance().updateScreenSize(this); |
158 }, | 160 }, |
159 | 161 |
160 updateState: function(state) { | 162 updateState: function(state) { |
161 this.setDialogView_(state); | 163 this.setDialogView_(state); |
162 } | 164 } |
163 }; | 165 }; |
164 }); | 166 }); |
OLD | NEW |