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

Side by Side 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: rebase to r157512 (conflicts) 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 unified diff | Download patch
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 #include "chrome/browser/extensions/api/app_window/app_window_api.h" 5 #include "chrome/browser/extensions/api/app_window/app_window_api.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/window_controller.h" 10 #include "chrome/browser/extensions/window_controller.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 ShellWindow::Create(profile(), GetExtension(), url, create_params); 127 ShellWindow::Create(profile(), GetExtension(), url, create_params);
128 shell_window->GetBaseWindow()->Show(); 128 shell_window->GetBaseWindow()->Show();
129 129
130 content::WebContents* created_contents = shell_window->web_contents(); 130 content::WebContents* created_contents = shell_window->web_contents();
131 int view_id = created_contents->GetRenderViewHost()->GetRoutingID(); 131 int view_id = created_contents->GetRenderViewHost()->GetRoutingID();
132 132
133 base::DictionaryValue* result = new base::DictionaryValue; 133 base::DictionaryValue* result = new base::DictionaryValue;
134 result->Set("viewId", base::Value::CreateIntegerValue(view_id)); 134 result->Set("viewId", base::Value::CreateIntegerValue(view_id));
135 result->Set("injectTitlebar", 135 result->Set("injectTitlebar",
136 base::Value::CreateBooleanValue(inject_html_titlebar)); 136 base::Value::CreateBooleanValue(inject_html_titlebar));
137 result->Set("id", base::Value::CreateStringValue(shell_window->window_key()));
137 SetResult(result); 138 SetResult(result);
138 return true; 139 return true;
139 } 140 }
140 141
141 } // namespace extensions 142 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/shell_window.h » ('j') | chrome/common/extensions/api/app_window.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698