Bug 915444 - Add webProgress to root actor for the chrome style editor and inspector. r=harth
authorPhilipp Kewisch <mozilla@kewis.ch>
Thu, 17 Oct 2013 21:28:49 +0200
changeset 151374 292a6f5e1b0a87bba7ee0b11c43247168b898774
parent 151373 520f2bffeaea17007bdd825fbeef089f7b563030
child 151375 f472feeaefc9c5d0b08b4fbf5b5f0cdd3952de36
push id3128
push userphilringnalda@gmail.com
push dateSat, 19 Oct 2013 05:43:30 +0000
treeherderfx-team@321e817596d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersharth
bugs915444
milestone27.0a1
Bug 915444 - Add webProgress to root actor for the chrome style editor and inspector. r=harth
toolkit/devtools/server/actors/root.js
--- a/toolkit/devtools/server/actors/root.js
+++ b/toolkit/devtools/server/actors/root.js
@@ -186,16 +186,27 @@ RootActor.prototype = {
   get isRootActor() true,
 
   /**
    * The (chrome) window, for use by child actors
    */
   get window() Services.wm.getMostRecentWindow(DebuggerServer.chromeWindowType),
 
   /**
+   * Getter for the best nsIWebProgress for to watching this window.
+   */
+  get webProgress() {
+    return this.window
+      .QueryInterface(Ci.nsIInterfaceRequestor)
+      .getInterface(Ci.nsIDocShell)
+      .QueryInterface(Ci.nsIInterfaceRequestor)
+      .getInterface(Ci.nsIWebProgress);
+  },
+
+  /**
    * Disconnects the actor from the browser window.
    */
   disconnect: function() {
     /* Tell the live lists we aren't watching any more. */
     if (this._parameters.tabList) {
       this._parameters.tabList.onListChanged = null;
     }
     if (this._parameters.addonList) {