Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/DatabaseModel.js

Issue 2610013002: [Devtools] Doctyped Object.js (Closed)
Patch Set: changes Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 /** 180 /**
181 * @param {!Resources.Database} database 181 * @param {!Resources.Database} database
182 */ 182 */
183 _addDatabase(database) { 183 _addDatabase(database) {
184 this._databases.push(database); 184 this._databases.push(database);
185 this.emit(new Resources.DatabaseModel.DatabaseAddedEvent(database)); 185 this.emit(new Resources.DatabaseModel.DatabaseAddedEvent(database));
186 } 186 }
187 }; 187 };
188 188
189 /** @implements {Common.Emittable} */
189 Resources.DatabaseModel.DatabaseAddedEvent = class { 190 Resources.DatabaseModel.DatabaseAddedEvent = class {
190 /** 191 /**
191 * @param {!Resources.Database} database 192 * @param {!Resources.Database} database
192 */ 193 */
193 constructor(database) { 194 constructor(database) {
194 this.database = database; 195 this.database = database;
195 } 196 }
196 }; 197 };
197 198
199 /** @implements {Common.Emittable} */
198 Resources.DatabaseModel.DatabasesRemovedEvent = class {}; 200 Resources.DatabaseModel.DatabasesRemovedEvent = class {};
199 201
200 /** 202 /**
201 * @implements {Protocol.DatabaseDispatcher} 203 * @implements {Protocol.DatabaseDispatcher}
202 * @unrestricted 204 * @unrestricted
203 */ 205 */
204 Resources.DatabaseDispatcher = class { 206 Resources.DatabaseDispatcher = class {
205 /** 207 /**
206 * @param {!Resources.DatabaseModel} model 208 * @param {!Resources.DatabaseModel} model
207 */ 209 */
208 constructor(model) { 210 constructor(model) {
209 this._model = model; 211 this._model = model;
210 } 212 }
211 213
212 /** 214 /**
213 * @override 215 * @override
214 * @param {!Protocol.Database.Database} payload 216 * @param {!Protocol.Database.Database} payload
215 */ 217 */
216 addDatabase(payload) { 218 addDatabase(payload) {
217 this._model._addDatabase( 219 this._model._addDatabase(
218 new Resources.Database(this._model, payload.id, payload.domain, payload. name, payload.version)); 220 new Resources.Database(this._model, payload.id, payload.domain, payload. name, payload.version));
219 } 221 }
220 }; 222 };
221 223
222 Resources.DatabaseModel._symbol = Symbol('DatabaseModel'); 224 Resources.DatabaseModel._symbol = Symbol('DatabaseModel');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698