OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * @param {Object.<string, string>} stringData String data. | 8 * @param {Object.<string, string>} stringData String data. |
9 * @param {VolumeManager} volumeManager Volume manager. | 9 * @param {VolumeManager} volumeManager Volume manager. |
10 */ | 10 */ |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 }); | 124 }); |
125 | 125 |
126 // Create a new window. | 126 // Create a new window. |
127 appWindowPromise = appWindowPromise.then(function() { | 127 appWindowPromise = appWindowPromise.then(function() { |
128 return new Promise(function(fulfill) { | 128 return new Promise(function(fulfill) { |
129 chrome.app.window.create( | 129 chrome.app.window.create( |
130 'gallery.html', | 130 'gallery.html', |
131 { | 131 { |
132 id: 'gallery', | 132 id: 'gallery', |
133 innerBounds: { | 133 innerBounds: { |
134 minWidth: 800, | 134 minWidth: 820, |
135 minHeight: 300 | 135 minHeight: 300 |
136 }, | 136 }, |
137 frame: 'none' | 137 frame: 'none' |
138 }, | 138 }, |
139 function(appWindow) { | 139 function(appWindow) { |
140 appWindow.contentWindow.addEventListener( | 140 appWindow.contentWindow.addEventListener( |
141 'load', fulfill.bind(null, appWindow)); | 141 'load', fulfill.bind(null, appWindow)); |
142 closingPromise = new Promise(function(fulfill) { | 142 closingPromise = new Promise(function(fulfill) { |
143 appWindow.onClosed.addListener(fulfill); | 143 appWindow.onClosed.addListener(fulfill); |
144 }); | 144 }); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 chrome.runtime.onMessageExternal.addListener(function(message) { | 206 chrome.runtime.onMessageExternal.addListener(function(message) { |
207 if (message.name !== 'testResourceLoaded') | 207 if (message.name !== 'testResourceLoaded') |
208 return; | 208 return; |
209 var script = document.createElement('script'); | 209 var script = document.createElement('script'); |
210 script.src = | 210 script.src = |
211 'chrome-extension://ejhcmmdhhpdhhgmifplfmjobgegbibkn' + | 211 'chrome-extension://ejhcmmdhhpdhhgmifplfmjobgegbibkn' + |
212 '/gallery/test_loader.js'; | 212 '/gallery/test_loader.js'; |
213 document.documentElement.appendChild(script); | 213 document.documentElement.appendChild(script); |
214 }); | 214 }); |
215 } | 215 } |
OLD | NEW |