| 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 "apps/app_window_contents.h" | 7 #include "apps/app_window_contents.h" |
| 8 #include "apps/native_app_window.h" | 8 #include "apps/native_app_window.h" |
| 9 #include "apps/shell_window.h" | 9 #include "apps/shell_window.h" |
| 10 #include "apps/shell_window_registry.h" | 10 #include "apps/shell_window_registry.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 content::RenderViewHost* created_view = | 157 content::RenderViewHost* created_view = |
| 158 window->web_contents()->GetRenderViewHost(); | 158 window->web_contents()->GetRenderViewHost(); |
| 159 int view_id = MSG_ROUTING_NONE; | 159 int view_id = MSG_ROUTING_NONE; |
| 160 if (render_view_host_->GetProcess()->GetID() == | 160 if (render_view_host_->GetProcess()->GetID() == |
| 161 created_view->GetProcess()->GetID()) { | 161 created_view->GetProcess()->GetID()) { |
| 162 view_id = created_view->GetRoutingID(); | 162 view_id = created_view->GetRoutingID(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 window->GetBaseWindow()->Show(); | 165 window->GetBaseWindow()->Show(); |
| 166 base::DictionaryValue* result = new base::DictionaryValue; | 166 base::DictionaryValue* result = new base::DictionaryValue; |
| 167 result->Set("viewId", base::Value::CreateIntegerValue(view_id)); | 167 result->Set("viewId", new base::FundamentalValue(view_id)); |
| 168 SetCreateResultFromShellWindow(window, result); | 168 SetCreateResultFromShellWindow(window, result); |
| 169 result->SetBoolean("existingWindow", true); | 169 result->SetBoolean("existingWindow", true); |
| 170 result->SetBoolean("injectTitlebar", false); | 170 result->SetBoolean("injectTitlebar", false); |
| 171 SetResult(result); | 171 SetResult(result); |
| 172 SendResponse(true); | 172 SendResponse(true); |
| 173 return true; | 173 return true; |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 | 177 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if (chrome::IsRunningInForcedAppMode()) | 304 if (chrome::IsRunningInForcedAppMode()) |
| 305 shell_window->Fullscreen(); | 305 shell_window->Fullscreen(); |
| 306 | 306 |
| 307 content::RenderViewHost* created_view = | 307 content::RenderViewHost* created_view = |
| 308 shell_window->web_contents()->GetRenderViewHost(); | 308 shell_window->web_contents()->GetRenderViewHost(); |
| 309 int view_id = MSG_ROUTING_NONE; | 309 int view_id = MSG_ROUTING_NONE; |
| 310 if (create_params.creator_process_id == created_view->GetProcess()->GetID()) | 310 if (create_params.creator_process_id == created_view->GetProcess()->GetID()) |
| 311 view_id = created_view->GetRoutingID(); | 311 view_id = created_view->GetRoutingID(); |
| 312 | 312 |
| 313 base::DictionaryValue* result = new base::DictionaryValue; | 313 base::DictionaryValue* result = new base::DictionaryValue; |
| 314 result->Set("viewId", base::Value::CreateIntegerValue(view_id)); | 314 result->Set("viewId", new base::FundamentalValue(view_id)); |
| 315 result->Set("injectTitlebar", | 315 result->Set("injectTitlebar", |
| 316 base::Value::CreateBooleanValue(inject_html_titlebar)); | 316 new base::FundamentalValue(inject_html_titlebar)); |
| 317 result->Set("id", base::Value::CreateStringValue(shell_window->window_key())); | 317 result->Set("id", new base::StringValue(shell_window->window_key())); |
| 318 SetCreateResultFromShellWindow(shell_window, result); | 318 SetCreateResultFromShellWindow(shell_window, result); |
| 319 SetResult(result); | 319 SetResult(result); |
| 320 | 320 |
| 321 if (apps::ShellWindowRegistry::Get(profile())-> | 321 if (apps::ShellWindowRegistry::Get(profile())-> |
| 322 HadDevToolsAttached(created_view)) { | 322 HadDevToolsAttached(created_view)) { |
| 323 new DevToolsRestorer(this, created_view); | 323 new DevToolsRestorer(this, created_view); |
| 324 return true; | 324 return true; |
| 325 } | 325 } |
| 326 | 326 |
| 327 SendResponse(true); | 327 SendResponse(true); |
| 328 return true; | 328 return true; |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace extensions | 331 } // namespace extensions |
| OLD | NEW |