| 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 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "build/build_config.h" |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 #if !defined(OS_WIN) || defined(USE_AURA) | 19 #if !defined(OS_WIN) || defined(USE_AURA) |
| 19 void DoSetForegroundWindow(gfx::NativeWindow /* target_window */) { | 20 void DoSetForegroundWindow(gfx::NativeWindow /* target_window */) { |
| 20 NOTREACHED(); | 21 NOTREACHED(); |
| 21 } | 22 } |
| 22 #else | 23 #else |
| 23 void DoSetForegroundWindow(HWND target_window) { | 24 void DoSetForegroundWindow(HWND target_window) { |
| 24 ::SetForegroundWindow(target_window); | 25 ::SetForegroundWindow(target_window); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 bool ProcessSingletonModalDialogLock::NotificationCallbackImpl( | 57 bool ProcessSingletonModalDialogLock::NotificationCallbackImpl( |
| 57 const base::CommandLine& command_line, | 58 const base::CommandLine& command_line, |
| 58 const base::FilePath& current_directory) { | 59 const base::FilePath& current_directory) { |
| 59 if (active_dialog_ != NULL) { | 60 if (active_dialog_ != NULL) { |
| 60 set_foreground_window_handler_.Run(active_dialog_); | 61 set_foreground_window_handler_.Run(active_dialog_); |
| 61 return true; | 62 return true; |
| 62 } else { | 63 } else { |
| 63 return original_callback_.Run(command_line, current_directory); | 64 return original_callback_.Run(command_line, current_directory); |
| 64 } | 65 } |
| 65 } | 66 } |
| OLD | NEW |