Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/debugger/devtools_window.h" | 10 #include "chrome/browser/debugger/devtools_window.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 shell_window->web_contents()->GetRenderViewHost(); | 196 shell_window->web_contents()->GetRenderViewHost(); |
| 197 int view_id = MSG_ROUTING_NONE; | 197 int view_id = MSG_ROUTING_NONE; |
| 198 if (create_params.creator_process_id == created_view->GetProcess()->GetID()) | 198 if (create_params.creator_process_id == created_view->GetProcess()->GetID()) |
| 199 view_id = created_view->GetRoutingID(); | 199 view_id = created_view->GetRoutingID(); |
| 200 | 200 |
| 201 base::DictionaryValue* result = new base::DictionaryValue; | 201 base::DictionaryValue* result = new base::DictionaryValue; |
| 202 result->Set("viewId", base::Value::CreateIntegerValue(view_id)); | 202 result->Set("viewId", base::Value::CreateIntegerValue(view_id)); |
| 203 result->Set("injectTitlebar", | 203 result->Set("injectTitlebar", |
| 204 base::Value::CreateBooleanValue(inject_html_titlebar)); | 204 base::Value::CreateBooleanValue(inject_html_titlebar)); |
| 205 result->Set("id", base::Value::CreateStringValue(shell_window->window_key())); | 205 result->Set("id", base::Value::CreateStringValue(shell_window->window_key())); |
| 206 DictionaryValue* boundsValue = new DictionaryValue(); | |
| 207 gfx::Rect bounds = shell_window->GetBaseWindow()->GetBounds(); | |
| 208 boundsValue->SetInteger("left", bounds.x()); | |
| 209 boundsValue->SetInteger("top", bounds.y()); | |
| 210 boundsValue->SetInteger("width", bounds.width()); | |
| 211 boundsValue->SetInteger("height", bounds.height()); | |
| 212 result->Set("bounds", boundsValue); | |
|
jeremya
2012/11/13 06:16:30
This is kind of unrelated to this patch, but if it
| |
| 206 SetResult(result); | 213 SetResult(result); |
| 207 | 214 |
| 208 if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) { | 215 if (ShellWindowRegistry::Get(profile())->HadDevToolsAttached(created_view)) { |
| 209 new DevToolsRestorer(this, created_view); | 216 new DevToolsRestorer(this, created_view); |
| 210 return true; | 217 return true; |
| 211 } | 218 } |
| 212 | 219 |
| 213 SendResponse(true); | 220 SendResponse(true); |
| 214 return true; | 221 return true; |
| 215 } | 222 } |
| 216 | 223 |
| 217 } // namespace extensions | 224 } // namespace extensions |
| OLD | NEW |