| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/app_launcher_handler.h" | 5 #include "chrome/browser/dom_ui/app_launcher_handler.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (launch_container.empty()) { | 123 if (launch_container.empty()) { |
| 124 Browser::OpenApplication(profile, extension_id); | 124 Browser::OpenApplication(profile, extension_id); |
| 125 return; | 125 return; |
| 126 } | 126 } |
| 127 | 127 |
| 128 // Override the default launch container. | 128 // Override the default launch container. |
| 129 Extension* extension = | 129 Extension* extension = |
| 130 extensions_service_->GetExtensionById(extension_id, false); | 130 extensions_service_->GetExtensionById(extension_id, false); |
| 131 DCHECK(extension); | 131 DCHECK(extension); |
| 132 | 132 |
| 133 Extension::LaunchContainer container; | 133 Extension::LaunchContainer container = Extension::LAUNCH_TAB; |
| 134 if (launch_container == "tab") | 134 if (launch_container == "tab") |
| 135 container = Extension::LAUNCH_TAB; | 135 container = Extension::LAUNCH_TAB; |
| 136 else if (launch_container == "panel") | 136 else if (launch_container == "panel") |
| 137 container = Extension::LAUNCH_PANEL; | 137 container = Extension::LAUNCH_PANEL; |
| 138 else if (launch_container == "window") | 138 else if (launch_container == "window") |
| 139 container = Extension::LAUNCH_WINDOW; | 139 container = Extension::LAUNCH_WINDOW; |
| 140 else | 140 else |
| 141 NOTREACHED() << "Unexpected launch container: " << launch_container << "."; | 141 NOTREACHED() << "Unexpected launch container: " << launch_container << "."; |
| 142 | 142 |
| 143 Browser::OpenApplication(profile, extension, container); | 143 Browser::OpenApplication(profile, extension, container); |
| 144 } | 144 } |
| OLD | NEW |