This source file includes following definitions.
- ShowWebDialog
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
#include "ui/views/controls/webview/web_dialog_view.h"
#include "ui/views/widget/widget.h"
namespace chrome {
gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent,
content::BrowserContext* context,
ui::WebDialogDelegate* delegate) {
views::Widget* widget = NULL;
if (parent) {
widget = views::Widget::CreateWindowWithParent(
new views::WebDialogView(context,
delegate,
new ChromeWebContentsHandler),
parent);
} else {
widget = views::Widget::CreateWindow(
new views::WebDialogView(context,
delegate,
new ChromeWebContentsHandler));
}
widget->Show();
return widget->GetNativeWindow();
}
}