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

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

Issue 2573323002: Revert of [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: Created 4 years 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 20 matching lines...) Expand all
31 super(Common.UIString('Database')); 31 super(Common.UIString('Database'));
32 32
33 this.database = database; 33 this.database = database;
34 this.tableName = tableName; 34 this.tableName = tableName;
35 35
36 this.element.classList.add('storage-view', 'table'); 36 this.element.classList.add('storage-view', 'table');
37 37
38 this._visibleColumnsSetting = Common.settings.createSetting('databaseTableVi ewVisibleColumns', {}); 38 this._visibleColumnsSetting = Common.settings.createSetting('databaseTableVi ewVisibleColumns', {});
39 39
40 this.refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'large icon-refresh'); 40 this.refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'large icon-refresh');
41 this.refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this._ref reshButtonClicked, this); 41 this.refreshButton.addEventListener('click', this._refreshButtonClicked, thi s);
42 this._visibleColumnsInput = new UI.ToolbarInput(Common.UIString('Visible col umns'), 1); 42 this._visibleColumnsInput = new UI.ToolbarInput(Common.UIString('Visible col umns'), 1);
43 this._visibleColumnsInput.addEventListener(UI.ToolbarInput.Event.TextChanged , this._onVisibleColumnsChanged, this); 43 this._visibleColumnsInput.addEventListener(UI.ToolbarInput.Event.TextChanged , this._onVisibleColumnsChanged, this);
44 } 44 }
45 45
46 /** 46 /**
47 * @override 47 * @override
48 */ 48 */
49 wasShown() { 49 wasShown() {
50 this.update(); 50 this.update();
51 } 51 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 _queryError(error) { 127 _queryError(error) {
128 this.detachChildWidgets(); 128 this.detachChildWidgets();
129 this.element.removeChildren(); 129 this.element.removeChildren();
130 130
131 var errorMsgElement = createElement('div'); 131 var errorMsgElement = createElement('div');
132 errorMsgElement.className = 'storage-table-error'; 132 errorMsgElement.className = 'storage-table-error';
133 errorMsgElement.textContent = Common.UIString('An error occurred trying to\n read the ā€œ%sā€ table.', this.tableName); 133 errorMsgElement.textContent = Common.UIString('An error occurred trying to\n read the ā€œ%sā€ table.', this.tableName);
134 this.element.appendChild(errorMsgElement); 134 this.element.appendChild(errorMsgElement);
135 } 135 }
136 136
137 /**
138 * @param {!Common.Event} event
139 */
140 _refreshButtonClicked(event) { 137 _refreshButtonClicked(event) {
141 this.update(); 138 this.update();
142 } 139 }
143 }; 140 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698