Use a file URL for the DevTools path to fix a DevTools load problem on Mac (issue #265).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@259 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
0d893166d3
commit
92cec88ffd
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "base/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
|
@ -1430,11 +1431,14 @@ void CefBrowserImpl::UIT_ShowDevTools()
|
|||
FilePath devtools_path =
|
||||
dir_exe.AppendASCII("resources/inspector/devtools.html");
|
||||
|
||||
// Mac requires that the URL have a file:// prefix.
|
||||
CefString path = devtools_path.value();
|
||||
CefString url(base::StringPrintf("file://%s", path.ToString().c_str()));
|
||||
|
||||
CefPopupFeatures features;
|
||||
CefRefPtr<CefBrowserImpl> browser =
|
||||
UIT_CreatePopupWindow(devtools_path.value(), features);
|
||||
CefRefPtr<CefBrowserImpl> browser = UIT_CreatePopupWindow(url, features);
|
||||
browser->UIT_CreateDevToolsClient(dev_tools_agent_.get());
|
||||
browser->UIT_LoadURL(browser->GetMainFrame(), devtools_path.value());
|
||||
browser->UIT_LoadURL(browser->GetMainFrame(), url);
|
||||
browser->UIT_Show(WebKit::WebNavigationPolicyNewWindow);
|
||||
} else {
|
||||
// Give focus to the existing inspector window.
|
||||
|
|
Loading…
Reference in New Issue