title: Chrome Extensions - onRequest/sendRequest vs onMessage/sendMessage
body: <p>Checking out <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/" rel="noreferrer">this sample extension</a> linked by a page in the <a href="http://developer.chrome.com/extensions/devguide.html" rel="noreferrer">Chrome Extension center</a>, I see they used</p>
  
  <pre><code>chrome.extension.onRequest.addListener(onRequest);
  </code></pre>
  
  <p>in the background.js page in order to listen to the contentscript.js and</p>
  
  <pre><code>  chrome.extension.sendRequest({}, function(response) {});
  </code></pre>
  
  <p>in the contentscript.js in order to talk to the background.js page.</p>
  
  <p>But I can't find the documentation for these functions anywhere in the web and Google's <a href="http://developer.chrome.com/extensions/messaging.html" rel="noreferrer">Message Passing guide</a> only mentions</p>
  
  <pre><code>chrome.extension.sendMessage(...)
  </code></pre>
  
  <p>to send, and</p>
  
  <pre><code>chrome.extension.onMessage.addListener(...)
  </code></pre>
  
  <p>to listen.</p>
  
  <p><strong>Which functions should I use? Is sendRequest/onRequest obsolete? Is the Google's dev guide still up-to-date?</strong></p>