Bluetooth API: improve discovery

This CL:
- eliminates unnecessary dispatches
- correctly handles devices that are discovered before interest is
registered

TEST=ran api test
BUG=133179

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150898

Review URL: https://chromiumcodereview.appspot.com/10815072

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151138 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ppapi/proxy/plugin_proxy_delegate.h b/ppapi/proxy/plugin_proxy_delegate.h
index 0ce2655..de0c397 100644
--- a/ppapi/proxy/plugin_proxy_delegate.h
+++ b/ppapi/proxy/plugin_proxy_delegate.h
@@ -7,6 +7,10 @@
 
 #include <string>
 
+namespace IPC {
+class Sender;
+}
+
 namespace ppapi {
 namespace proxy {
 
@@ -15,9 +19,13 @@
   virtual ~PluginProxyDelegate() {}
 
   // Sends the given message to the browser. Identical semantics to IPC::Sender
-  // interface.
+  // interface. New code should use GetBrowserSender instead.
+  // TODO(brettw) remove this.
   virtual bool SendToBrowser(IPC::Message* msg) = 0;
 
+  // Returns the channel for sending to the browser.
+  virtual IPC::Sender* GetBrowserSender() = 0;
+
   // Returns the language code of the current UI language.
   virtual std::string GetUILanguage() = 0;