Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1041)

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/chrome_debug_launcher/launch_chrome.js

Issue 2515903002: DevTools: webui receives document load message upon navigation, even for cross-domain navigations. … (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var childProcess = require("child_process"); 5 var childProcess = require("child_process");
6 var fs = require("fs"); 6 var fs = require("fs");
7 var path = require("path"); 7 var path = require("path");
8 var shell = childProcess.execSync; 8 var shell = childProcess.execSync;
9 9
10 var utils = require("../utils"); 10 var utils = require("../utils");
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 fs.accessSync(chromeCanaryPath); 61 fs.accessSync(chromeCanaryPath);
62 break; 62 break;
63 } catch (e) { 63 } catch (e) {
64 } 64 }
65 } 65 }
66 launchChrome(chromeCanaryPath, chromeArgs); 66 launchChrome(chromeCanaryPath, chromeArgs);
67 } 67 }
68 68
69 function launchChromeMac() 69 function launchChromeMac()
70 { 70 {
71 var lsregister = "/System/Library/Frameworks/CoreServices.framework/Versions /A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister"; 71 var chromeExecPath;
72 var chromeCanaryPath = shellOutput(`${lsregister} -dump | grep -i 'applicati ons/google chrome canary.app$' | awk '{$1=""; print $0}' | head -n 1`); 72 if (utils.isFile(process.env.CHROMIUM_PATH)) {
73 var chromeCanaryExecPath = `${chromeCanaryPath}/Contents/MacOS/Google Chrome Canary`; 73 chromeExecPath = process.env.CHROMIUM_PATH;
74 launchChrome(chromeCanaryExecPath, chromeArgs); 74 } else {
75 var lsregister = "/System/Library/Frameworks/CoreServices.framework/Versio ns/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister";
76 var chromeCanaryPath = shellOutput(`${lsregister} -dump | grep -i 'applica tions/google chrome canary.app$' | awk '{$1=""; print $0}' | head -n 1`);
77 chromeExecPath = `${chromeCanaryPath}/Contents/MacOS/Google Chrome Canary` ;
78 }
79 launchChrome(chromeExecPath, chromeArgs);
75 } 80 }
76 81
77 function launchChromeLinux() 82 function launchChromeLinux()
78 { 83 {
79 var chromiumPath; 84 var chromiumPath;
80 if (utils.isFile(process.env.CHROMIUM_PATH)) 85 if (utils.isFile(process.env.CHROMIUM_PATH))
81 chromiumPath = process.env.CHROMIUM_PATH; 86 chromiumPath = process.env.CHROMIUM_PATH;
82 else if (utils.isFile(CHROMIUM_DEFAULT_PATH)) { 87 else if (utils.isFile(CHROMIUM_DEFAULT_PATH)) {
83 chromiumPath = CHROMIUM_DEFAULT_PATH; 88 chromiumPath = CHROMIUM_DEFAULT_PATH;
84 } else { 89 } else {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 { 132 {
128 var string = buffer.toString(); 133 var string = buffer.toString();
129 console.log(string); 134 console.log(string);
130 return string; 135 return string;
131 } 136 }
132 137
133 function shellOutput(command) 138 function shellOutput(command)
134 { 139 {
135 return shell(command).toString().trim(); 140 return shell(command).toString().trim();
136 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698