summaryrefslogtreecommitdiffstats
path: root/Lib/webbrowser.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-12-21 14:20:32 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2011-12-21 14:20:32 (GMT)
commitea6b4187cf78ce1ac260c1620b1d4c0fd069beba (patch)
treeb339e5c582941afc15d4ac6166c62ab6db7d1e1e /Lib/webbrowser.py
parentd5ec134d82dc56cafdadbae2e03f054076a27dd5 (diff)
downloadcpython-ea6b4187cf78ce1ac260c1620b1d4c0fd069beba.zip
cpython-ea6b4187cf78ce1ac260c1620b1d4c0fd069beba.tar.gz
cpython-ea6b4187cf78ce1ac260c1620b1d4c0fd069beba.tar.bz2
Issue 13620 - Support chrome browser in webbrowser.py module.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r--Lib/webbrowser.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 6f967b6..d036355 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -299,6 +299,18 @@ class Galeon(UnixBrowser):
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):
"Launcher class for Opera browser."
@@ -466,6 +478,11 @@ def register_X_browsers():
if _iscommand("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
if _iscommand("opera"):
register("opera", None, Opera("opera"))