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/views/select_file_dialog_extension.h" | 5 #include "chrome/browser/ui/views/select_file_dialog_extension.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 has_multiple_file_type_choices_ = | 345 has_multiple_file_type_choices_ = |
346 file_types ? file_types->extensions.size() > 1 : true; | 346 file_types ? file_types->extensions.size() > 1 : true; |
347 | 347 |
348 GURL file_browser_url = file_manager_util::GetFileBrowserUrlWithParams( | 348 GURL file_browser_url = file_manager_util::GetFileBrowserUrlWithParams( |
349 type, title, virtual_path, file_types, file_type_index, | 349 type, title, virtual_path, file_types, file_type_index, |
350 default_extension); | 350 default_extension); |
351 | 351 |
352 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url, | 352 ExtensionDialog* dialog = ExtensionDialog::Show(file_browser_url, |
353 base_window, profile_, web_contents, | 353 base_window, profile_, web_contents, |
354 kFileManagerWidth, kFileManagerHeight, | 354 kFileManagerWidth, kFileManagerHeight, |
| 355 kFileManagerMinimumWidth, |
| 356 kFileManagerMinimumHeight, |
355 #if defined(USE_AURA) | 357 #if defined(USE_AURA) |
356 file_manager_util::GetTitleFromType(type), | 358 file_manager_util::GetTitleFromType(type), |
357 #else | 359 #else |
358 // HTML-based header used. | 360 // HTML-based header used. |
359 string16(), | 361 string16(), |
360 #endif | 362 #endif |
361 this /* ExtensionDialog::Observer */); | 363 this /* ExtensionDialog::Observer */); |
362 if (!dialog) { | 364 if (!dialog) { |
363 LOG(ERROR) << "Unable to create extension dialog"; | 365 LOG(ERROR) << "Unable to create extension dialog"; |
364 return; | 366 return; |
365 } | 367 } |
366 | 368 |
367 dialog->SetMinimumContentsSize(kFileManagerMinimumWidth, | |
368 kFileManagerMinimumHeight); | |
369 | |
370 // Connect our listener to FileDialogFunction's per-tab callbacks. | 369 // Connect our listener to FileDialogFunction's per-tab callbacks. |
371 AddPending(tab_id); | 370 AddPending(tab_id); |
372 | 371 |
373 extension_dialog_ = dialog; | 372 extension_dialog_ = dialog; |
374 params_ = params; | 373 params_ = params; |
375 tab_id_ = tab_id; | 374 tab_id_ = tab_id; |
376 owner_window_ = owner_window; | 375 owner_window_ = owner_window; |
377 } | 376 } |
OLD | NEW |