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

Unified Diff: chrome/renderer/resources/extensions/app_window_custom_bindings.js

Issue 11048045: Allow settings dialog to be opened via the app launcher, as a packaged app. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: license stanza Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/app_window_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/app_window_custom_bindings.js b/chrome/renderer/resources/extensions/app_window_custom_bindings.js
index 651d871df1df016607ac096891c4c63da3a13ac4..f38af8b7de44c0c819051807f464cb01cb9e55bb 100644
--- a/chrome/renderer/resources/extensions/app_window_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/app_window_custom_bindings.js
@@ -14,9 +14,13 @@ chromeHidden.registerCustomHook('app.window', function(bindingsAPI) {
var apiFunctions = bindingsAPI.apiFunctions;
apiFunctions.setCustomCallback('create',
function(name, request, windowParams) {
- if (!windowParams.viewId) {
- // Create failed? If given a callback, trigger it with an undefined
- // object.
+ var view = null;
+ if (windowParams.viewId)
+ view = GetView(windowParams.viewId, windowParams.injectTitlebar);
+
+ if (!view) {
+ // No route to created window. If given a callback, trigger it with an
+ // undefined object.
if (request.callback) {
request.callback()
delete request.callback;
@@ -24,8 +28,6 @@ chromeHidden.registerCustomHook('app.window', function(bindingsAPI) {
return;
}
- var view = GetView(windowParams.viewId, windowParams.injectTitlebar);
-
// Initialize appWindowData in the newly created JS context
view.chrome.app.window.initializeAppWindow(windowParams);
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698