- Explicitly load the URL after calling UIT_CreatePopupWindow (issue #215).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@231 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-05-10 16:41:41 +00:00
parent 092c4e4a9f
commit 2c0f941830
2 changed files with 6 additions and 2 deletions

View File

@ -1380,6 +1380,7 @@ void CefBrowserImpl::UIT_ShowDevTools()
CefRefPtr<CefBrowserImpl> browser = CefRefPtr<CefBrowserImpl> browser =
UIT_CreatePopupWindow(devtools_path.value(), features); UIT_CreatePopupWindow(devtools_path.value(), features);
browser->UIT_CreateDevToolsClient(dev_tools_agent_.get()); browser->UIT_CreateDevToolsClient(dev_tools_agent_.get());
browser->UIT_LoadURL(browser->GetMainFrame(), devtools_path.value());
browser->UIT_Show(WebKit::WebNavigationPolicyNewWindow); browser->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
} else { } else {
// Give focus to the existing inspector window. // Give focus to the existing inspector window.

View File

@ -638,8 +638,11 @@ void BrowserWebViewDelegate::loadURLExternally(
WebFrame* frame, const WebURLRequest& request, WebFrame* frame, const WebURLRequest& request,
WebNavigationPolicy policy) { WebNavigationPolicy policy) {
DCHECK_NE(policy, WebKit::WebNavigationPolicyCurrentTab); DCHECK_NE(policy, WebKit::WebNavigationPolicyCurrentTab);
browser_->UIT_CreatePopupWindow(std::string(request.url().spec().data()), std::string url = request.url().spec().data();
CefPopupFeatures()); CefRefPtr<CefBrowser> newBrowser =
browser_->UIT_CreatePopupWindow(url, CefPopupFeatures());
if (newBrowser.get() && !url.empty())
newBrowser->GetMainFrame()->LoadURL(url);
} }
WebNavigationPolicy BrowserWebViewDelegate::decidePolicyForNavigation( WebNavigationPolicy BrowserWebViewDelegate::decidePolicyForNavigation(