| Index: third_party/WebKit/Source/devtools/front_end/ui/Context.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Context.js b/third_party/WebKit/Source/devtools/front_end/ui/Context.js
|
| index 9ee5fb851e64f8c3b8108a579ea36717ab994a8d..c657cb1910030bf54d5cbb905b8bf9b58603dc85 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/Context.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/Context.js
|
| @@ -44,6 +44,10 @@ WebInspector.Context.prototype = {
|
| */
|
| _dispatchFlavorChange: function(flavorType, flavorValue)
|
| {
|
| + self.runtime.extensions(WebInspector.ContextFlavorListener, flavorValue).map(extension => {
|
| + extension.instance().then(instance => /** @type {!WebInspector.ContextFlavorListener} */ (instance).flavorChanged(flavorValue));
|
| + });
|
| +
|
| var dispatcher = this._eventDispatchers.get(flavorType);
|
| if (!dispatcher)
|
| return;
|
| @@ -116,4 +120,16 @@ WebInspector.Context.prototype = {
|
| }
|
| }
|
|
|
| +/**
|
| + * @interface
|
| + */
|
| +WebInspector.ContextFlavorListener = function() { }
|
| +
|
| +WebInspector.ContextFlavorListener.prototype = {
|
| + /**
|
| + * @param {?Object} object
|
| + */
|
| + flavorChanged: function(object) { }
|
| +}
|
| +
|
| WebInspector.context = new WebInspector.Context();
|
|
|