| 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 "ui/shell_dialogs/select_file_dialog.h" | 5 #include "ui/shell_dialogs/select_file_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) | 79 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 80 const ui::LinuxShellDialog* shell_dialogs = ui::LinuxShellDialog::instance(); | 80 const ui::LinuxShellDialog* shell_dialogs = ui::LinuxShellDialog::instance(); |
| 81 if (shell_dialogs) | 81 if (shell_dialogs) |
| 82 return shell_dialogs->CreateSelectFileDialog(listener, policy); | 82 return shell_dialogs->CreateSelectFileDialog(listener, policy); |
| 83 #endif | 83 #endif |
| 84 | 84 |
| 85 #if defined(OS_WIN) | 85 #if defined(OS_WIN) |
| 86 // TODO(ananta) | 86 // TODO(ananta) |
| 87 // Fix this for Chrome ASH on Windows. | 87 // Fix this for Chrome ASH on Windows. |
| 88 return CreateWinSelectFileDialog(listener, policy); | 88 return CreateDefaultWinSelectFileDialog(listener, policy); |
| 89 #elif defined(OS_MACOSX) && !defined(USE_AURA) | 89 #elif defined(OS_MACOSX) && !defined(USE_AURA) |
| 90 return CreateMacSelectFileDialog(listener, policy); | 90 return CreateMacSelectFileDialog(listener, policy); |
| 91 #elif defined(OS_ANDROID) | 91 #elif defined(OS_ANDROID) |
| 92 return CreateAndroidSelectFileDialog(listener, policy); | 92 return CreateAndroidSelectFileDialog(listener, policy); |
| 93 #else | 93 #else |
| 94 NOTIMPLEMENTED(); | 94 NOTIMPLEMENTED(); |
| 95 return NULL; | 95 return NULL; |
| 96 #endif | 96 #endif |
| 97 } | 97 } |
| 98 | 98 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 void SelectFileDialog::CancelFileSelection(void* params) { | 146 void SelectFileDialog::CancelFileSelection(void* params) { |
| 147 if (listener_) | 147 if (listener_) |
| 148 listener_->FileSelectionCanceled(params); | 148 listener_->FileSelectionCanceled(params); |
| 149 } | 149 } |
| 150 | 150 |
| 151 ShellDialogsDelegate* SelectFileDialog::GetShellDialogsDelegate() { | 151 ShellDialogsDelegate* SelectFileDialog::GetShellDialogsDelegate() { |
| 152 return g_shell_dialogs_delegate_; | 152 return g_shell_dialogs_delegate_; |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace ui | 155 } // namespace ui |
| OLD | NEW |