Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
e047bb09
Commit
e047bb09
authored
5 years ago
by
AndreyL ProductEngine
Browse files
Options
Downloads
Patches
Plain Diff
SL-10962 Support for suppressing JavaScript dialogs in the media plugin code
parent
87be5f79
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/media_plugins/cef/media_plugin_cef.cpp
+10
-0
10 additions, 0 deletions
indra/media_plugins/cef/media_plugin_cef.cpp
with
10 additions
and
0 deletions
indra/media_plugins/cef/media_plugin_cef.cpp
+
10
−
0
View file @
e047bb09
...
@@ -72,6 +72,7 @@ class MediaPluginCEF :
...
@@ -72,6 +72,7 @@ class MediaPluginCEF :
bool
onHTTPAuthCallback
(
const
std
::
string
host
,
const
std
::
string
realm
,
std
::
string
&
username
,
std
::
string
&
password
);
bool
onHTTPAuthCallback
(
const
std
::
string
host
,
const
std
::
string
realm
,
std
::
string
&
username
,
std
::
string
&
password
);
void
onCursorChangedCallback
(
dullahan
::
ECursorType
type
);
void
onCursorChangedCallback
(
dullahan
::
ECursorType
type
);
const
std
::
vector
<
std
::
string
>
onFileDialog
(
dullahan
::
EFileDialogType
dialog_type
,
const
std
::
string
dialog_title
,
const
std
::
string
default_file
,
const
std
::
string
dialog_accept_filter
,
bool
&
use_default
);
const
std
::
vector
<
std
::
string
>
onFileDialog
(
dullahan
::
EFileDialogType
dialog_type
,
const
std
::
string
dialog_title
,
const
std
::
string
default_file
,
const
std
::
string
dialog_accept_filter
,
bool
&
use_default
);
bool
onJSDialogCallback
(
const
std
::
string
origin_url
,
const
std
::
string
message_text
,
const
std
::
string
default_prompt_text
);
void
postDebugMessage
(
const
std
::
string
&
msg
);
void
postDebugMessage
(
const
std
::
string
&
msg
);
void
authResponse
(
LLPluginMessage
&
message
);
void
authResponse
(
LLPluginMessage
&
message
);
...
@@ -360,6 +361,14 @@ const std::vector<std::string> MediaPluginCEF::onFileDialog(dullahan::EFileDialo
...
@@ -360,6 +361,14 @@ const std::vector<std::string> MediaPluginCEF::onFileDialog(dullahan::EFileDialo
return
std
::
vector
<
std
::
string
>
();
return
std
::
vector
<
std
::
string
>
();
}
}
////////////////////////////////////////////////////////////////////////////////
//
bool
MediaPluginCEF
::
onJSDialogCallback
(
const
std
::
string
origin_url
,
const
std
::
string
message_text
,
const
std
::
string
default_prompt_text
)
{
// return true indicates we suppress the JavaScript alert UI entirely
return
true
;
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
//
void
MediaPluginCEF
::
onCursorChangedCallback
(
dullahan
::
ECursorType
type
)
void
MediaPluginCEF
::
onCursorChangedCallback
(
dullahan
::
ECursorType
type
)
...
@@ -506,6 +515,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
...
@@ -506,6 +515,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
mCEFLib
->
setOnFileDialogCallback
(
std
::
bind
(
&
MediaPluginCEF
::
onFileDialog
,
this
,
std
::
placeholders
::
_1
,
std
::
placeholders
::
_2
,
std
::
placeholders
::
_3
,
std
::
placeholders
::
_4
,
std
::
placeholders
::
_5
));
mCEFLib
->
setOnFileDialogCallback
(
std
::
bind
(
&
MediaPluginCEF
::
onFileDialog
,
this
,
std
::
placeholders
::
_1
,
std
::
placeholders
::
_2
,
std
::
placeholders
::
_3
,
std
::
placeholders
::
_4
,
std
::
placeholders
::
_5
));
mCEFLib
->
setOnCursorChangedCallback
(
std
::
bind
(
&
MediaPluginCEF
::
onCursorChangedCallback
,
this
,
std
::
placeholders
::
_1
));
mCEFLib
->
setOnCursorChangedCallback
(
std
::
bind
(
&
MediaPluginCEF
::
onCursorChangedCallback
,
this
,
std
::
placeholders
::
_1
));
mCEFLib
->
setOnRequestExitCallback
(
std
::
bind
(
&
MediaPluginCEF
::
onRequestExitCallback
,
this
));
mCEFLib
->
setOnRequestExitCallback
(
std
::
bind
(
&
MediaPluginCEF
::
onRequestExitCallback
,
this
));
mCEFLib
->
setOnJSDialogCallback
(
std
::
bind
(
&
MediaPluginCEF
::
onJSDialogCallback
,
this
,
std
::
placeholders
::
_1
,
std
::
placeholders
::
_2
,
std
::
placeholders
::
_3
));
dullahan
::
dullahan_settings
settings
;
dullahan
::
dullahan_settings
settings
;
settings
.
accept_language_list
=
mHostLanguage
;
settings
.
accept_language_list
=
mHostLanguage
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment