| Index: chrome/browser/modal_dialog_lock.cc
|
| diff --git a/chrome/browser/modal_dialog_lock.cc b/chrome/browser/modal_dialog_lock.cc
|
| index c341fee96428b25454dfd79fda18cf8e579c9560..76668d5fed339cdac5de1b9ae7c2b807396ea998 100644
|
| --- a/chrome/browser/modal_dialog_lock.cc
|
| +++ b/chrome/browser/modal_dialog_lock.cc
|
| @@ -1,54 +1,54 @@
|
| -// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "chrome/browser/modal_dialog_lock.h"
|
| -
|
| -#if defined(OS_WIN)
|
| -#include <Windows.h>
|
| -#endif
|
| -
|
| -#include "base/bind.h"
|
| -#include "base/command_line.h"
|
| -#include "base/files/file_path.h"
|
| -#include "base/logging.h"
|
| -
|
| -ModalDialogLock::ModalDialogLock(
|
| - const ProcessSingleton::NotificationCallback& original_callback)
|
| - : active_dialog_(NULL),
|
| - original_callback_(original_callback) {}
|
| -
|
| -ModalDialogLock::~ModalDialogLock() {}
|
| -
|
| -void ModalDialogLock::SetActiveModalDialog(gfx::NativeWindow active_dialog) {
|
| -#if !defined(OS_WIN) || defined(USE_AURA)
|
| - NOTREACHED();
|
| -#else
|
| - active_dialog_ = active_dialog;
|
| -#endif
|
| -}
|
| -
|
| -ProcessSingleton::NotificationCallback
|
| -ModalDialogLock::AsNotificationCallback() {
|
| -#if !defined(OS_WIN) || defined(USE_AURA)
|
| - return original_callback_;
|
| -#else
|
| - return base::Bind(&ModalDialogLock::NotificationCallbackImpl,
|
| - base::Unretained(this));
|
| -#endif
|
| -}
|
| -
|
| -bool ModalDialogLock::NotificationCallbackImpl(
|
| - const CommandLine& command_line,
|
| - const base::FilePath& current_directory) {
|
| - if (active_dialog_ != NULL) {
|
| -#if !defined(OS_WIN) || defined(USE_AURA)
|
| - NOTREACHED();
|
| -#else
|
| - ::SetForegroundWindow(active_dialog_);
|
| -#endif
|
| - return true;
|
| - } else {
|
| - return original_callback_.Run(command_line, current_directory);
|
| - }
|
| -}
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/modal_dialog_lock.h"
|
| +
|
| +#if defined(OS_WIN)
|
| +#include <Windows.h>
|
| +#endif
|
| +
|
| +#include "base/bind.h"
|
| +#include "base/command_line.h"
|
| +#include "base/files/file_path.h"
|
| +#include "base/logging.h"
|
| +
|
| +ModalDialogLock::ModalDialogLock(
|
| + const ProcessSingleton::NotificationCallback& original_callback)
|
| + : active_dialog_(NULL),
|
| + original_callback_(original_callback) {}
|
| +
|
| +ModalDialogLock::~ModalDialogLock() {}
|
| +
|
| +void ModalDialogLock::SetActiveModalDialog(gfx::NativeWindow active_dialog) {
|
| +#if !defined(OS_WIN) || defined(USE_AURA)
|
| + NOTREACHED();
|
| +#else
|
| + active_dialog_ = active_dialog;
|
| +#endif
|
| +}
|
| +
|
| +ProcessSingleton::NotificationCallback
|
| +ModalDialogLock::AsNotificationCallback() {
|
| +#if !defined(OS_WIN) || defined(USE_AURA)
|
| + return original_callback_;
|
| +#else
|
| + return base::Bind(&ModalDialogLock::NotificationCallbackImpl,
|
| + base::Unretained(this));
|
| +#endif
|
| +}
|
| +
|
| +bool ModalDialogLock::NotificationCallbackImpl(
|
| + const CommandLine& command_line,
|
| + const base::FilePath& current_directory) {
|
| + if (active_dialog_ != NULL) {
|
| +#if !defined(OS_WIN) || defined(USE_AURA)
|
| + NOTREACHED();
|
| +#else
|
| + ::SetForegroundWindow(active_dialog_);
|
| +#endif
|
| + return true;
|
| + } else {
|
| + return original_callback_.Run(command_line, current_directory);
|
| + }
|
| +}
|
|
|