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:
Marshall Greenblatt
2012-06-25 21:21:27 +00:00
parent 89c70a8b11
commit d13cc9de1c
18 changed files with 253 additions and 0 deletions

View File

@ -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_)