Home | History | Annotate | Download | only in bindings
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 /**
      6  * @constructor
      7  * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegate
      8  */
      9 WebInspector.LiveLocation = function(updateDelegate)
     10 {
     11     this._updateDelegate = updateDelegate;
     12 }
     13 
     14 WebInspector.LiveLocation.prototype = {
     15     update: function()
     16     {
     17         var uiLocation = this.uiLocation();
     18         if (!uiLocation)
     19             return;
     20         if (this._updateDelegate(uiLocation))
     21             this.dispose();
     22     },
     23 
     24     /**
     25      * @return {!WebInspector.UILocation}
     26      */
     27     uiLocation: function()
     28     {
     29         throw "Not implemented";
     30     },
     31 
     32     dispose: function()
     33     {
     34         // Overridden by subclasses.
     35     }
     36 }
     37