| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 /** @type {!Map.<string, !WebInspector.ServiceWorkerRegistration>} */ | 44 /** @type {!Map.<string, !WebInspector.ServiceWorkerRegistration>} */ |
| 45 this._registrations = new Map(); | 45 this._registrations = new Map(); |
| 46 this.enable(); | 46 this.enable(); |
| 47 this._forceUpdateSetting = WebInspector.settings.createSetting("serviceWorke
rUpdateOnReload", false); | 47 this._forceUpdateSetting = WebInspector.settings.createSetting("serviceWorke
rUpdateOnReload", false); |
| 48 if (this._forceUpdateSetting.get()) | 48 if (this._forceUpdateSetting.get()) |
| 49 this._forceUpdateSettingChanged(); | 49 this._forceUpdateSettingChanged(); |
| 50 this._forceUpdateSetting.addChangeListener(this._forceUpdateSettingChanged,
this); | 50 this._forceUpdateSetting.addChangeListener(this._forceUpdateSettingChanged,
this); |
| 51 WebInspector.targetManager.addModelListener(WebInspector.RuntimeModel, WebIn
spector.RuntimeModel.Events.ExecutionContextCreated, this._executionContextCreat
ed, this); | 51 WebInspector.targetManager.addModelListener(WebInspector.RuntimeModel, WebIn
spector.RuntimeModel.Events.ExecutionContextCreated, this._executionContextCreat
ed, this); |
| 52 } | 52 } |
| 53 | 53 |
| 54 /** @enum {symbol} */ |
| 54 WebInspector.ServiceWorkerManager.Events = { | 55 WebInspector.ServiceWorkerManager.Events = { |
| 55 WorkersUpdated: "WorkersUpdated", | 56 WorkersUpdated: Symbol("WorkersUpdated"), |
| 56 RegistrationUpdated: "RegistrationUpdated", | 57 RegistrationUpdated: Symbol("RegistrationUpdated"), |
| 57 RegistrationErrorAdded: "RegistrationErrorAdded", | 58 RegistrationErrorAdded: Symbol("RegistrationErrorAdded"), |
| 58 RegistrationDeleted: "RegistrationDeleted" | 59 RegistrationDeleted: Symbol("RegistrationDeleted") |
| 59 } | 60 } |
| 60 | 61 |
| 61 WebInspector.ServiceWorkerManager.prototype = { | 62 WebInspector.ServiceWorkerManager.prototype = { |
| 62 enable: function() | 63 enable: function() |
| 63 { | 64 { |
| 64 if (this._enabled) | 65 if (this._enabled) |
| 65 return; | 66 return; |
| 66 this._enabled = true; | 67 this._enabled = true; |
| 67 | 68 |
| 68 this._agent.enable(); | 69 this._agent.enable(); |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 { | 885 { |
| 885 return this._isRedundant() && (!this.errors.length || this._deleting); | 886 return this._isRedundant() && (!this.errors.length || this._deleting); |
| 886 }, | 887 }, |
| 887 | 888 |
| 888 clearErrors: function() | 889 clearErrors: function() |
| 889 { | 890 { |
| 890 this._fingerprint = Symbol("fingerprint"); | 891 this._fingerprint = Symbol("fingerprint"); |
| 891 this.errors = []; | 892 this.errors = []; |
| 892 } | 893 } |
| 893 } | 894 } |
| OLD | NEW |