Chrome changed the devtools url

chrome-devtools:// to devtools://
28b21a67f0
This commit is contained in:
Nitish Sakhawalkar 2019-05-17 15:37:09 -07:00
parent aa00b19c92
commit cf5224140b
13 changed files with 14 additions and 16 deletions

View file

@ -2080,7 +2080,7 @@ v8::Local<v8::Value> WebContents::GetLastWebPreferences(
}
bool WebContents::IsRemoteModuleEnabled() const {
if (web_contents()->GetVisibleURL().SchemeIs("chrome-devtools")) {
if (web_contents()->GetVisibleURL().SchemeIs("devtools")) {
return false;
}
if (auto* web_preferences = WebContentsPreferences::From(web_contents())) {

View file

@ -500,7 +500,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
content::WebContents* web_contents = GetWebContentsFromProcessID(process_id);
if (web_contents) {
if (web_contents->GetVisibleURL().SchemeIs("chrome-devtools")) {
if (web_contents->GetVisibleURL().SchemeIs("devtools")) {
command_line->AppendSwitch(switches::kDisableRemoteModule);
}
auto* web_preferences = WebContentsPreferences::From(web_contents);

View file

@ -23,9 +23,7 @@ const char kChromeUIDevToolsHost[] = "devtools";
const char kChromeUIDevToolsBundledPath[] = "bundled";
std::string PathWithoutParams(const std::string& path) {
return GURL(std::string("chrome-devtools://devtools/") + path)
.path()
.substr(1);
return GURL(std::string("devtools://devtools/") + path).path().substr(1);
}
std::string GetMimeTypeForPath(const std::string& path) {

View file

@ -54,14 +54,14 @@ const double kPresetZoomFactors[] = {0.25, 0.333, 0.5, 0.666, 0.75, 0.9,
2.5, 3.0, 4.0, 5.0};
const char kChromeUIDevToolsURL[] =
"chrome-devtools://devtools/bundled/devtools_app.html?"
"devtools://devtools/bundled/devtools_app.html?"
"remoteBase=%s&"
"can_dock=%s&"
"toolbarColor=rgba(223,223,223,1)&"
"textColor=rgba(0,0,0,1)&"
"experiments=true";
const char kChromeUIDevToolsRemoteFrontendBase[] =
"https://chrome-devtools-frontend.appspot.com/";
"https://devtools-frontend.appspot.com/";
const char kChromeUIDevToolsRemoteFrontendPath[] = "serve_file";
const char kDevToolsBoundsPref[] = "electron.devtools.bounds";

View file

@ -35,7 +35,7 @@ const char kModuleCacheKey[] = "native-module-cache";
bool IsDevTools(content::RenderFrame* render_frame) {
return render_frame->GetWebFrame()->GetDocument().Url().ProtocolIs(
"chrome-devtools");
"devtools");
}
bool IsDevToolsExtension(content::RenderFrame* render_frame) {