| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 this._database = database; | 90 this._database = database; |
| 91 this._refreshDatabase(); | 91 this._refreshDatabase(); |
| 92 }, | 92 }, |
| 93 | 93 |
| 94 __proto__: WebInspector.VBox.prototype | 94 __proto__: WebInspector.VBox.prototype |
| 95 } | 95 } |
| 96 | 96 |
| 97 | 97 |
| 98 /** | 98 /** |
| 99 * @constructor | 99 * @constructor |
| 100 * @extends {WebInspector.View} | 100 * @extends {WebInspector.SimpleView} |
| 101 * @param {!WebInspector.IndexedDBModel} model | 101 * @param {!WebInspector.IndexedDBModel} model |
| 102 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId | 102 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId |
| 103 * @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore | 103 * @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore |
| 104 * @param {?WebInspector.IndexedDBModel.Index} index | 104 * @param {?WebInspector.IndexedDBModel.Index} index |
| 105 */ | 105 */ |
| 106 WebInspector.IDBDataView = function(model, databaseId, objectStore, index) | 106 WebInspector.IDBDataView = function(model, databaseId, objectStore, index) |
| 107 { | 107 { |
| 108 WebInspector.View.call(this, WebInspector.UIString("IDB")); | 108 WebInspector.SimpleView.call(this, WebInspector.UIString("IDB")); |
| 109 this.registerRequiredCSS("resources/indexedDBViews.css"); | 109 this.registerRequiredCSS("resources/indexedDBViews.css"); |
| 110 | 110 |
| 111 this._model = model; | 111 this._model = model; |
| 112 this._databaseId = databaseId; | 112 this._databaseId = databaseId; |
| 113 this._isIndex = !!index; | 113 this._isIndex = !!index; |
| 114 | 114 |
| 115 this.element.classList.add("indexed-db-data-view"); | 115 this.element.classList.add("indexed-db-data-view"); |
| 116 | 116 |
| 117 this._createEditorToolbar(); | 117 this._createEditorToolbar(); |
| 118 | 118 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 this._updateData(true); | 330 this._updateData(true); |
| 331 } | 331 } |
| 332 this._clearButton.setEnabled(false); | 332 this._clearButton.setEnabled(false); |
| 333 this._model.clearObjectStore(this._databaseId, this._objectStore.name, c
leared.bind(this)); | 333 this._model.clearObjectStore(this._databaseId, this._objectStore.name, c
leared.bind(this)); |
| 334 }, | 334 }, |
| 335 | 335 |
| 336 /** | 336 /** |
| 337 * @override | 337 * @override |
| 338 * @return {!Array.<!WebInspector.ToolbarItem>} | 338 * @return {!Array.<!WebInspector.ToolbarItem>} |
| 339 */ | 339 */ |
| 340 toolbarItems: function() | 340 syncToolbarItems: function() |
| 341 { | 341 { |
| 342 return [this._refreshButton, this._clearButton]; | 342 return [this._refreshButton, this._clearButton]; |
| 343 }, | 343 }, |
| 344 | 344 |
| 345 clear: function() | 345 clear: function() |
| 346 { | 346 { |
| 347 this._dataGrid.rootNode().removeChildren(); | 347 this._dataGrid.rootNode().removeChildren(); |
| 348 this._entries = []; | 348 this._entries = []; |
| 349 }, | 349 }, |
| 350 | 350 |
| 351 __proto__: WebInspector.View.prototype | 351 __proto__: WebInspector.SimpleView.prototype |
| 352 } | 352 } |
| 353 | 353 |
| 354 /** | 354 /** |
| 355 * @constructor | 355 * @constructor |
| 356 * @extends {WebInspector.DataGridNode} | 356 * @extends {WebInspector.DataGridNode} |
| 357 * @param {!Object.<string, *>} data | 357 * @param {!Object.<string, *>} data |
| 358 */ | 358 */ |
| 359 WebInspector.IDBDataGridNode = function(data) | 359 WebInspector.IDBDataGridNode = function(data) |
| 360 { | 360 { |
| 361 WebInspector.DataGridNode.call(this, data, false); | 361 WebInspector.DataGridNode.call(this, data, false); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 381 cell.appendChild(objectElement); | 381 cell.appendChild(objectElement); |
| 382 break; | 382 break; |
| 383 default: | 383 default: |
| 384 } | 384 } |
| 385 | 385 |
| 386 return cell; | 386 return cell; |
| 387 }, | 387 }, |
| 388 | 388 |
| 389 __proto__: WebInspector.DataGridNode.prototype | 389 __proto__: WebInspector.DataGridNode.prototype |
| 390 } | 390 } |
| OLD | NEW |