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 |
} |