// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System.Collections.Generic;
namespace CefSharp
{
///
/// Implement this interface to handle dialog events. The methods of this class will be called on the browser process UI thread.
///
public interface IDialogHandler
{
///
/// Runs a file chooser dialog.
///
///
/// To test assign something like TempFileDialogHandler (from CefSharp.Example) to DialogHandler e.g.
///
/// browser.DialogHandler = new TempFileDialogHandler();
///
/// Example URL to use for file browsing http://www.cs.tut.fi/~jkorpela/forms/file.html#example
/// Simply click browse, the space next to the browse button should be populated with a randomly generated filename.
///
/// the browser object
/// represents the type of dialog to display
/// the title to be used for the dialog. It may be empty to show the default title ("Open" or "Save"
/// depending on the mode).
/// the default file name to select in the dialog.
/// a list of valid lower-cased MIME types or file extensions specified in an input element and
/// is used to restrict selectable files to such types.
/// the filename(s) the dialog returns
/// To display a custom dialog return true. To display the default dialog return false.
bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFileName, List acceptTypes, out List result);
}
}