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/ui/webui/extensions/pack_extension_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/pack_extension_handler.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_creator.h" | 7 #include "chrome/browser/extensions/extension_creator.h" |
8 #include "chrome/browser/ui/chrome_select_file_policy.h" | 8 #include "chrome/browser/ui/chrome_select_file_policy.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 | 183 |
184 load_extension_dialog_ = ui::SelectFileDialog::Create( | 184 load_extension_dialog_ = ui::SelectFileDialog::Create( |
185 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); | 185 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); |
186 load_extension_dialog_->SelectFile( | 186 load_extension_dialog_->SelectFile( |
187 type, | 187 type, |
188 select_title, | 188 select_title, |
189 base::FilePath(), | 189 base::FilePath(), |
190 &info, | 190 &info, |
191 file_type_index, | 191 file_type_index, |
192 FILE_PATH_LITERAL(std::string()), | 192 base::FilePath::StringType(), |
193 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), | 193 web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), |
194 NULL); | 194 NULL); |
195 } | 195 } |
196 | 196 |
197 void PackExtensionHandler::ShowAlert(const std::string& message) { | 197 void PackExtensionHandler::ShowAlert(const std::string& message) { |
198 ListValue arguments; | 198 ListValue arguments; |
199 arguments.Append(Value::CreateStringValue(message)); | 199 arguments.Append(Value::CreateStringValue(message)); |
200 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments); | 200 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments); |
201 } | 201 } |
OLD | NEW |