| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 */ | 139 */ |
| 140 WebInspector.DatabaseModel = function(target) | 140 WebInspector.DatabaseModel = function(target) |
| 141 { | 141 { |
| 142 WebInspector.SDKModel.call(this, WebInspector.DatabaseModel, target); | 142 WebInspector.SDKModel.call(this, WebInspector.DatabaseModel, target); |
| 143 | 143 |
| 144 this._databases = []; | 144 this._databases = []; |
| 145 this._agent = target.databaseAgent(); | 145 this._agent = target.databaseAgent(); |
| 146 this.target().registerDatabaseDispatcher(new WebInspector.DatabaseDispatcher
(this)); | 146 this.target().registerDatabaseDispatcher(new WebInspector.DatabaseDispatcher
(this)); |
| 147 } | 147 } |
| 148 | 148 |
| 149 /** @enum {symbol} */ |
| 149 WebInspector.DatabaseModel.Events = { | 150 WebInspector.DatabaseModel.Events = { |
| 150 DatabaseAdded: "DatabaseAdded", | 151 DatabaseAdded: Symbol("DatabaseAdded"), |
| 151 DatabasesRemoved: "DatabasesRemoved" | 152 DatabasesRemoved: Symbol("DatabasesRemoved") |
| 152 } | 153 } |
| 153 | 154 |
| 154 WebInspector.DatabaseModel.prototype = { | 155 WebInspector.DatabaseModel.prototype = { |
| 155 enable: function() | 156 enable: function() |
| 156 { | 157 { |
| 157 if (this._enabled) | 158 if (this._enabled) |
| 158 return; | 159 return; |
| 159 this._agent.enable(); | 160 this._agent.enable(); |
| 160 this._enabled = true; | 161 this._enabled = true; |
| 161 }, | 162 }, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 * @param {!WebInspector.Target} target | 225 * @param {!WebInspector.Target} target |
| 225 * @return {!WebInspector.DatabaseModel} | 226 * @return {!WebInspector.DatabaseModel} |
| 226 */ | 227 */ |
| 227 WebInspector.DatabaseModel.fromTarget = function(target) | 228 WebInspector.DatabaseModel.fromTarget = function(target) |
| 228 { | 229 { |
| 229 if (!target[WebInspector.DatabaseModel._symbol]) | 230 if (!target[WebInspector.DatabaseModel._symbol]) |
| 230 target[WebInspector.DatabaseModel._symbol] = new WebInspector.DatabaseMo
del(target); | 231 target[WebInspector.DatabaseModel._symbol] = new WebInspector.DatabaseMo
del(target); |
| 231 | 232 |
| 232 return target[WebInspector.DatabaseModel._symbol]; | 233 return target[WebInspector.DatabaseModel._symbol]; |
| 233 } | 234 } |
| OLD | NEW |