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

Unified Diff: Source/devtools/front_end/SourceFrame.js

Issue 23474010: DevTools: "Jump between editing locations" experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: making reveal() to return boolean value Created 7 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
Index: Source/devtools/front_end/SourceFrame.js
diff --git a/Source/devtools/front_end/SourceFrame.js b/Source/devtools/front_end/SourceFrame.js
index c91f7e1bcae076397b04da0e4e0217e4464d3423..d8a4b40294b7a8ef969e87f3faa4afde8bf30177 100644
--- a/Source/devtools/front_end/SourceFrame.js
+++ b/Source/devtools/front_end/SourceFrame.js
@@ -97,6 +97,14 @@ WebInspector.SourceFrame.Events = {
WebInspector.SourceFrame.prototype = {
/**
+ * @param {function(WebInspector.TextEditorPositionHandle, WebInspector.TextEditorPositionHandle)} jumpToPositionDelegate
+ */
+ setJumpToPositionDelegate: function(jumpToPositionDelegate)
+ {
+ this._jumpToPositionDelegate = jumpToPositionDelegate;
vsevik 2013/09/04 09:46:22 Please make it an event instead
lushnikov 2014/01/02 14:06:09 Done.
+ },
+
+ /**
* @param {number} key
* @param {function()} handler
*/
@@ -695,6 +703,17 @@ WebInspector.SourceFrame.prototype = {
{
},
+ /**
+ * @param {WebInspector.TextEditorPositionHandle} from
+ * @param {WebInspector.TextEditorPositionHandle} to
+ */
+ onJumpToPosition: function(from, to)
+ {
+ if (!this._jumpToPositionDelegate)
+ return;
+ this._jumpToPositionDelegate(from, to);
+ },
+
inheritScrollPositions: function(sourceFrame)
{
this._textEditor.inheritScrollPositions(sourceFrame._textEditor);
@@ -832,5 +851,14 @@ WebInspector.TextEditorDelegateForSourceFrame.prototype = {
return WebInspector.linkifyURLAsNode(targetLocation || hrefValue, hrefValue, undefined, isExternal);
},
+ /**
+ * @param {WebInspector.TextEditorPositionHandle} from
+ * @param {WebInspector.TextEditorPositionHandle} to
+ */
+ onJumpToPosition: function(from, to)
+ {
+ this._sourceFrame.onJumpToPosition(from, to);
+ },
+
__proto__: WebInspector.TextEditorDelegate.prototype
}

Powered by Google App Engine
This is Rietveld 408576698