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

Side by Side Diff: chrome/browser/resources/file_manager/js/mock_chrome.js

Issue 9565008: Better fullscreen handling for Chrome OS Video Player (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/image_editor/gallery.js ('k') | chrome/common/extensions/api/fileBrowserPrivate.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698