Issue 13620 - Support chrome browser in webbrowser.py module.

This commit is contained in:
Senthil Kumaran 2011-12-21 22:20:32 +08:00
parent d5ec134d82
commit ea6b4187cf
1 changed files with 17 additions and 0 deletions

View File

@ -299,6 +299,18 @@ class Galeon(UnixBrowser):
background = True background = True
class Chrome(UnixBrowser):
"Launcher class for Google Chrome browser."
remote_args = ['%action', '%s']
remote_action = ""
remote_action_newwin = "--new-window"
remote_action_newtab = ""
background = True
Chromium = Chrome
class Opera(UnixBrowser): class Opera(UnixBrowser):
"Launcher class for Opera browser." "Launcher class for Opera browser."
@ -466,6 +478,11 @@ def register_X_browsers():
if _iscommand("skipstone"): if _iscommand("skipstone"):
register("skipstone", None, BackgroundBrowser("skipstone")) register("skipstone", None, BackgroundBrowser("skipstone"))
# Google Chrome/Chromium browsers
for browser in ("google-chrome", "chrome", "chromium", "chromium-browser"):
if _iscommand(browser):
register(browser, None, Chrome(browser))
# Opera, quite popular # Opera, quite popular
if _iscommand("opera"): if _iscommand("opera"):
register("opera", None, Opera("opera")) register("opera", None, Opera("opera"))