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

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

Issue 2623743002: DevTools: extract modules (non-extensions) (Closed)
Patch Set: rebaseline 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) 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (!query.length) 130 if (!query.length)
131 return; 131 return;
132 132
133 this._prompt.setText(''); 133 this._prompt.setText('');
134 this._promptElement.insertBefore(this._promptIcon, this._promptElement.first Child); 134 this._promptElement.insertBefore(this._promptIcon, this._promptElement.first Child);
135 135
136 this.database.executeSql(query, this._queryFinished.bind(this, query), this. _queryError.bind(this, query)); 136 this.database.executeSql(query, this._queryFinished.bind(this, query), this. _queryError.bind(this, query));
137 } 137 }
138 138
139 _queryFinished(query, columnNames, values) { 139 _queryFinished(query, columnNames, values) {
140 var dataGrid = UI.SortableDataGrid.create(columnNames, values); 140 var dataGrid = DataGrid.SortableDataGrid.create(columnNames, values);
141 var trimmedQuery = query.trim(); 141 var trimmedQuery = query.trim();
142 142
143 if (dataGrid) { 143 if (dataGrid) {
144 dataGrid.renderInline(); 144 dataGrid.renderInline();
145 this._appendViewQueryResult(trimmedQuery, dataGrid.asWidget()); 145 this._appendViewQueryResult(trimmedQuery, dataGrid.asWidget());
146 dataGrid.autoSizeColumns(5); 146 dataGrid.autoSizeColumns(5);
147 } 147 }
148 148
149 if (trimmedQuery.match(/^create /i) || trimmedQuery.match(/^drop table /i)) 149 if (trimmedQuery.match(/^create /i) || trimmedQuery.match(/^drop table /i))
150 this.dispatchEventToListeners(Resources.DatabaseQueryView.Events.SchemaUpd ated, this.database); 150 this.dispatchEventToListeners(Resources.DatabaseQueryView.Events.SchemaUpd ated, this.database);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 resultElement.className = 'database-query-result'; 195 resultElement.className = 'database-query-result';
196 element.appendChild(resultElement); 196 element.appendChild(resultElement);
197 return resultElement; 197 return resultElement;
198 } 198 }
199 }; 199 };
200 200
201 /** @enum {symbol} */ 201 /** @enum {symbol} */
202 Resources.DatabaseQueryView.Events = { 202 Resources.DatabaseQueryView.Events = {
203 SchemaUpdated: Symbol('SchemaUpdated') 203 SchemaUpdated: Symbol('SchemaUpdated')
204 }; 204 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698