| 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/shell_window.h" | 8 #include "apps/shell_window.h" |
| 9 #include "apps/shell_window_registry.h" | 9 #include "apps/shell_window_registry.h" |
| 10 #include "apps/ui/native_app_window.h" | 10 #include "apps/ui/native_app_window.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 create_params.window_key); | 165 create_params.window_key); |
| 166 if (window) { | 166 if (window) { |
| 167 content::RenderViewHost* created_view = | 167 content::RenderViewHost* created_view = |
| 168 window->web_contents()->GetRenderViewHost(); | 168 window->web_contents()->GetRenderViewHost(); |
| 169 int view_id = MSG_ROUTING_NONE; | 169 int view_id = MSG_ROUTING_NONE; |
| 170 if (render_view_host_->GetProcess()->GetID() == | 170 if (render_view_host_->GetProcess()->GetID() == |
| 171 created_view->GetProcess()->GetID()) { | 171 created_view->GetProcess()->GetID()) { |
| 172 view_id = created_view->GetRoutingID(); | 172 view_id = created_view->GetRoutingID(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 window->GetBaseWindow()->Show(); | 175 window->Show(ShellWindow::SHOW_ACTIVE); |
| 176 base::DictionaryValue* result = new base::DictionaryValue; | 176 base::DictionaryValue* result = new base::DictionaryValue; |
| 177 result->Set("viewId", new base::FundamentalValue(view_id)); | 177 result->Set("viewId", new base::FundamentalValue(view_id)); |
| 178 SetCreateResultFromShellWindow(window, result); | 178 SetCreateResultFromShellWindow(window, result); |
| 179 result->SetBoolean("existingWindow", true); | 179 result->SetBoolean("existingWindow", true); |
| 180 result->SetBoolean("injectTitlebar", false); | 180 result->SetBoolean("injectTitlebar", false); |
| 181 SetResult(result); | 181 SetResult(result); |
| 182 SendResponse(true); | 182 SendResponse(true); |
| 183 return true; | 183 return true; |
| 184 } | 184 } |
| 185 } | 185 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 ->HadDevToolsAttached(created_view)) { | 313 ->HadDevToolsAttached(created_view)) { |
| 314 new DevToolsRestorer(this, created_view); | 314 new DevToolsRestorer(this, created_view); |
| 315 return true; | 315 return true; |
| 316 } | 316 } |
| 317 | 317 |
| 318 SendResponse(true); | 318 SendResponse(true); |
| 319 return true; | 319 return true; |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace extensions | 322 } // namespace extensions |
| OLD | NEW |