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

Unified Diff: chrome/common/extensions/docs/templates/intros/webRequest.html

Issue 2449913002: Support WebSocket in WebRequest API. (Closed)
Patch Set: git cl format Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/templates/intros/webRequest.html
diff --git a/chrome/common/extensions/docs/templates/intros/webRequest.html b/chrome/common/extensions/docs/templates/intros/webRequest.html
index a59875ad577da4da5da2c167c704978f236dcd21..1f578c501ba50c7049b8b3d87722cd5fef82cb6e 100644
--- a/chrome/common/extensions/docs/templates/intros/webRequest.html
+++ b/chrome/common/extensions/docs/templates/intros/webRequest.html
@@ -124,7 +124,9 @@ Moreover, only the following schemes are accessible:
<code>http://</code>,
<code>https://</code>,
<code>ftp://</code>,
-<code>file://</code>, or
+<code>file://</code>,
+<code>ws://</code> (<span class="availability">since Chrome 58</span>),
+<code>wss://</code> (<span class="availability">since Chrome 58</span>), or
<code>chrome-extension://</code>.
In addition, even certain requests with URLs using one of the above schemes
are hidden, e.g.,
@@ -142,6 +144,18 @@ For example, for the <q>file:</q> scheme, only <code>onBeforeRequest</code>,
<code>onErrorOccurred</code> may be dispatched.
</p>
+<p>
+<span class="availability">Starting from Chrome 58</span>, the webRequest API
+supports intercepting the WebSocket handshake request. Since the handshake is
+done by means of an HTTP upgrade request, its flow fits into HTTP-oriented
+webRequest model. Note that the API does <b>not intercept</b>:
+<ul>
+ <li>Individual messages sent over an established WebSocket connection.</li>
+ <li>WebSocket closing connection.</li>
+</ul>
+Redirects are <b>not supported</b> for WebSocket requests.
+</p>
+
<h2 id="concepts">Concepts</h2>
<p>As the following sections explain, events in the web request API use request
« no previous file with comments | « chrome/browser/extensions/extension_apitest.cc ('k') | chrome/test/data/extensions/api_test/webrequest/framework.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698