Merge from Chromium at DEPS revision 257591

This commit was generated by merge_to_master.py.

Change-Id: I0010df2ec3fbb5d4947cd026de2feb150ce7a6b5
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 95fe683..cb1e7ec 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -33,6 +33,15 @@
 // for devices coming and going, as well as properties being updated.
 class BluetoothDevice {
  public:
+  // Possible values that may be returned by GetVendorIDSource(),
+  // indicating different organisations that allocate the identifiers returned
+  // by GetVendorID().
+  enum VendorIDSource {
+    VENDOR_ID_UNKNOWN,
+    VENDOR_ID_BLUETOOTH,
+    VENDOR_ID_USB
+  };
+
   // Possible values that may be returned by GetDeviceType(), representing
   // different types of bluetooth device that we support or are aware of
   // decoded from the bluetooth class information.
@@ -102,9 +111,7 @@
 
     // This method will be called when the Bluetooth daemon requires that the
     // user enter the PIN code |pincode| into the device |device| so that it
-    // may be authenticated. The DismissDisplayOrConfirm() method
-    // will be called to dismiss the display once pairing is complete or
-    // cancelled.
+    // may be authenticated.
     //
     // This is used for Bluetooth 2.0 and earlier keyboard devices, the
     // |pincode| will always be a six-digit numeric in the range 000000-999999
@@ -114,8 +121,7 @@
 
     // This method will be called when the Bluetooth daemon requires that the
     // user enter the Passkey |passkey| into the device |device| so that it
-    // may be authenticated. The DismissDisplayOrConfirm() method will be
-    // called to dismiss the display once pairing is complete or cancelled.
+    // may be authenticated.
     //
     // This is used for Bluetooth 2.1 and later devices that support input
     // but not display, such as keyboards. The Passkey is a numeric in the
@@ -129,8 +135,7 @@
     // using a PIN code or a Passkey.
     //
     // This method will be called only after DisplayPinCode() or
-    // DisplayPasskey() is called and before the corresponding
-    // DismissDisplayOrConfirm() is called, but is not warranted to be called
+    // DisplayPasskey() method is called, but is not warranted to be called
     // on every pairing process that requires a PIN code or a Passkey because
     // some device may not support this feature.
     //
@@ -155,10 +160,14 @@
     virtual void ConfirmPasskey(BluetoothDevice* device,
                                 uint32 passkey) = 0;
 
-    // This method will be called when any previous DisplayPinCode(),
-    // DisplayPasskey() or ConfirmPasskey() request should be concluded
-    // and removed from the user.
-    virtual void DismissDisplayOrConfirm() = 0;
+    // This method will be called when the Bluetooth daemon requires that a
+    // pairing request, usually only incoming, using the just-works model is
+    // authorized. The delegate should decide whether the user should confirm
+    // or not, then call ConfirmPairing() on the device to confirm the pairing
+    // (whether by user action or by default), RejectPairing() on the device to
+    // reject or CancelPairing() on the device to cancel authorization for
+    // any other reason.
+    virtual void AuthorizePairing(BluetoothDevice* device) = 0;
   };
 
   // Returns true if uuid is in a a valid canonical format
@@ -175,6 +184,10 @@
   // a unique key to identify the device and copied where needed.
   virtual std::string GetAddress() const = 0;
 
+  // Returns the allocation source of the identifier returned by GetVendorID(),
+  // where available, or VENDOR_ID_UNKNOWN where not.
+  virtual VendorIDSource GetVendorIDSource() const = 0;
+
   // Returns the Vendor ID of the device, where available.
   virtual uint16 GetVendorID() const = 0;
 
@@ -283,7 +296,7 @@
   // If the request fails, |error_callback| will be called; otherwise,
   // |callback| is called when the request is complete.
   // After calling Connect, CancelPairing should be called to cancel the pairing
-  // process and release |pairing_delegate_| if user cancels the pairing and
+  // process and release the pairing delegate if user cancels the pairing and
   // closes the pairing UI.
   virtual void Connect(PairingDelegate* pairing_delegate,
                        const base::Closure& callback,
@@ -309,8 +322,8 @@
   // Rejects a pairing or connection request from a remote device.
   virtual void RejectPairing() = 0;
 
-  // Cancels a pairing or connection attempt to a remote device or release
-  // |pairing_deleage_| and |agent_|.
+  // Cancels a pairing or connection attempt to a remote device, releasing
+  // the pairing delegate.
   virtual void CancelPairing() = 0;
 
   // Disconnects the device, terminating the low-level ACL connection