FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/src/client_handler/js_dialog_handler.cpp at cefpython49-winxp · 2php/cefpython · GitHub
2php
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
src
/
client_handler
/
js_dialog_handler.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
80 lines (70 loc) · 2.82 KB
Breadcrumbs
cefpython
/
src
/
client_handler
/
js_dialog_handler.cpp
Copy path
File metadata and controls
80 lines (70 loc) · 2.82 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//
Copyright (c) 2016 CEF Python, see the Authors file.
//
All rights reserved. Licensed under BSD 3-clause license.
//
Project website: https://github.com/cztomczak/cefpython
#
include
"
js_dialog_handler.h
"
JSDialogHandler::JSDialogHandler
()
{
#
if
defined(OS_LINUX)
//
Provide the GTK-based default dialog implementation on Linux.
dialog_handler_ =
new
ClientDialogHandlerGtk
();
#
endif
}
bool
JSDialogHandler::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)
{
REQUIRE_UI_THREAD
();
bool
ret =
JavascriptDialogHandler_OnJavascriptDialog
(
browser, origin_url, accept_lang,
dialog_type, message_text,
default_prompt_text,
callback, suppress_message);
#
if
defined(OS_LINUX)
if
(!ret) {
//
Default implementation
return
dialog_handler_->
OnJSDialog
(browser, origin_url, dialog_type,
message_text, default_prompt_text,
callback, suppress_message);
}
#
endif
return
ret;
}
bool
JSDialogHandler::OnBeforeUnloadDialog
(
CefRefPtr<CefBrowser> browser,
const
CefString& message_text,
bool
is_reload,
CefRefPtr<CefJSDialogCallback> callback)
{
REQUIRE_UI_THREAD
();
bool
ret =
JavascriptDialogHandler_OnBeforeUnloadJavascriptDialog
(
browser, message_text,
is_reload, callback);
#
if
defined(OS_LINUX)
if
(!ret) {
//
Default implementation
return
dialog_handler_->
OnBeforeUnloadDialog
(browser, message_text,
is_reload, callback);
}
#
endif
return
ret;
}
void
JSDialogHandler::OnResetDialogState
(CefRefPtr<CefBrowser> browser)
{
REQUIRE_UI_THREAD
();
#
if
defined(OS_LINUX)
//
Default implementation
dialog_handler_->
OnResetDialogState
(browser);
#
endif
//
User implementation
JavascriptDialogHandler_OnResetJavascriptDialogState
(browser);
}
void
JSDialogHandler::OnDialogClosed
(CefRefPtr<CefBrowser> browser)
{
REQUIRE_UI_THREAD
();
JavascriptDialogHandler_OnJavascriptDialogClosed
(browser);
}
Back
|
FazBrowse Home
|
New Git URL