forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell_dialog_linux.cc
37 lines (27 loc) · 989 Bytes
/
shell_dialog_linux.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// 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 "ui/shell_dialogs/shell_dialog_linux.h"
#include "ui/shell_dialogs/select_file_policy.h"
namespace {
ui::ShellDialogLinux* g_shell_dialog_linux = nullptr;
} // namespace
namespace ui {
void ShellDialogLinux::SetInstance(ShellDialogLinux* instance) {
g_shell_dialog_linux = instance;
}
const ShellDialogLinux* ShellDialogLinux::instance() {
return g_shell_dialog_linux;
}
SelectFileDialog* CreateSelectFileDialog(
SelectFileDialog::Listener* listener,
std::unique_ptr<SelectFilePolicy> policy) {
#if defined(USE_AURA) && !defined(OS_CHROMEOS)
const ui::ShellDialogLinux* shell_dialogs = ui::ShellDialogLinux::instance();
if (shell_dialogs)
return shell_dialogs->CreateSelectFileDialog(listener, std::move(policy));
#endif
NOTIMPLEMENTED();
return nullptr;
}
} // namespace ui