| 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 "apps/app_window.h" | 7 #include "apps/app_window.h" |
| 8 #include "apps/app_window_registry.h" | 8 #include "apps/app_window_registry.h" |
| 9 #include "apps/ui/native_app_window.h" | 9 #include "apps/ui/native_app_window.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 410 |
| 411 ExtensionDialog* dialog = ExtensionDialog::Show( | 411 ExtensionDialog* dialog = ExtensionDialog::Show( |
| 412 file_manager_url, | 412 file_manager_url, |
| 413 base_window ? base_window->GetNativeWindow() : owner_window, | 413 base_window ? base_window->GetNativeWindow() : owner_window, |
| 414 profile_, | 414 profile_, |
| 415 web_contents, | 415 web_contents, |
| 416 kFileManagerWidth, | 416 kFileManagerWidth, |
| 417 kFileManagerHeight, | 417 kFileManagerHeight, |
| 418 kFileManagerMinimumWidth, | 418 kFileManagerMinimumWidth, |
| 419 kFileManagerMinimumHeight, | 419 kFileManagerMinimumHeight, |
| 420 #if defined(USE_AURA) | |
| 421 file_manager::util::GetSelectFileDialogTitle(type), | 420 file_manager::util::GetSelectFileDialogTitle(type), |
| 422 #else | |
| 423 // HTML-based header used. | |
| 424 base::string16(), | |
| 425 #endif | |
| 426 this /* ExtensionDialog::Observer */); | 421 this /* ExtensionDialog::Observer */); |
| 427 if (!dialog) { | 422 if (!dialog) { |
| 428 LOG(ERROR) << "Unable to create extension dialog"; | 423 LOG(ERROR) << "Unable to create extension dialog"; |
| 429 return; | 424 return; |
| 430 } | 425 } |
| 431 | 426 |
| 432 // Connect our listener to FileDialogFunction's per-tab callbacks. | 427 // Connect our listener to FileDialogFunction's per-tab callbacks. |
| 433 AddPending(routing_id); | 428 AddPending(routing_id); |
| 434 | 429 |
| 435 extension_dialog_ = dialog; | 430 extension_dialog_ = dialog; |
| 436 params_ = params; | 431 params_ = params; |
| 437 routing_id_ = routing_id; | 432 routing_id_ = routing_id; |
| 438 owner_window_ = owner_window; | 433 owner_window_ = owner_window; |
| 439 } | 434 } |
| OLD | NEW |