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

Unified Diff: Source/devtools/front_end/sources/SourcesPanel.js

Issue 311193002: DevTools: Implement debugger pause-resume through an action (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
Index: Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/Source/devtools/front_end/sources/SourcesPanel.js b/Source/devtools/front_end/sources/SourcesPanel.js
index 7c3e0d6195c0667a5e5df24ee7913f140e0b08a7..9c741da172ac7fef3c5d15b5005803e605be616a 100644
--- a/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/Source/devtools/front_end/sources/SourcesPanel.js
@@ -671,7 +671,7 @@ WebInspector.SourcesPanel.prototype = {
this._runSnippetButton.element.classList.add("hidden");
// Continue.
- handler = this.togglePause.bind(this);
+ handler = function() { return WebInspector.actionRegistry.execute("debugger.toggle-pause"); };
this._pauseButton = this._createButtonAndRegisterShortcuts("scripts-pause", "", handler, WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PauseContinue);
vsevik 2014/06/06 16:41:35 this._pauseButton = this._createButtonAndRegisterS
apavlov 2014/06/09 09:00:01 Done.
debugToolbar.appendChild(this._pauseButton.element);
@@ -1395,3 +1395,22 @@ WebInspector.SourcesPanel.DisableJavaScriptSettingDelegate.prototype = {
__proto__: WebInspector.UISettingDelegate.prototype
}
+
+/**
+ * @constructor
+ * @implements {WebInspector.ActionDelegate}
+ */
+WebInspector.SourcesPanel.TogglePauseActionDelegate = function()
+{
+}
+
+WebInspector.SourcesPanel.TogglePauseActionDelegate.prototype = {
+ /**
+ * @return {boolean}
+ */
+ handleAction: function()
+ {
+ /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.showPanel("sources")).togglePause();
+ return true;
+ }
+}
« no previous file with comments | « Source/devtools/front_end/components/InspectorView.js ('k') | Source/devtools/front_end/sources/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698