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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 2748023006: [DevTools] Make ConsoleModel not inherit from SDKModel (Closed)
Patch Set: stray change Created 3 years, 9 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 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 /** 175 /**
176 * @return {!Console.ConsoleView} 176 * @return {!Console.ConsoleView}
177 */ 177 */
178 static instance() { 178 static instance() {
179 if (!Console.ConsoleView._instance) 179 if (!Console.ConsoleView._instance)
180 Console.ConsoleView._instance = new Console.ConsoleView(); 180 Console.ConsoleView._instance = new Console.ConsoleView();
181 return Console.ConsoleView._instance; 181 return Console.ConsoleView._instance;
182 } 182 }
183 183
184 static clearConsole() { 184 static clearConsole() {
185 for (var target of SDK.targetManager.targets()) 185 SDK.multitargetConsoleModel.requestClearMessages();
186 target.consoleModel.requestClearMessages();
187 } 186 }
188 187
189 /** 188 /**
190 * @return {!UI.SearchableView} 189 * @return {!UI.SearchableView}
191 */ 190 */
192 searchableView() { 191 searchableView() {
193 return this._searchableView; 192 return this._searchableView;
194 } 193 }
195 194
196 _clearHistory() { 195 _clearHistory() {
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 var message; 798 var message;
800 if (!exceptionDetails) { 799 if (!exceptionDetails) {
801 message = new SDK.ConsoleMessage( 800 message = new SDK.ConsoleMessage(
802 result.target(), SDK.ConsoleMessage.MessageSource.JS, level, '', SDK.C onsoleMessage.MessageType.Result, 801 result.target(), SDK.ConsoleMessage.MessageSource.JS, level, '', SDK.C onsoleMessage.MessageType.Result,
803 undefined, undefined, undefined, undefined, [result]); 802 undefined, undefined, undefined, undefined, [result]);
804 } else { 803 } else {
805 message = SDK.ConsoleMessage.fromException( 804 message = SDK.ConsoleMessage.fromException(
806 result.target(), exceptionDetails, SDK.ConsoleMessage.MessageType.Resu lt, undefined, undefined); 805 result.target(), exceptionDetails, SDK.ConsoleMessage.MessageType.Resu lt, undefined, undefined);
807 } 806 }
808 message.setOriginatingMessage(originatingConsoleMessage); 807 message.setOriginatingMessage(originatingConsoleMessage);
809 result.target().consoleModel.addMessage(message); 808 SDK.multitargetConsoleModel.addMessage(message);
810 } 809 }
811 810
812 /** 811 /**
813 * @param {!Common.Event} event 812 * @param {!Common.Event} event
814 */ 813 */
815 _commandEvaluated(event) { 814 _commandEvaluated(event) {
816 var data = 815 var data =
817 /** @type {{result: ?SDK.RemoteObject, text: string, commandMessage: !SD K.ConsoleMessage, exceptionDetails: (!Protocol.Runtime.ExceptionDetails|undefine d)}} */ 816 /** @type {{result: ?SDK.RemoteObject, text: string, commandMessage: !SD K.ConsoleMessage, exceptionDetails: (!Protocol.Runtime.ExceptionDetails|undefine d)}} */
818 (event.data); 817 (event.data);
819 this._prompt.history().pushHistoryItem(data.text); 818 this._prompt.history().pushHistoryItem(data.text);
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 return true; 1318 return true;
1320 } 1319 }
1321 return false; 1320 return false;
1322 } 1321 }
1323 }; 1322 };
1324 1323
1325 /** 1324 /**
1326 * @typedef {{messageIndex: number, matchIndex: number}} 1325 * @typedef {{messageIndex: number, matchIndex: number}}
1327 */ 1326 */
1328 Console.ConsoleView.RegexMatchRange; 1327 Console.ConsoleView.RegexMatchRange;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698