My favorites | Sign in
Project Home Downloads Wiki Issues
New issue   Search
for
  Advanced search   Search tips
Issue 11359: Implement navigator.registerProtocolHandler() and registerContentHandler()
69 people starred this issue and may be notified of changes. Back to list
 
Reported by hotaru.firefly, May 2, 2009
Chrome Version       : 2.0.177.1 (Official Build 14854)
URLs (if applicable) :
javascript:alert(typeof(navigator.registerProtocolHandler)!='undefined'?
'OK':'FAIL')
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 4: FAIL
  Firefox 3.x: OK
         IE 7: FAIL
         IE 8: FAIL

What steps will reproduce the problem?
1. enter 
"javascript:alert(typeof(navigator.registerProtocolHandler)!='undefined'?
'OK':'FAIL')" in the address bar
2. see that the alert says "FAIL" instead of "OK"

What is the expected result?
an alert that says "OK"

What happens instead?
an alert that says "FAIL"

Please provide any additional information below. Attach a screenshot if
possible.
http://www.w3.org/TR/html5/browsers.html#dom-navigator-
registerprotocolhandler
Comment 1 by pkasting@chromium.org, Sep 1, 2009
(No comment was entered for this change.)
Status: Available
Labels: -Type-Bug -Area-Misc Type-Feature Area-WebKit
Comment 2 by pkasting@chromium.org, Sep 1, 2009
(No comment was entered for this change.)
Summary: Implement navigator.registerProtocolHandler() and registerContentHandler()
Labels: HTML5
Comment 3 by pkasting@chromium.org, Sep 16, 2009
 Issue 21331  has been merged into this issue.
Comment 4 by pkasting@chromium.org, Sep 16, 2009
 Issue 2448  has been merged into this issue.
Comment 5 by b...@chromium.org, Sep 17, 2009
(No comment was entered for this change.)
Status: Assigned
Owner: b...@chromium.org
Comment 6 by b...@chromium.org, Sep 23, 2009
Webkit implementation under review: http://webkit.org/b/29651
Comment 7 by b...@chromium.org, Oct 1, 2009
(No comment was entered for this change.)
Status: Started
Comment 8 by ka...@chromium.org, Oct 19, 2009
(No comment was entered for this change.)
Labels: Mstone-4
Comment 9 by b...@chromium.org, Oct 30, 2009
Moving to further release, as the work has slowed.  Should be in webkit shortly, then Chrome implementation.
Labels: -Mstone-4 Mstone-5
Comment 10 by asac@jwsdot.com, Nov 24, 2009
webkit bug referenced seems to be fixed now

