OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 function MockEventSource() { | 5 function MockEventSource() { |
6 this.listeners_ = []; | 6 this.listeners_ = []; |
7 } | 7 } |
8 | 8 |
9 MockEventSource.prototype.addListener = function(listener) { | 9 MockEventSource.prototype.addListener = function(listener) { |
10 this.listeners_.push(listener); | 10 this.listeners_.push(listener); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 metadata.isReadOnly = true; | 252 metadata.isReadOnly = true; |
253 } | 253 } |
254 } else if (urlStartsWith('/gdata')) { | 254 } else if (urlStartsWith('/gdata')) { |
255 metadata.deviceType = 'network'; | 255 metadata.deviceType = 'network'; |
256 } else { | 256 } else { |
257 metadata.deviceType = 'file'; | 257 metadata.deviceType = 'file'; |
258 } | 258 } |
259 callback(metadata); | 259 callback(metadata); |
260 }, | 260 }, |
261 | 261 |
| 262 toggleFullscreen: function() { |
| 263 if (document.webkitIsFullScreen) |
| 264 document.webkitCancelFullScreen(); |
| 265 else |
| 266 document.body.webkitRequestFullScreen(); |
| 267 }, |
| 268 |
| 269 isFullscreen: function(callback) { |
| 270 setTimeout(callback, 0, document.webkitIsFullScreen); |
| 271 }, |
| 272 |
262 /** | 273 /** |
263 * Return localized strings. | 274 * Return localized strings. |
264 */ | 275 */ |
265 getStrings: function(callback) { | 276 getStrings: function(callback) { |
266 // Keep this list in sync with the strings in generated_resources.grd and | 277 // Keep this list in sync with the strings in generated_resources.grd and |
267 // extension_file_browser_private_api.cc! | 278 // extension_file_browser_private_api.cc! |
268 callback({ | 279 callback({ |
269 // These two are from locale_settings*.grd | 280 // These two are from locale_settings*.grd |
270 WEB_FONT_FAMILY: 'Chrome Droid Sans,Droid Sans Fallback,sans-serif', | 281 WEB_FONT_FAMILY: 'Chrome Droid Sans,Droid Sans Fallback,sans-serif', |
271 WEB_FONT_SIZE: '84%', | 282 WEB_FONT_SIZE: '84%', |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 511 |
501 setWindowHeight: function(height) { | 512 setWindowHeight: function(height) { |
502 this.popup_.style.height = height + 'px'; | 513 this.popup_.style.height = height + 'px'; |
503 }, | 514 }, |
504 | 515 |
505 closeWindow: function() { | 516 closeWindow: function() { |
506 this.popup_.parentNode.removeChild(this.popup_); | 517 this.popup_.parentNode.removeChild(this.popup_); |
507 this.popup_ = null; | 518 this.popup_ = null; |
508 } | 519 } |
509 }; | 520 }; |
OLD | NEW |