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

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

Issue 27510009: Files.app: Remove support for chrome://files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 2 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * FileManager constructor. 8 * FileManager constructor.
9 * 9 *
10 * FileManager objects encapsulate the functionality of the file selector 10 * FileManager objects encapsulate the functionality of the file selector
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 if (util.platform.runningInBrowser()) { 474 if (util.platform.runningInBrowser()) {
475 // Suppresses the default context menu. 475 // Suppresses the default context menu.
476 this.dialogDom_.addEventListener('contextmenu', function(e) { 476 this.dialogDom_.addEventListener('contextmenu', function(e) {
477 e.preventDefault(); 477 e.preventDefault();
478 e.stopPropagation(); 478 e.stopPropagation();
479 }); 479 });
480 } 480 }
481 }; 481 };
482 482
483 FileManager.prototype.onMaximize = function() { 483 FileManager.prototype.onMaximize = function() {
484 // Do not maximize when running via chrome://files in a browser.
485 if (util.platform.runningInBrowser())
486 return;
487
488 var appWindow = chrome.app.window.current(); 484 var appWindow = chrome.app.window.current();
489 if (appWindow.isMaximized()) 485 if (appWindow.isMaximized())
490 appWindow.restore(); 486 appWindow.restore();
491 else 487 else
492 appWindow.maximize(); 488 appWindow.maximize();
493 }; 489 };
494 490
495 FileManager.prototype.onClose = function() { 491 FileManager.prototype.onClose = function() {
496 // Do not close when running via chrome://files in a browser.
497 if (util.platform.runningInBrowser())
498 return;
499
500 window.close(); 492 window.close();
501 }; 493 };
502 494
503 /** 495 /**
504 * One-time initialization of commands. 496 * One-time initialization of commands.
505 * @private 497 * @private
506 */ 498 */
507 FileManager.prototype.initCommands_ = function() { 499 FileManager.prototype.initCommands_ = function() {
508 this.commandHandler = new CommandHandler(this); 500 this.commandHandler = new CommandHandler(this);
509 501
(...skipping 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3686 callback(this.preferences_); 3678 callback(this.preferences_);
3687 return; 3679 return;
3688 } 3680 }
3689 3681
3690 chrome.fileBrowserPrivate.getPreferences(function(prefs) { 3682 chrome.fileBrowserPrivate.getPreferences(function(prefs) {
3691 this.preferences_ = prefs; 3683 this.preferences_ = prefs;
3692 callback(prefs); 3684 callback(prefs);
3693 }.bind(this)); 3685 }.bind(this));
3694 }; 3686 };
3695 })(); 3687 })();
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_url_rewrite_browsertest.cc ('k') | chrome/browser/resources/file_manager/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698