[M85 Dev][EFL] Fix errors to generate ninja files
[platform/framework/web/chromium-efl.git] / chrome / browser / process_singleton_modal_dialog_lock.cc
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/process_singleton_modal_dialog_lock.h"
6
7 #include <utility>
8
9 #include "base/bind.h"
10
11 ProcessSingletonModalDialogLock::ProcessSingletonModalDialogLock(
12     const ProcessSingleton::NotificationCallback& original_callback)
13     : original_callback_(original_callback) {}
14
15 ProcessSingletonModalDialogLock::~ProcessSingletonModalDialogLock() {}
16
17 void ProcessSingletonModalDialogLock::SetModalDialogNotificationHandler(
18     base::Closure notification_handler) {
19   notification_handler_ = std::move(notification_handler);
20 }
21
22 ProcessSingleton::NotificationCallback
23 ProcessSingletonModalDialogLock::AsNotificationCallback() {
24   return base::Bind(&ProcessSingletonModalDialogLock::NotificationCallbackImpl,
25                     base::Unretained(this));
26 }
27
28 bool ProcessSingletonModalDialogLock::NotificationCallbackImpl(
29     const base::CommandLine& command_line,
30     const base::FilePath& current_directory) {
31   if (notification_handler_)
32     notification_handler_.Run();
33
34   return original_callback_.Run(command_line, current_directory);
35 }