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

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

Issue 11369039: Add setBounds method and browsertest for get/set bounds to app window API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, responded to review feedback Created 8 years, 1 month 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 2bed9f500d9b5babe969c3658015476cf1ceae03..c0ce6a0f959ceb902f25391ae47f847c7ca615c7 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -203,6 +203,13 @@ bool AppWindowCreateFunction::RunImpl() {
result->Set("injectTitlebar",
base::Value::CreateBooleanValue(inject_html_titlebar));
result->Set("id", base::Value::CreateStringValue(shell_window->window_key()));
+ DictionaryValue* boundsValue = new DictionaryValue();
+ gfx::Rect bounds = shell_window->GetBaseWindow()->GetBounds();
+ boundsValue->SetInteger("left", bounds.x());
+ boundsValue->SetInteger("top", bounds.y());
+ boundsValue->SetInteger("width", bounds.width());
+ boundsValue->SetInteger("height", bounds.height());
+ result->Set("bounds", boundsValue);
jeremya 2012/11/13 06:16:30 This is kind of unrelated to this patch, but if it
SetResult(result);
if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) {

Powered by Google App Engine
This is Rietveld 408576698