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/shell_window.h" | 7 #include "apps/shell_window.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 break; | 224 break; |
225 } | 225 } |
226 } | 226 } |
227 | 227 |
228 void SelectFileDialogExtension::AddPending(int32 tab_id) { | 228 void SelectFileDialogExtension::AddPending(int32 tab_id) { |
229 PendingDialog::GetInstance()->Add(tab_id, this); | 229 PendingDialog::GetInstance()->Add(tab_id, this); |
230 } | 230 } |
231 | 231 |
232 // static | 232 // static |
233 bool SelectFileDialogExtension::PendingExists(int32 tab_id) { | 233 bool SelectFileDialogExtension::PendingExists(int32 tab_id) { |
234 return PendingDialog::GetInstance()->Find(tab_id) != NULL; | 234 return PendingDialog::GetInstance()->Find(tab_id).get() != NULL; |
235 } | 235 } |
236 | 236 |
237 bool SelectFileDialogExtension::HasMultipleFileTypeChoicesImpl() { | 237 bool SelectFileDialogExtension::HasMultipleFileTypeChoicesImpl() { |
238 return has_multiple_file_type_choices_; | 238 return has_multiple_file_type_choices_; |
239 } | 239 } |
240 | 240 |
241 void SelectFileDialogExtension::SelectFileImpl( | 241 void SelectFileDialogExtension::SelectFileImpl( |
242 Type type, | 242 Type type, |
243 const string16& title, | 243 const string16& title, |
244 const base::FilePath& default_path, | 244 const base::FilePath& default_path, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 } | 367 } |
368 | 368 |
369 // Connect our listener to FileDialogFunction's per-tab callbacks. | 369 // Connect our listener to FileDialogFunction's per-tab callbacks. |
370 AddPending(tab_id); | 370 AddPending(tab_id); |
371 | 371 |
372 extension_dialog_ = dialog; | 372 extension_dialog_ = dialog; |
373 params_ = params; | 373 params_ = params; |
374 tab_id_ = tab_id; | 374 tab_id_ = tab_id; |
375 owner_window_ = owner_window; | 375 owner_window_ = owner_window; |
376 } | 376 } |
OLD | NEW |