| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/process_singleton_modal_dialog_lock.h" | 5 #include "chrome/browser/process_singleton_modal_dialog_lock.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <Windows.h> | 8 #include <Windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 active_dialog_ = active_dialog; | 47 active_dialog_ = active_dialog; |
| 48 } | 48 } |
| 49 | 49 |
| 50 ProcessSingleton::NotificationCallback | 50 ProcessSingleton::NotificationCallback |
| 51 ProcessSingletonModalDialogLock::AsNotificationCallback() { | 51 ProcessSingletonModalDialogLock::AsNotificationCallback() { |
| 52 return base::Bind(&ProcessSingletonModalDialogLock::NotificationCallbackImpl, | 52 return base::Bind(&ProcessSingletonModalDialogLock::NotificationCallbackImpl, |
| 53 base::Unretained(this)); | 53 base::Unretained(this)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool ProcessSingletonModalDialogLock::NotificationCallbackImpl( | 56 bool ProcessSingletonModalDialogLock::NotificationCallbackImpl( |
| 57 const CommandLine& command_line, | 57 const base::CommandLine& command_line, |
| 58 const base::FilePath& current_directory) { | 58 const base::FilePath& current_directory) { |
| 59 if (active_dialog_ != NULL) { | 59 if (active_dialog_ != NULL) { |
| 60 set_foreground_window_handler_.Run(active_dialog_); | 60 set_foreground_window_handler_.Run(active_dialog_); |
| 61 return true; | 61 return true; |
| 62 } else { | 62 } else { |
| 63 return original_callback_.Run(command_line, current_directory); | 63 return original_callback_.Run(command_line, current_directory); |
| 64 } | 64 } |
| 65 } | 65 } |
| OLD | NEW |