| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // time, the extension subsystem would automatically reload it for us. At | 224 // time, the extension subsystem would automatically reload it for us. At |
| 225 // this time though this is broken because of some faulty wiring in | 225 // this time though this is broken because of some faulty wiring in |
| 226 // extensions::ProcessManager::CreateViewHost. Once that is fixed, remove | 226 // extensions::ProcessManager::CreateViewHost. Once that is fixed, remove |
| 227 // this. | 227 // this. |
| 228 if (profile_) { | 228 if (profile_) { |
| 229 base::MessageLoop::current()->PostTask( | 229 base::MessageLoop::current()->PostTask( |
| 230 FROM_HERE, | 230 FROM_HERE, |
| 231 base::Bind(&ExtensionService::ReloadExtension, | 231 base::Bind(&ExtensionService::ReloadExtension, |
| 232 base::Unretained(extensions::ExtensionSystem::Get(profile_) | 232 base::Unretained(extensions::ExtensionSystem::Get(profile_) |
| 233 ->extension_service()), | 233 ->extension_service()), |
| 234 extension_id)); | 234 extension_id, |
| 235 true)); |
| 235 } | 236 } |
| 236 | 237 |
| 237 dialog->GetWidget()->Close(); | 238 dialog->GetWidget()->Close(); |
| 238 } | 239 } |
| 239 | 240 |
| 240 // static | 241 // static |
| 241 void SelectFileDialogExtension::OnFileSelected( | 242 void SelectFileDialogExtension::OnFileSelected( |
| 242 RoutingID routing_id, | 243 RoutingID routing_id, |
| 243 const ui::SelectedFileInfo& file, | 244 const ui::SelectedFileInfo& file, |
| 244 int index) { | 245 int index) { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 } | 427 } |
| 427 | 428 |
| 428 // Connect our listener to FileDialogFunction's per-tab callbacks. | 429 // Connect our listener to FileDialogFunction's per-tab callbacks. |
| 429 AddPending(routing_id); | 430 AddPending(routing_id); |
| 430 | 431 |
| 431 extension_dialog_ = dialog; | 432 extension_dialog_ = dialog; |
| 432 params_ = params; | 433 params_ = params; |
| 433 routing_id_ = routing_id; | 434 routing_id_ = routing_id; |
| 434 owner_window_ = owner_window; | 435 owner_window_ = owner_window; |
| 435 } | 436 } |
| OLD | NEW |