mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "base/file_path.h"
|
#include "base/file_path.h"
|
||||||
#include "base/path_service.h"
|
#include "base/path_service.h"
|
||||||
|
#include "base/stringprintf.h"
|
||||||
#include "base/synchronization/waitable_event.h"
|
#include "base/synchronization/waitable_event.h"
|
||||||
#include "base/utf_string_conversions.h"
|
#include "base/utf_string_conversions.h"
|
||||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||||
@@ -1430,11 +1431,14 @@ void CefBrowserImpl::UIT_ShowDevTools()
|
|||||||
FilePath devtools_path =
|
FilePath devtools_path =
|
||||||
dir_exe.AppendASCII("resources/inspector/devtools.html");
|
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;
|
CefPopupFeatures features;
|
||||||
CefRefPtr<CefBrowserImpl> browser =
|
CefRefPtr<CefBrowserImpl> browser = UIT_CreatePopupWindow(url, 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_LoadURL(browser->GetMainFrame(), url);
|
||||||
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.
|
||||||
|
Reference in New Issue
Block a user