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

Unified Diff: Source/devtools/front_end/console/ConsoleView.js

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small cleanups - prefer URIs to contentURLs, revert protocol unifications, remove lambdas Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/components/module.json ('k') | Source/devtools/front_end/console/module.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/console/ConsoleView.js
diff --git a/Source/devtools/front_end/console/ConsoleView.js b/Source/devtools/front_end/console/ConsoleView.js
index c8483ac1bf233528583fa99146395d0fa0dbae83..b17889d4def30db396d1f5fa5a8c29253e3f9d31 100644
--- a/Source/devtools/front_end/console/ConsoleView.js
+++ b/Source/devtools/front_end/console/ConsoleView.js
@@ -65,6 +65,10 @@ WebInspector.ConsoleView = function()
this._executionContextComboBox.setMaxWidth(200);
this._executionContextModel = new WebInspector.ExecutionContextModel(this._executionContextComboBox.selectElement());
+ this._selectedLanguageServiceComboBox = new WebInspector.ToolbarComboBox(null, "console-context");
+ this._selectedLanguageServiceComboBox.setMaxWidth(200);
+ this._languageServiceModel = new WebInspector.LanguageServiceModel(this._selectedLanguageServiceComboBox.selectElement(), [WebInspector.LanguageService.Capabilities.Transpile, WebInspector.LanguageService.Capabilities.DebuggerCompletions]);
+
this._filter = new WebInspector.ConsoleViewFilter(this);
this._filter.addEventListener(WebInspector.ConsoleViewFilter.Events.FilterChanged, this._updateMessageList.bind(this));
@@ -77,6 +81,7 @@ WebInspector.ConsoleView = function()
toolbar.appendToolbarItem(this._clearConsoleButton);
toolbar.appendToolbarItem(this._filterBar.filterButton());
toolbar.appendToolbarItem(this._executionContextComboBox);
+ toolbar.appendToolbarItem(this._selectedLanguageServiceComboBox);
toolbar.appendToolbarItem(this._preserveLogCheckbox);
toolbar.appendToolbarItem(this._progressToolbarItem);
@@ -813,7 +818,7 @@ WebInspector.ConsoleView.prototype = {
this._prompt.setText("");
var currentExecutionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
if (currentExecutionContext) {
- WebInspector.ConsoleModel.evaluateCommandInConsole(currentExecutionContext, text, useCommandLineAPI);
+ WebInspector.ConsoleModel.evaluateCommandInConsole(new WebInspector.MultiLingualExecutionContext(currentExecutionContext), text, useCommandLineAPI);
if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorView.currentPanel().name === "console")
WebInspector.userMetrics.CommandEvaluatedInConsolePanel.record();
}
« no previous file with comments | « Source/devtools/front_end/components/module.json ('k') | Source/devtools/front_end/console/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698