Simplify OSR guest view implementation

This commit is contained in:
Marshall Greenblatt
2017-02-10 17:44:11 -05:00
parent a6a3da2d53
commit 4c4ae85089
14 changed files with 606 additions and 337 deletions

View File

@@ -2233,26 +2233,13 @@ bool CefBrowserHostImpl::CanDragEnter(
return true;
}
bool CefBrowserHostImpl::ShouldCreateWebContents(
void CefBrowserHostImpl::GetCustomWebContentsView(
content::WebContents* web_contents,
int route_id,
int main_frame_route_id,
int32_t main_frame_widget_route_id,
WindowContainerType window_container_type,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace,
content::WebContentsView** view,
content::RenderViewHostDelegateView** delegate_view) {
// In cases where the navigation will occur in a new render process the
// |route_id| value will be MSG_ROUTING_NONE here (because the existing
// renderer will not be able to communicate with the new renderer) and
// OpenURLFromTab will be called after WebContentsCreated.
CefBrowserInfoManager::GetInstance()->ShouldCreateWebContents(
CefBrowserInfoManager::GetInstance()->GetCustomWebContentsView(
web_contents, target_url, view, delegate_view);
return true;
}
void CefBrowserHostImpl::WebContentsCreated(