Index: Source/devtools/front_end/bindings/LiveLocation.js |
diff --git a/Source/devtools/front_end/bindings/LiveLocation.js b/Source/devtools/front_end/bindings/LiveLocation.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..af2cb12ca2d9d81af9da9902c94e2ec54e60ae77 |
--- /dev/null |
+++ b/Source/devtools/front_end/bindings/LiveLocation.js |
@@ -0,0 +1,36 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * @constructor |
+ * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegate |
+ */ |
+WebInspector.LiveLocation = function(updateDelegate) |
+{ |
+ this._updateDelegate = updateDelegate; |
+} |
+ |
+WebInspector.LiveLocation.prototype = { |
+ update: function() |
+ { |
+ var uiLocation = this.uiLocation(); |
+ if (!uiLocation) |
+ return; |
+ if (this._updateDelegate(uiLocation)) |
+ this.dispose(); |
+ }, |
+ |
+ /** |
+ * @return {!WebInspector.UILocation} |
+ */ |
+ uiLocation: function() |
+ { |
+ throw "Not implemented"; |
+ }, |
+ |
+ dispose: function() |
+ { |
+ // Overridden by subclasses. |
+ } |
+} |