mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add OnProtocolExecution callback to CefRequestHandler (issue #582).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@711 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -804,6 +804,24 @@ bool CefBrowserHostImpl::ViewText(const std::string& text) {
|
||||
return PlatformViewText(text);
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::HandleExternalProtocol(const GURL& url) {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
bool allow_os_execution = false;
|
||||
|
||||
if (client_.get()) {
|
||||
CefRefPtr<CefRequestHandler> handler = client_->GetRequestHandler();
|
||||
if (handler.get())
|
||||
handler->OnProtocolExecution(this, url.spec(), allow_os_execution);
|
||||
}
|
||||
|
||||
if (allow_os_execution)
|
||||
PlatformHandleExternalProtocol(url);
|
||||
} else {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::Bind(&CefBrowserHostImpl::HandleExternalProtocol, this, url));
|
||||
}
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::HasIDMatch(int render_process_id, int render_view_id) {
|
||||
base::AutoLock lock_scope(state_lock_);
|
||||
if (render_process_id != render_process_id_)
|
||||
|
Reference in New Issue
Block a user