electron/atom/browser/web_dialog_helper.h

46 lines
1 KiB
C
Raw Normal View History

2014-10-30 16:37:14 +00:00
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_WEB_DIALOG_HELPER_H_
#define ATOM_BROWSER_WEB_DIALOG_HELPER_H_
#include "base/memory/weak_ptr.h"
namespace base {
class FilePath;
}
namespace content {
2014-10-31 09:37:32 +00:00
struct FileChooserParams;
2016-09-06 08:24:37 +00:00
class RenderFrameHost;
2014-10-30 16:37:14 +00:00
class WebContents;
}
namespace atom {
class NativeWindow;
class WebDialogHelper {
public:
2014-10-31 09:37:32 +00:00
explicit WebDialogHelper(NativeWindow* window);
2014-10-30 16:37:14 +00:00
~WebDialogHelper();
2016-09-06 08:24:37 +00:00
void RunFileChooser(content::RenderFrameHost* render_frame_host,
2014-10-31 09:37:32 +00:00
const content::FileChooserParams& params);
void EnumerateDirectory(content::WebContents* web_contents,
int request_id,
const base::FilePath& path);
2014-10-30 16:37:14 +00:00
private:
NativeWindow* window_;
base::WeakPtrFactory<WebDialogHelper> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WebDialogHelper);
};
} // namespace atom
#endif // ATOM_BROWSER_WEB_DIALOG_HELPER_H_