@@ -16,7 +16,8 @@ class ClientHandler : public CefClient,
1616 public CefDragHandler,
1717 public CefRequestHandler,
1818 public CefKeyboardHandler,
19- public CefDownloadHandler {
19+ public CefDownloadHandler,
20+ public CefJSDialogHandler {
2021 public:
2122 ClientHandler ();
2223 ~ClientHandler ();
@@ -49,6 +50,9 @@ class ClientHandler : public CefClient,
4950 virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler () {
5051 return this ;
5152 }
53+ virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler () {
54+ return this ;
55+ }
5256 virtual bool OnProcessMessageReceived (CefRefPtr<CefBrowser> browser,
5357 CefRefPtr<CefFrame> frame,
5458 CefProcessId source_process,
@@ -58,6 +62,11 @@ class ClientHandler : public CefClient,
5862 // CefDisplayHandler methods:
5963 virtual void OnTitleChange (CefRefPtr<CefBrowser> browser,
6064 const CefString& title) override ;
65+ virtual bool OnConsoleMessage (CefRefPtr<CefBrowser> browser,
66+ cef_log_severity_t level,
67+ const CefString& message,
68+ const CefString& source,
69+ int line) override ;
6170
6271 // CefLifeSpanHandler methods:
6372 virtual void OnAfterCreated (CefRefPtr<CefBrowser> browser) override ;
@@ -126,6 +135,15 @@ class ClientHandler : public CefClient,
126135 CefRefPtr<CefBrowser> browser,
127136 CefRefPtr<CefDownloadItem> download_item,
128137 CefRefPtr<CefDownloadItemCallback> callback) override ;
138+
139+ // CefJSDialogHandler methods:
140+ virtual bool OnJSDialog (CefRefPtr<CefBrowser> browser,
141+ const CefString& origin_url,
142+ JSDialogType dialog_type,
143+ const CefString& message_text,
144+ const CefString& default_prompt_text,
145+ CefRefPtr<CefJSDialogCallback> callback,
146+ bool & suppress_message) override ;
129147
130148 private:
131149 // Include the default reference counting implementation.
0 commit comments