| Index: extensions/renderer/resources/app_window_custom_bindings.js
|
| diff --git a/extensions/renderer/resources/app_window_custom_bindings.js b/extensions/renderer/resources/app_window_custom_bindings.js
|
| index 99c1a3d66b7481ae4629bcbdaa8dec8d92807785..e182db73250dcd77be0229cb33ce69aac3aca5b3 100644
|
| --- a/extensions/renderer/resources/app_window_custom_bindings.js
|
| +++ b/extensions/renderer/resources/app_window_custom_bindings.js
|
| @@ -140,10 +140,21 @@ appWindow.registerCustomHook(function(bindingsAPI) {
|
| }
|
|
|
| // Initialize appWindowData in the newly created JS context
|
| - view.chrome.app.window.initializeAppWindow(windowParams);
|
| + if (view.chrome.app) {
|
| + view.chrome.app.window.initializeAppWindow(windowParams);
|
| + } else {
|
| + var sandbox_window_message = 'Creating sandboxed window, it doesn\'t ' +
|
| + 'have access to the chrome.app API.';
|
| + if (callback) {
|
| + sandbox_window_message = sandbox_window_message +
|
| + ' The chrome.app.window.create callback will be called, but ' +
|
| + 'there will be no object provided for the sandboxed window.';
|
| + }
|
| + console.warn(sandbox_window_message);
|
| + }
|
|
|
| if (callback) {
|
| - if (!view) {
|
| + if (!view || !view.chrome.app /* sandboxed window */) {
|
| callback(undefined);
|
| return;
|
| }
|
|
|