| 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/time.h" | 7 #include "base/time.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/extensions/window_controller.h" | 9 #include "chrome/browser/extensions/window_controller.h" |
| 10 #include "chrome/browser/ui/extensions/shell_window.h" | 10 #include "chrome/browser/ui/extensions/shell_window.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 if (create_params.bounds.height() < minimum_size.height()) | 105 if (create_params.bounds.height() < minimum_size.height()) |
| 106 create_params.bounds.set_height(minimum_size.height()); | 106 create_params.bounds.set_height(minimum_size.height()); |
| 107 } | 107 } |
| 108 ShellWindow* shell_window = | 108 ShellWindow* shell_window = |
| 109 ShellWindow::Create(profile(), GetExtension(), url, create_params); | 109 ShellWindow::Create(profile(), GetExtension(), url, create_params); |
| 110 shell_window->GetBaseWindow()->Show(); | 110 shell_window->GetBaseWindow()->Show(); |
| 111 | 111 |
| 112 content::WebContents* created_contents = shell_window->web_contents(); | 112 content::WebContents* created_contents = shell_window->web_contents(); |
| 113 int view_id = created_contents->GetRenderViewHost()->GetRoutingID(); | 113 int view_id = created_contents->GetRenderViewHost()->GetRoutingID(); |
| 114 | 114 |
| 115 SetResult(base::Value::CreateIntegerValue(view_id)); | 115 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue); |
| 116 result->SetInteger("viewId", view_id); |
| 117 result->SetString("id", shell_window->window_key()); |
| 118 |
| 119 SetResult(result.release()); |
| 116 return true; | 120 return true; |
| 117 } | 121 } |
| 118 | 122 |
| 119 } // namespace extensions | 123 } // namespace extensions |
| OLD | NEW |