1 // Copyright 2017 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/ui/browser_dialogs.h"
6 
7 #include "base/callback_helpers.h"
8 #include "base/metrics/histogram_macros.h"
9 
10 namespace chrome {
11 
RecordDialogCreation(DialogIdentifier identifier)12 void RecordDialogCreation(DialogIdentifier identifier) {
13   UMA_HISTOGRAM_ENUMERATION("Dialog.Creation", identifier,
14                             DialogIdentifier::MAX_VALUE);
15 }
16 
17 #if !defined(TOOLKIT_VIEWS)
ShowDeviceChooserDialog(content::RenderFrameHost * owner,std::unique_ptr<ChooserController> controller)18 base::OnceClosure ShowDeviceChooserDialog(
19     content::RenderFrameHost* owner,
20     std::unique_ptr<ChooserController> controller) {
21   NOTIMPLEMENTED();
22   return base::DoNothing();
23 }
IsDeviceChooserShowingForTesting()24 bool IsDeviceChooserShowingForTesting() {
25   NOTIMPLEMENTED();
26   return false;
27 }
28 
ShowWindowNamePrompt(Browser * browser)29 void ShowWindowNamePrompt(Browser* browser) {
30   NOTIMPLEMENTED();
31 }
32 
ShowWindowNamePromptForTesting(Browser * browser,gfx::NativeWindow context)33 void ShowWindowNamePromptForTesting(Browser* browser,
34                                     gfx::NativeWindow context) {
35   NOTIMPLEMENTED();
36 }
37 #endif
38 
39 }  // namespace chrome
40 
41 #if !defined(TOOLKIT_VIEWS)
42 // There's no dialog version of this available outside views, run callback as if
43 // the dialog was instantly accepted.
ShowFolderUploadConfirmationDialog(const base::FilePath & path,base::OnceCallback<void (const std::vector<ui::SelectedFileInfo> &)> callback,std::vector<ui::SelectedFileInfo> selected_files,content::WebContents * web_contents)44 void ShowFolderUploadConfirmationDialog(
45     const base::FilePath& path,
46     base::OnceCallback<void(const std::vector<ui::SelectedFileInfo>&)> callback,
47     std::vector<ui::SelectedFileInfo> selected_files,
48     content::WebContents* web_contents) {
49   std::move(callback).Run(selected_files);
50 }
51 #endif  // !defined(TOOLKIT_VIEWS)
52