OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * @constructor | 8 * @constructor |
9 */ | 9 */ |
10 function MessageWindowImpl() { | 10 function MessageWindowImpl() { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 case 'update_message': | 137 case 'update_message': |
138 var message = /** @type {string} */ (event.data['message']); | 138 var message = /** @type {string} */ (event.data['message']); |
139 if (typeof(message) != 'string') { | 139 if (typeof(message) != 'string') { |
140 console.log('Bad update_message message:', event.data); | 140 console.log('Bad update_message message:', event.data); |
141 break; | 141 break; |
142 } | 142 } |
143 | 143 |
144 var messageDiv = document.getElementById('message'); | 144 var messageDiv = document.getElementById('message'); |
145 messageDiv.innerText = message; | 145 messageDiv.innerText = message; |
146 | 146 |
147 base.resizeWindowToContent(); | 147 base.resizeWindowToContent(true); |
148 break; | 148 break; |
149 | 149 |
150 default: | 150 default: |
151 console.error('Unexpected message:', event.data); | 151 console.error('Unexpected message:', event.data); |
152 } | 152 } |
153 }; | 153 }; |
154 | 154 |
155 var messageWindow = new MessageWindowImpl(); | 155 var messageWindow = new MessageWindowImpl(); |
OLD | NEW |