http://trac.webkit.org/changeset/50477
https://bugs.webkit.org/show_bug.cgi?id=29651#c29
Comment 11 by ka...@chromium.org, Jan 11, 2010
(No comment was entered for this change.)
Labels: -HTML5 WebKit-WebApps karenianreview
Comment 12 by ian.chromium@gmail.com, Jan 14, 2010
(No comment was entered for this change.)
Labels: -Mstone-5 Mstone-X
Comment 13 by ka...@chromium.org, Jan 14, 2010
(No comment was entered for this change.)
Labels: -karenianreview
Comment 14 by b...@chromium.org, Feb 11, 2010
The webkit work has been completed.  Current tasks preclude the ability to continue 
this on the chrome side.
Status: Available
Owner: ---
Comment 15 by zelid...@chromium.org, Apr 20, 2010
ChromeOS side is interested in seeing this happen soon since we need to handle mailto: 
protocol (see http://crosbug.com/59).
Comment 16 by denisrom...@chromium.org, Apr 21, 2010
(No comment was entered for this change.)
Labels: Iteration-2
Comment 17 by denisrom...@chromium.org, Apr 21, 2010
(No comment was entered for this change.)
Owner: denisrom...@chromium.org
Comment 18 by denisrom...@chromium.org, Apr 21, 2010
(No comment was entered for this change.)
Cc: zelid...@chromium.org
Comment 19 by jeffr...@chromium.org, Apr 26, 2010
(No comment was entered for this change.)
Labels: -Mstone-X Mstone-6
Comment 20 by denisrom...@chromium.org, Jun 10, 2010
(No comment was entered for this change.)
Owner: ---
Comment 21 by ka...@chromium.org, Jun 28, 2010
giving to ian to triage.
Status: Untriaged
Owner: i...@chromium.org
Comment 22 by jeffr...@chromium.org, Jun 28, 2010
dimich@ said he was interested in tackling this
Cc: dim...@chromium.org
Comment 23 by beverloo.peter@gmail.com, Jun 29, 2010
Chromium has been reporting to support this for over a month already, see  bug 44984 
Comment 24 by ian.chromium@gmail.com, Jun 29, 2010
Dmitry, is this something you can look at? At the very least, we shouldn't be advertising support for a feature we don't have, and would be good to at least fix that for -6.
Owner: dim...@chromium.org
Comment 25 by ian.chromium@gmail.com, Jun 29, 2010
(marking assigned, oops)
Status: Assigned
Comment 26 by dim...@chromium.org, Jun 30, 2010
I'll disable this for now, using the  bug 44984  for that. Implementation (this bug) is moved to M7.
Labels: -Mstone-6 Mstone-7
Comment 27 by erik...@chromium.org, Jul 2, 2010
 Issue 36425  has been merged into this issue.
Comment 28 by katiuska...@gmail.com, Jul 27, 2010
Here is a great demo by mozilla on using it for federated login (using ostatus) http://blog.mozilla.com/webdev/2010/07/26/registerprotocolhandler-enhancing-the-federated-web/
Comment 29 by dim...@chromium.org, Aug 18, 2010
(No comment was entered for this change.)
Labels: -Mstone-7 Mstone-X
Comment 30 by koz@chromium.org, Oct 20, 2010
I'll give this a crack.
Owner: k...@chromium.org
Comment 31 by darin@chromium.org, Jan 5, 2011
Putting this on the radar for M11.
Labels: -Mstone-X Mstone-11
Comment 32 by koz@chromium.org, Jan 6, 2011
Yep, that should be fine.
Comment 33 by koz@chromium.org, Feb 16, 2011
LGTM'd implementation in http://codereview.chromium.org/6410115/.
Comment 34 by bugdro...@chromium.org, Feb 22, 2011
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=75681

------------------------------------------------------------------------
r75681 | tony@chromium.org | Tue Feb 22 16:39:48 PST 2011

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/profiles/profile.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/profiles/profile.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/render_messages_internal.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/profiles/profile_io_data.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/pref_names.h?r1=75681&r2=75680&pathrev=75681
 A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/custom_handlers/protocol_handler.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/render_view.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/profiles/profile_impl.h?r1=75681&r2=75680&pathrev=75681
 A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc?r1=75681&r2=75680&pathrev=75681
 A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/custom_handlers?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/testing_profile.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/app/generated_resources.grd?r1=75681&r2=75680&pathrev=75681
 A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/custom_handlers/protocol_handler_registry.h?r1=75681&r2=75680&pathrev=75681
 A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/custom_handlers/protocol_handler_registry.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/chrome_browser.gypi?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/testing_profile.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/tab_contents/tab_contents.h?r1=75681&r2=75680&pathrev=75681
 A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/profiles/profile_impl.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/prefs/browser_prefs.cc?r1=75681&r2=75680&pathrev=75681
 A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/custom_handlers/protocol_handler.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/render_view.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/chrome_url_request_context.h?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/pref_names.cc?r1=75681&r2=75680&pathrev=75681
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/profiles/profile_io_data.cc?r1=75681&r2=75680&pathrev=75681

Adds navigator.registerProtocolHandler.

BUG=11359
TEST=None at the moment

Review URL: http://codereview.chromium.org/6410115
------------------------------------------------------------------------
Comment 35 by kar...@google.com, Mar 9, 2011
rolling non releaseblocker mstone 11 bugs to mstone 12. 
Labels: -Mstone-11 MovedFrom-11 Mstone-12
Comment 36 by koz@chromium.org, Apr 18, 2011
The scope of this feature has expanded significantly, so moving to M-14.
Labels: -MovedFrom-11 -Mstone-12 Mstone-14
Comment 37 by koz@chromium.org, Jun 20, 2011
registerProtocolHandler is in M13, but there are currently no plans to implement registerContentHandler.
Status: Fixed
Labels: -Mstone-14 Mstone-13
Comment 38 by ch...@lookout.net, Jan 25, 2012
registerProtocolHandler does not seem to return an exception for failures. For example, try registering the illegal uri "javascript:" as below.  The catch() block will never get called.

try {
  navigator.registerProtocolHandler("web+js",
                                  "javascript:alert('%s')",
                                  "web+ prefix javascript test");
}
catch (ex) {
  alert(ex.message); 
}

Contrast that to another test of another illegal scheme-relative uri which does not hit the catch block.

try {
  navigator.registerProtocolHandler("web+foo",
                                  "//foo.example.com/foo?bar=%s",
                                  "web+ prefix test");
}
catch (ex) {
  alert(ex.message); 
}

The following test will hit the catch block, and return an expected error message "SYNTAX_ERR: DOM Exception 12".

try {
  navigator.registerProtocolHandler("web+foo",
                                  "http://www.example.com/foo?bar",
                                  "web+ prefix without required %s");
}
catch (ex) {
  alert(ex.message); 
}


Comment 39 by phistuck@gmail.com, Jan 25, 2012
@chris -
This issue is about implementing it, which is done.
Please, file a new issue for this (probably) bug.
Sign in to add a comment

Powered by Google Project Hosting