Linux: cefclient: Add a GTK implementation of CefJSDialogHandler (issue #1258).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1760 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-07-09 17:13:06 +00:00
parent 824f8f4009
commit da1ac7dde5
3 changed files with 194 additions and 0 deletions

View File

@@ -98,6 +98,10 @@ ClientHandler::ClientHandler()
m_StopHwnd(NULL),
m_ReloadHwnd(NULL),
m_bFocusOnEditableField(false) {
#if defined(OS_LINUX)
gtk_dialog_ = NULL;
#endif
// Read command line settings.
CefRefPtr<CefCommandLine> command_line =
CefCommandLine::GetGlobalCommandLine();
@@ -260,6 +264,32 @@ bool ClientHandler::OnRequestGeolocationPermission(
return true;
}
#if !defined(OS_LINUX)
bool ClientHandler::OnJSDialog(CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
const CefString& accept_lang,
JSDialogType dialog_type,
const CefString& message_text,
const CefString& default_prompt_text,
CefRefPtr<CefJSDialogCallback> callback,
bool& suppress_message) {
return false;
}
bool ClientHandler::OnBeforeUnloadDialog(
CefRefPtr<CefBrowser> browser,
const CefString& message_text,
bool is_reload,
CefRefPtr<CefJSDialogCallback> callback) {
return false;
}
void ClientHandler::OnResetDialogState(CefRefPtr<CefBrowser> browser) {
}
#endif // !defined(OS_LINUX)
bool ClientHandler::OnPreKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event,
CefEventHandle os_event,