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

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

Issue 9965005: Deprecate chrome.extension.sendRequest in favor of sendMessage, with a safer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 <a href="#method-insertCSS">insertCSS</a> 226 <a href="#method-insertCSS">insertCSS</a>
227 </li><li> 227 </li><li>
228 <a href="#method-move">move</a> 228 <a href="#method-move">move</a>
229 </li><li> 229 </li><li>
230 <a href="#method-query">query</a> 230 <a href="#method-query">query</a>
231 </li><li> 231 </li><li>
232 <a href="#method-reload">reload</a> 232 <a href="#method-reload">reload</a>
233 </li><li> 233 </li><li>
234 <a href="#method-remove">remove</a> 234 <a href="#method-remove">remove</a>
235 </li><li> 235 </li><li>
236 <a href="#method-sendMessage">sendMessage</a>
237 </li><li>
236 <a href="#method-sendRequest">sendRequest</a> 238 <a href="#method-sendRequest">sendRequest</a>
237 </li><li> 239 </li><li>
238 <a href="#method-update">update</a> 240 <a href="#method-update">update</a>
239 </li> 241 </li>
240 </ol> 242 </ol>
241 </li> 243 </li>
242 <li> 244 <li>
243 <a href="#global-events">Events</a> 245 <a href="#global-events">Events</a>
244 <ol> 246 <ol>
245 <li> 247 <li>
(...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2518 </p> 2520 </p>
2519 <!-- Note: intentionally longer 80 columns --> 2521 <!-- Note: intentionally longer 80 columns -->
2520 <pre>function(<span></span>) <span class="subdued">{...}</span >;</pre> 2522 <pre>function(<span></span>) <span class="subdued">{...}</span >;</pre>
2521 <dl> 2523 <dl>
2522 </dl> 2524 </dl>
2523 </div> 2525 </div>
2524 </div> 2526 </div>
2525 <!-- MIN_VERSION --> 2527 <!-- MIN_VERSION -->
2526 </div> <!-- /description --> 2528 </div> <!-- /description -->
2527 </div><div class="apiItem"> 2529 </div><div class="apiItem">
2530 <a name="method-sendMessage"></a> <!-- method-anchor -->
2531 <h4>sendMessage</h4>
2532 <div class="summary">
2533 <!-- Note: intentionally longer 80 columns -->
2534 <span>chrome.tabs.sendMessage</span>(<span class="null"><span> integer</span>
2535 <var><span>tabId</span></var></span><span class="null"><sp an>, </span><span>any</span>
2536 <var><span>message</span></var></span><span class="optiona l"><span>, </span><span>function</span>
2537 <var><span>responseCallback</span></var></span>)</div>
2538 <div class="description">
2539 <p>Sends a single message to the content script(s) in the specif ied tab, with an optional callback to run when a response is sent back. The <a href="extension.html#event-onMessage">chrome.extension.onMessage</a> event is fi red in each content script running in the specified tab for the current extensio n.</p>
2540 <!-- PARAMETERS -->
2541 <h4>Parameters</h4>
2542 <dl>
2543 <div>
2544 <div>
2545 <dt>
2546 <var>tabId</var>
2547 <em>
2548 <!-- TYPE -->
2549 <div style="display:inline">
2550 (
2551 <span id="typeTemplate">
2552 <span>
2553 <span>integer</span>
2554 </span>
2555 </span>
2556 )
2557 </div>
2558 </em>
2559 </dt>
2560 <dd class="todo">
2561 Undocumented.
2562 </dd>
2563 <!-- OBJECT PROPERTIES -->
2564 <!-- OBJECT METHODS -->
2565 <!-- OBJECT EVENT FIELDS -->
2566 <!-- FUNCTION PARAMETERS -->
2567 </div>
2568 </div><div>
2569 <div>
2570 <dt>
2571 <var>message</var>
2572 <em>
2573 <!-- TYPE -->
2574 <div style="display:inline">
2575 (
2576 <span id="typeTemplate">
2577 <span>
2578 <span>any</span>
2579 </span>
2580 </span>
2581 )
2582 </div>
2583 </em>
2584 </dt>
2585 <dd class="todo">
2586 Undocumented.
2587 </dd>
2588 <!-- OBJECT PROPERTIES -->
2589 <!-- OBJECT METHODS -->
2590 <!-- OBJECT EVENT FIELDS -->
2591 <!-- FUNCTION PARAMETERS -->
2592 </div>
2593 </div><div>
2594 <div>
2595 <dt>
2596 <var>responseCallback</var>
2597 <em>
2598 <!-- TYPE -->
2599 <div style="display:inline">
2600 (
2601 <span class="optional">optional</span>
2602 <span id="typeTemplate">
2603 <span>
2604 <span>function</span>
2605 </span>
2606 </span>
2607 )
2608 </div>
2609 </em>
2610 </dt>
2611 <dd class="todo">
2612 Undocumented.
2613 </dd>
2614 <!-- OBJECT PROPERTIES -->
2615 <!-- OBJECT METHODS -->
2616 <!-- OBJECT EVENT FIELDS -->
2617 <!-- FUNCTION PARAMETERS -->
2618 <dd>
2619 <div>
2620 <h5>Parameters</h5>
2621 <dl>
2622 <div>
2623 <div>
2624 <dt>
2625 <var>response</var>
2626 <em>
2627 <!-- TYPE -->
2628 <div style="display:inline">
2629 (
2630 <span id="typeTemplate">
2631 <span>
2632 <span>any</span>
2633 </span>
2634 </span>
2635 )
2636 </div>
2637 </em>
2638 </dt>
2639 <dd>The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and <a href="extension.html#property-lastError">chrome.extens ion.lastError</a> will be set to the error message.</dd>
2640 <!-- OBJECT PROPERTIES -->
2641 <!-- OBJECT METHODS -->
2642 <!-- OBJECT EVENT FIELDS -->
2643 <!-- FUNCTION PARAMETERS -->
2644 </div>
2645 </div>
2646 </dl>
2647 </div>
2648 </dd>
2649 </div>
2650 </div>
2651 </dl>
2652 <!-- RETURNS -->
2653 <dl>
2654 </dl>
2655 <!-- CALLBACK -->
2656 <div>
2657 <div>
2658 <h4>Callback function</h4>
2659 <p>
2660 If you specify the <em>callback</em> parameter, it should
2661 specify a function that looks like this:
2662 </p>
2663 <!-- Note: intentionally longer 80 columns -->
2664 <pre>function(<span>any response</span>) <span class="subdued" >{...}</span>;</pre>
2665 <dl>
2666 <div>
2667 <div>
2668 <dt>
2669 <var>response</var>
2670 <em>
2671 <!-- TYPE -->
2672 <div style="display:inline">
2673 (
2674 <span id="typeTemplate">
2675 <span>
2676 <span>any</span>
2677 </span>
2678 </span>
2679 )
2680 </div>
2681 </em>
2682 </dt>
2683 <dd>The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and <a href="extension.html#property-lastError">chrome.extens ion.lastError</a> will be set to the error message.</dd>
2684 <!-- OBJECT PROPERTIES -->
2685 <!-- OBJECT METHODS -->
2686 <!-- OBJECT EVENT FIELDS -->
2687 <!-- FUNCTION PARAMETERS -->
2688 </div>
2689 </div>
2690 </dl>
2691 </div>
2692 </div>
2693 <!-- MIN_VERSION -->
2694 </div> <!-- /description -->
2695 </div><div class="apiItem">
2528 <a name="method-sendRequest"></a> <!-- method-anchor --> 2696 <a name="method-sendRequest"></a> <!-- method-anchor -->
2529 <h4>sendRequest</h4> 2697 <h4>sendRequest</h4>
2530 <div class="summary"> 2698 <div class="summary">
2531 <!-- Note: intentionally longer 80 columns --> 2699 <!-- Note: intentionally longer 80 columns -->
2532 <span>chrome.tabs.sendRequest</span>(<span class="null"><span> integer</span> 2700 <span>chrome.tabs.sendRequest</span>(<span class="null"><span> integer</span>
2533 <var><span>tabId</span></var></span><span class="null"><sp an>, </span><span>any</span> 2701 <var><span>tabId</span></var></span><span class="null"><sp an>, </span><span>any</span>
2534 <var><span>request</span></var></span><span class="optiona l"><span>, </span><span>function</span> 2702 <var><span>request</span></var></span><span class="optiona l"><span>, </span><span>function</span>
2535 <var><span>responseCallback</span></var></span>)</div> 2703 <var><span>responseCallback</span></var></span>)</div>
2536 <div class="description"> 2704 <div class="description">
2537 <p>Sends a single request to the content script(s) in the specif ied tab, with an optional callback to run when a response is sent back. The <a href="extension.html#event-onRequest">chrome.extension.onRequest</a> event is fi red in each content script running in the specified tab for the current extensio n.</p> 2705 <p>Deprecated: Please use sendMessage.</p>
2538 <!-- PARAMETERS --> 2706 <!-- PARAMETERS -->
2539 <h4>Parameters</h4> 2707 <h4>Parameters</h4>
2540 <dl> 2708 <dl>
2541 <div> 2709 <div>
2542 <div> 2710 <div>
2543 <dt> 2711 <dt>
2544 <var>tabId</var> 2712 <var>tabId</var>
2545 <em> 2713 <em>
2546 <!-- TYPE --> 2714 <!-- TYPE -->
2547 <div style="display:inline"> 2715 <div style="display:inline">
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
4223 _uff=0; 4391 _uff=0;
4224 urchinTracker(); 4392 urchinTracker();
4225 } 4393 }
4226 catch(e) {/* urchinTracker not available. */} 4394 catch(e) {/* urchinTracker not available. */}
4227 </script> 4395 </script>
4228 <!-- end analytics --> 4396 <!-- end analytics -->
4229 </div> 4397 </div>
4230 </div> <!-- /gc-footer --> 4398 </div> <!-- /gc-footer -->
4231 </div> <!-- /gc-container --> 4399 </div> <!-- /gc-container -->
4232 </body></html> 4400 </body></html>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | chrome/renderer/resources/extensions/event.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698