| 358 | } |
| 359 | |
| 360 | bool ClientDialogHandlerGtk::OnBeforeUnloadDialog( |
| 361 | CefRefPtr<CefBrowser> browser, |
| 362 | const CefString& message_text, |
| 363 | bool is_reload, |
| 364 | CefRefPtr<CefJSDialogCallback> callback) { |
| 365 | CEF_REQUIRE_UI_THREAD(); |
| 366 | |
| 367 | const std::string& new_message_text = |
| 368 | message_text.ToString() + "\n\nIs it OK to leave/reload this page?"; |
| 369 | bool suppress_message = false; |
| 370 | |
| 371 | return OnJSDialog(browser, CefString(), JSDIALOGTYPE_CONFIRM, |
| 372 | new_message_text, CefString(), callback, suppress_message); |
| 373 | } |
| 374 | |
| 375 | void ClientDialogHandlerGtk::OnResetDialogState(CefRefPtr<CefBrowser> browser) { |
| 376 | CEF_REQUIRE_UI_THREAD(); |