Add method to watch for workflows storage changes

This method will be reused throughout the code to watch for changes in
the workflows storage area, in order to present the most recent list of
workflows available.

Bug: twpowertools:74
Change-Id: I60eff85d8436e40c6912fdbb75f02f6457e4e295
diff --git a/src/workflows/manager/index.js b/src/workflows/manager/index.js
index 01710b4..113177c 100644
--- a/src/workflows/manager/index.js
+++ b/src/workflows/manager/index.js
@@ -38,11 +38,10 @@
   constructor() {
     super();
     this._workflows = undefined;
-    this._updateWorkflows();
-    chrome.storage.onChanged.addListener((changes, areaName) => {
-      if (areaName == 'local' && changes[kWorkflowsDataKey])
-        this._updateWorkflows();
-    });
+    WorkflowsStorage.watch(workflows => {
+      this._workflows = workflows;
+      this.requestUpdate();
+    }, /* asProtobuf = */ true);
   }
 
   render() {
@@ -59,13 +58,6 @@
     `;
   }
 
-  _updateWorkflows() {
-    WorkflowsStorage.getAll(/* asProtobuf = */ true).then(workflows => {
-      this._workflows = workflows;
-      this.requestUpdate();
-    });
-  }
-
   _showAddDialog() {
     this.addDialog.value.open = true;
   }