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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 16207004: Files.app: Fix errors when launching Files.app via "chrome://files" (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 1bf9650925a81ebdc6c4d530760a5df849c8d1db..4d4764a7a0b12741e3ba4c8c7a0d6bcd569d2e2f 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -622,7 +622,7 @@ DialogType.isModal = function(type) {
FileManager.prototype.onMaximize = function() {
// Do not maximize when running via chrome://files in a browser.
- if (!chrome.app.window.contentWindow)
+ if (!util.platform.runningAsApps())
return;
var appWindow = chrome.app.window.current();
@@ -634,7 +634,7 @@ DialogType.isModal = function(type) {
FileManager.prototype.onClose = function() {
// Do not close when running via chrome://files in a browser.
- if (!chrome.app.window.contentWindow)
+ if (!util.platform.runningAsApps())
return;
window.close();
@@ -888,7 +888,7 @@ DialogType.isModal = function(type) {
// Show the window as soon as the UI pre-initialization is done.
if (this.dialogType == DialogType.FULL_PAGE && util.platform.v2()) {
// Do not call show() when running via chrome://files in a browser.
- if (chrome.app.window.contentWindow) {
+ if (util.platform.runningAsApps()) {
chrome.app.window.current().show();
setTimeout(callback, 100); // Wait until the animation is finished.
} else {
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/util.js » ('j') | chrome/browser/resources/file_manager/js/util.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698