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

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

Issue 22185002: Add browser test to the sharing dialog feature in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added the licence header. Created 7 years, 4 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 * Map of all currently open app window. The key is an app id. 8 * Map of all currently open app window. The key is an app id.
9 */ 9 */
10 var appWindows = {}; 10 var appWindows = {};
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Show after changing bounds is done. For the new UI, Files.app shows 133 // Show after changing bounds is done. For the new UI, Files.app shows
134 // it's window as soon as the UI is pre-initialized. 134 // it's window as soon as the UI is pre-initialized.
135 if (!this.id_.match(FILES_ID_PATTERN)) 135 if (!this.id_.match(FILES_ID_PATTERN))
136 appWindow.show(); 136 appWindow.show();
137 137
138 appWindows[this.id_] = appWindow; 138 appWindows[this.id_] = appWindow;
139 var contentWindow = appWindow.contentWindow; 139 var contentWindow = appWindow.contentWindow;
140 contentWindow.appID = this.id_; 140 contentWindow.appID = this.id_;
141 contentWindow.appState = this.appState_; 141 contentWindow.appState = this.appState_;
142 contentWindow.appInitialURL = this.url_; 142 contentWindow.appInitialURL = this.url_;
143 if (window.IN_TEST)
144 contentWindow.IN_TEST = true;
143 appWindow.onClosed.addListener(function() { 145 appWindow.onClosed.addListener(function() {
144 if (contentWindow.unload) 146 if (contentWindow.unload)
145 contentWindow.unload(); 147 contentWindow.unload();
146 if (contentWindow.saveOnExit) { 148 if (contentWindow.saveOnExit) {
147 contentWindow.saveOnExit.forEach(function(entry) { 149 contentWindow.saveOnExit.forEach(function(entry) {
148 util.AppCache.update(entry.key, entry.value); 150 util.AppCache.update(entry.key, entry.value);
149 }); 151 });
150 } 152 }
151 delete appWindows[this.id_]; 153 delete appWindows[this.id_];
152 chrome.storage.local.remove(this.id_); // Forget the persisted state. 154 chrome.storage.local.remove(this.id_); // Forget the persisted state.
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 queue.run(function(callback) { 570 queue.run(function(callback) {
569 chrome.fileBrowserPrivate.getStrings(function(strings) { 571 chrome.fileBrowserPrivate.getStrings(function(strings) {
570 initContextMenu(strings); 572 initContextMenu(strings);
571 chrome.storage.local.set({strings: strings}, callback); 573 chrome.storage.local.set({strings: strings}, callback);
572 }); 574 });
573 }); 575 });
574 } 576 }
575 577
576 // Initialize Files.app. 578 // Initialize Files.app.
577 initApp(); 579 initApp();
OLDNEW
« no previous file with comments | « chrome/browser/drive/fake_drive_service.cc ('k') | chrome/browser/resources/file_manager/js/share_client.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698