| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 return; | 127 return; |
| 128 } | 128 } |
| 129 onSuccess(columnNames, values); | 129 onSuccess(columnNames, values); |
| 130 } | 130 } |
| 131 this._model._agent.executeSQL(this._id, query, callback); | 131 this._model._agent.executeSQL(this._id, query, callback); |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| 135 /** | 135 /** |
| 136 * @constructor | 136 * @constructor |
| 137 * @extends {WebInspector.SDKObject} | 137 * @extends {WebInspector.SDKModel} |
| 138 * @param {!WebInspector.Target} target | 138 * @param {!WebInspector.Target} target |
| 139 */ | 139 */ |
| 140 WebInspector.DatabaseModel = function(target) | 140 WebInspector.DatabaseModel = function(target) |
| 141 { | 141 { |
| 142 WebInspector.SDKObject.call(this, target); | 142 WebInspector.SDKModel.call(this, WebInspector.DatabaseModel, target); |
| 143 | 143 |
| 144 this._databases = []; | 144 this._databases = []; |
| 145 target.registerDatabaseDispatcher(new WebInspector.DatabaseDispatcher(this))
; | 145 target.registerDatabaseDispatcher(new WebInspector.DatabaseDispatcher(this))
; |
| 146 this._agent = target.databaseAgent(); | 146 this._agent = target.databaseAgent(); |
| 147 this._agent.enable(); | 147 this._agent.enable(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 WebInspector.DatabaseModel.Events = { | 150 WebInspector.DatabaseModel.Events = { |
| 151 DatabaseAdded: "DatabaseAdded" | 151 DatabaseAdded: "DatabaseAdded" |
| 152 } | 152 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 174 | 174 |
| 175 /** | 175 /** |
| 176 * @param {!WebInspector.Database} database | 176 * @param {!WebInspector.Database} database |
| 177 */ | 177 */ |
| 178 _addDatabase: function(database) | 178 _addDatabase: function(database) |
| 179 { | 179 { |
| 180 this._databases.push(database); | 180 this._databases.push(database); |
| 181 this.dispatchEventToListeners(WebInspector.DatabaseModel.Events.Database
Added, database); | 181 this.dispatchEventToListeners(WebInspector.DatabaseModel.Events.Database
Added, database); |
| 182 }, | 182 }, |
| 183 | 183 |
| 184 __proto__: WebInspector.SDKObject.prototype | 184 __proto__: WebInspector.SDKModel.prototype |
| 185 } | 185 } |
| 186 | 186 |
| 187 /** | 187 /** |
| 188 * @constructor | 188 * @constructor |
| 189 * @implements {DatabaseAgent.Dispatcher} | 189 * @implements {DatabaseAgent.Dispatcher} |
| 190 * @param {!WebInspector.DatabaseModel} model | 190 * @param {!WebInspector.DatabaseModel} model |
| 191 */ | 191 */ |
| 192 WebInspector.DatabaseDispatcher = function(model) | 192 WebInspector.DatabaseDispatcher = function(model) |
| 193 { | 193 { |
| 194 this._model = model; | 194 this._model = model; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 206 payload.domain, | 206 payload.domain, |
| 207 payload.name, | 207 payload.name, |
| 208 payload.version)); | 208 payload.version)); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * @type {!WebInspector.DatabaseModel} | 213 * @type {!WebInspector.DatabaseModel} |
| 214 */ | 214 */ |
| 215 WebInspector.databaseModel; | 215 WebInspector.databaseModel; |
| OLD | NEW |