remove in_module mechanism
[conkeror/arlinius.git] / modules / special-buffer.js
blob47374cdb8c1b16a2c164278e324e5a3694a49d71
1 /**
2  * (C) Copyright 2008 Jeremy Maitin-Shepard
3  *
4  * Use, modification, and distribution are subject to the terms specified in the
5  * COPYING file.
6 **/
8 require("buffer.js");
10 define_buffer_local_hook("special_buffer_generated_hook");
11 define_current_buffer_hook("current_special_buffer_generated_hook", "special_buffer_generated_hook");
14 function special_buffer (window) {
15     this.constructor_begin();
16     keywords(arguments);
17     conkeror.buffer.call(this, window, forward_keywords(arguments));
18     this.generated = false;
20     var buffer = this;
21     add_hook.call(this, "buffer_loaded_hook", function () {
22             buffer.generated = true;
23             buffer.generate();
24             call_after_timeout(function () {
25                     special_buffer_generated_hook.run(buffer);
26                 }, 0);
27         });
28     this.web_navigation.loadURI("chrome://conkeror-gui/content/blank.html", Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
29                                 null /* referrer */, null /* post data */, null /* headers */);
30     this.constructor_end();
33 special_buffer.prototype.__proto__ = buffer.prototype;
35 // Sub-classes must define a generate method
37 provide("special-buffer");