OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/file_manager_dialog.h" | 5 #include "chrome/browser/ui/views/file_manager_dialog.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "chrome/browser/extensions/extension_file_browser_private_api.h" | 10 #include "chrome/browser/extensions/extension_file_browser_private_api.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 hasMultipleFileTypeChoices_ = | 220 hasMultipleFileTypeChoices_ = |
221 file_types ? file_types->extensions.size() > 1 : true; | 221 file_types ? file_types->extensions.size() > 1 : true; |
222 | 222 |
223 GURL file_browser_url = FileManagerUtil::GetFileBrowserUrlWithParams( | 223 GURL file_browser_url = FileManagerUtil::GetFileBrowserUrlWithParams( |
224 type, title, virtual_path, file_types, file_type_index, | 224 type, title, virtual_path, file_types, file_type_index, |
225 default_extension); | 225 default_extension); |
226 | 226 |
227 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url, | 227 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url, |
228 owner_browser, tab->tab_contents(), | 228 owner_browser, tab->tab_contents(), |
229 kFileManagerWidth, kFileManagerHeight, | 229 kFileManagerWidth, kFileManagerHeight, string16(), |
230 this /* ExtensionDialog::Observer */); | 230 this /* ExtensionDialog::Observer */); |
231 if (!dialog) { | 231 if (!dialog) { |
232 LOG(ERROR) << "Unable to create extension dialog"; | 232 LOG(ERROR) << "Unable to create extension dialog"; |
233 return; | 233 return; |
234 } | 234 } |
235 | 235 |
236 // Connect our listener to FileDialogFunction's per-tab callbacks. | 236 // Connect our listener to FileDialogFunction's per-tab callbacks. |
237 AddPending(tab_id); | 237 AddPending(tab_id); |
238 | 238 |
239 extension_dialog_ = dialog; | 239 extension_dialog_ = dialog; |
240 params_ = params; | 240 params_ = params; |
241 tab_id_ = tab_id; | 241 tab_id_ = tab_id; |
242 owner_window_ = owner_window; | 242 owner_window_ = owner_window; |
243 } | 243 } |
OLD | NEW |