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

Unified Diff: chrome/browser/extensions/api/app_window/app_window_api.cc

Issue 10910304: Cache the object given to the chrome.app.window.create callback (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: improve cohesion with the prototype / JS context based on verbal feedback Created 8 years, 3 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/extensions/api/app_window/app_window_api.cc
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc
index 6d5205c5550a770578bfc673f36836e19f81ef36..a896a9abf7af2627fa84b0c143d1030716600aa9 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -112,7 +112,11 @@ bool AppWindowCreateFunction::RunImpl() {
content::WebContents* created_contents = shell_window->web_contents();
int view_id = created_contents->GetRenderViewHost()->GetRoutingID();
- SetResult(base::Value::CreateIntegerValue(view_id));
+ scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue);
+ result->SetInteger("viewId", view_id);
+ result->SetString("id", shell_window->window_key());
+
+ SetResult(result.release());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698