Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/main.js

Issue 5155615986941952: Issue 2546 - Fixed documentation generation for Customizations (Closed)
Patch Set: Created May 18, 2015, 7:25 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 Cu.import("resource://gre/modules/Services.jsm"); 7 Cu.import("resource://gre/modules/Services.jsm");
8 8
9 let {Prefs} = require("prefs"); 9 let {Prefs} = require("prefs");
10 let {WindowObserver} = require("windowObserver"); 10 let {WindowObserver} = require("windowObserver");
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 { 141 {
142 __proto__: StylesheetFeature, 142 __proto__: StylesheetFeature,
143 get template() 143 get template()
144 { 144 {
145 let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(C i.nsIXMLHttpRequest); 145 let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(C i.nsIXMLHttpRequest);
146 request.open("GET", "chrome://abpcustomization/content/toolbarIconDisplay.cs s", false); 146 request.open("GET", "chrome://abpcustomization/content/toolbarIconDisplay.cs s", false);
147 request.overrideMimeType("text/plain"); 147 request.overrideMimeType("text/plain");
148 request.send(); 148 request.send();
149 let result = request.responseText; 149 let result = request.responseText;
150 150
151 delete this.template; 151 Object.defineProperty(this, "template", {
152 this.__defineGetter__("template", function() result); 152 value: result,
153 enumerable: true
154 });
153 155
154 return this.template; 156 return this.template;
155 }, 157 },
156 get stylesheet() 158 get stylesheet()
157 { 159 {
158 const DISPLAY_IMAGE = 1; 160 const DISPLAY_IMAGE = 1;
159 const DISPLAY_TEXT = 2; 161 const DISPLAY_TEXT = 2;
160 let type = Prefs["toolbar-icon-display"]; 162 let type = Prefs["toolbar-icon-display"];
161 163
162 let styles = this.template; 164 let styles = this.template;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 else 211 else
210 features[name].shutdown(); 212 features[name].shutdown();
211 } 213 }
212 } 214 }
213 215
214 // Initialize features and make sure to update them on changes 216 // Initialize features and make sure to update them on changes
215 for (let feature in features) 217 for (let feature in features)
216 updateFeature(feature); 218 updateFeature(feature);
217 219
218 Prefs.addListener(updateFeature); 220 Prefs.addListener(updateFeature);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld