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

Side by Side Diff: chrome/common/extensions/docs/extensions/declarativeWebRequest.html

Issue 10825212: Support also excluding content types in declarative webrequest conditions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ' Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2 1) The <head> information in this page is significant, should be uniform 2 1) The <head> information in this page is significant, should be uniform
3 across api docs and should be edited only with knowledge of the 3 across api docs and should be edited only with knowledge of the
4 templating mechanism. 4 templating mechanism.
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
6 browser, it will be re-generated from the template, json schema and 6 browser, it will be re-generated from the template, json schema and
7 authored overview content. 7 authored overview content.
8 4) The <body>.innerHTML is also generated by an offline step so that this 8 4) The <body>.innerHTML is also generated by an offline step so that this
9 page may easily be indexed by search engines. 9 page may easily be indexed by search engines.
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 </p> 354 </p>
355 <p> 355 <p>
356 The Declarative Web Request API supports a single type of match criteria, the 356 The Declarative Web Request API supports a single type of match criteria, the
357 <code>RequestMatcher</code>. The <code>RequestMatcher</code> matches network 357 <code>RequestMatcher</code>. The <code>RequestMatcher</code> matches network
358 requests if and only if all listed criteria are met. The following 358 requests if and only if all listed criteria are met. The following
359 <code>RequestMatcher</code> would match a network request when the user enters 359 <code>RequestMatcher</code> would match a network request when the user enters
360 "http://www.example.com" in the URL bar: 360 "http://www.example.com" in the URL bar:
361 </p> 361 </p>
362 <pre>var matcher = new chrome.declarativeWebRequest.RequestMatcher({ 362 <pre>var matcher = new chrome.declarativeWebRequest.RequestMatcher({
363 url: { hostSuffix: 'example.com', schemes: ['http'] }, 363 url: { hostSuffix: 'example.com', schemes: ['http'] },
364 resourceType: 'main_frame' 364 resourceType: ['main_frame']
365 }); 365 });
366 </pre> 366 </pre>
367 <p> 367 <p>
368 Requests to "https://www.example.com" would be rejected by the 368 Requests to "https://www.example.com" would be rejected by the
369 <code>RequestMatcher</code> due to the scheme. Also all requests for an embedded 369 <code>RequestMatcher</code> due to the scheme. Also all requests for an embedded
370 iframe would be rejected due to the <code>resourceType</code>. 370 iframe would be rejected due to the <code>resourceType</code>.
371 </p> 371 </p>
372 <p class="note"> 372 <p class="note">
373 <strong>Note:</strong> All conditions and actions are created via a constructor 373 <strong>Note:</strong> All conditions and actions are created via a constructor
374 as shown in the example above. 374 as shown in the example above.
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 ) 797 )
798 </div> 798 </div>
799 </em> 799 </em>
800 </dt> 800 </dt>
801 <dd>Matches if the MIME media type of a response (from the HTTP Conten t-Type header) is contained in the list.</dd> 801 <dd>Matches if the MIME media type of a response (from the HTTP Conten t-Type header) is contained in the list.</dd>
802 <!-- OBJECT PROPERTIES --> 802 <!-- OBJECT PROPERTIES -->
803 <!-- OBJECT METHODS --> 803 <!-- OBJECT METHODS -->
804 <!-- OBJECT EVENT FIELDS --> 804 <!-- OBJECT EVENT FIELDS -->
805 <!-- FUNCTION PARAMETERS --> 805 <!-- FUNCTION PARAMETERS -->
806 </div> 806 </div>
807 </div><div>
808 <div>
809 <dt>
810 <var>excludeContentType</var>
811 <em>
812 <!-- TYPE -->
813 <div style="display:inline">
814 (
815 <span class="optional">optional</span>
816 <span id="typeTemplate">
817 <span>
818 <span>
819 array of <span><span>
820 <span>
821 <span>string</span>
822 </span>
823 </span></span>
824 </span>
825 </span>
826 </span>
827 )
828 </div>
829 </em>
830 </dt>
831 <dd>Matches if the MIME media type of a response (from the HTTP Conten t-Type header) is <em>not</em> contained in the list.</dd>
832 <!-- OBJECT PROPERTIES -->
833 <!-- OBJECT METHODS -->
834 <!-- OBJECT EVENT FIELDS -->
835 <!-- FUNCTION PARAMETERS -->
836 </div>
807 </div> 837 </div>
808 </dl> 838 </dl>
809 </dd> 839 </dd>
810 <!-- OBJECT METHODS --> 840 <!-- OBJECT METHODS -->
811 <!-- OBJECT EVENT FIELDS --> 841 <!-- OBJECT EVENT FIELDS -->
812 <!-- FUNCTION PARAMETERS --> 842 <!-- FUNCTION PARAMETERS -->
813 </div> 843 </div>
814 </div><div class="apiItem"> 844 </div><div class="apiItem">
815 <a name="type-declarativeWebRequest.RedirectRequest"></a> 845 <a name="type-declarativeWebRequest.RedirectRequest"></a>
816 <h4>declarativeWebRequest.RedirectRequest</h4> 846 <h4>declarativeWebRequest.RedirectRequest</h4>
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 _uff=0; 2004 _uff=0;
1975 urchinTracker(); 2005 urchinTracker();
1976 } 2006 }
1977 catch(e) {/* urchinTracker not available. */} 2007 catch(e) {/* urchinTracker not available. */}
1978 </script> 2008 </script>
1979 <!-- end analytics --> 2009 <!-- end analytics -->
1980 </div> 2010 </div>
1981 </div> <!-- /gc-footer --> 2011 </div> <!-- /gc-footer -->
1982 </div> <!-- /gc-container --> 2012 </div> <!-- /gc-container -->
1983 </body></html> 2013 </body></html>
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/declarative_web_request.json ('k') | chrome/common/extensions/docs/samples.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698