Implemented types.private.ChromeDirectSetting.onChange

This delta links up the onChange event machinery to the property
change notification machinery.

It follows a pattern established in PreferencesAPI and the
PreferenceEventRouter.
* Given a list of preferences, register event listener added
  observers to each preference.
* On the first added event listener, unregister all observers
  and register all property change listeners.
* On property changes, forward an event to each component
  extension that has a property listener added.

BUG=164227

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212307 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed