Questions tagged [xpcom]

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

It has multiple language bindings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL.

409 questions
3
votes
1 answer

Accessing tabs on Firefox with a C++ XPCOM extension

What XPCOM interfaces should I use to detect opening, closing and switching of tabs and also get their associated URL from a firefox extension? I have seen instances of code that manage tabs in JS, but how about from C++ ?
rep_movsd
  • 6,675
  • 4
  • 30
  • 34
3
votes
2 answers

Test driven development for C++ XPCOM component?

I want to create a Firefox extension using c++ XPCOM component which in turn uses javascript XPCOM component. Is there any framework that allows test driven development of C++ XPCOM component/firefox extension ?
Xinus
  • 29,617
  • 32
  • 119
  • 165
3
votes
1 answer

Expose file writing to a webpage with a Firefox extension

I have a web application that my client uses for the cash registry. What I need to do is to create a local file as the cash register's software needs to read from that file in order to print. Until now i was using this…
3
votes
1 answer

not able to access any XPCOM components

I am working through the XUL School primer on XPCOM. I am having trouble accessing components. No matter what component I try to access, for example (from MDN): // xpconnect to cookiemanager // get the cookie manager component in JavaScript var…
basil
  • 690
  • 2
  • 11
  • 30
3
votes
1 answer

The recommended way to run binary from Mozilla extension (with std I/O communication)?

I am developing a Firefox extension and would like to call an external binary from it. It would be great if I could use standard input/output to communicate, so I am looking for the best (and simplest) possible option. This is what I learnt so…
user1431676
  • 63
  • 1
  • 8
2
votes
3 answers

How to read/write file with XUL?

I'm using xul to code a firefox extension, so I need to read/write from local file. How to create for example file "temp.txt" in the following directory "c:/data" ?
Ashraf Bashir
  • 9,686
  • 15
  • 57
  • 82
2
votes
1 answer

Change homepage in Firefox programmatically

Which Firefox API calls would you use to change homepage in Firefox programmatically? The purpose is to create a Firefox extension that is able to cycle through a few favourite pages (this is analogical to cycling through a few wallpapers on the…
xralf
  • 3,312
  • 45
  • 129
  • 200
2
votes
1 answer

Notifying JavaScript of external event from XPcom

I have been trying to find a solution to what seems to be relatively simple scenario. I have JavaScript running in an html page that makes a call to an XPcom that I have written in C++. So far, so good. This XPcom retrieves a reference to the…
IRocks
  • 89
  • 1
  • 5
2
votes
1 answer

Threading in Spidermonkey

I am trying to enable a threaded debug dump in SpiderMonkey, by editing the jsinterp.cpp file. Basically, the things I am trying to do are as follows: Catch a JSScript before the main loop of Interpret() begins. Open a separate thread. In that…
Anton
  • 153
  • 2
  • 12
2
votes
1 answer

Developing a Thunderbird extension with C++

Does anybody know any C++ tutorial for developing a thunderbird extension with XPCOM?
Ștefan-Mihai MOGA
  • 343
  • 1
  • 5
  • 17
2
votes
2 answers

Event Listeners to know when a page is Bookmarked/Downloaded

Is there any way to track when a page is bookmarked or downloaded in Firefox? I mean is there any event that is triggered on bookmarking or downloading a page? I am using Add-on SDK for developing Add-on. If not, then kindly suggest me some…
Shatu
  • 1,819
  • 3
  • 15
  • 27
2
votes
1 answer

mozilla extension - reading stdout of external process

I am trying to run dvipng process from a thunderbird extension using Components.interfaces.nsIProcess. I need to read standard output of the process, but I am not able to find a way to do that. I found some threads on nsIProcess2, but that one was…
eudoxos
  • 18,545
  • 10
  • 61
  • 110
2
votes
1 answer

FireFox 6: implementing nsIProtocolHandler

Has something changed in Firefox 6 so I can no longer add my nsIProtocolHandler (and nsIChannel) implementation from an add-on just by registering it under a contract like @mozilla.org/network/protocol;1?name=myscheme? I've checked all the…
Stijn Sanders
  • 35,982
  • 11
  • 45
  • 67
2
votes
1 answer

PyXPCOM component not loading in XULRunner

I'm planning to create XULRunner based application that need to interface with Python. The plan is to use PyXPCOM. Currently I'm teaching myself in using PyXPCOM and going through the example component developmnet in Creating a Python XPCOM…
rahmad
  • 98
  • 2
  • 7
2
votes
1 answer

Developing a Firefox plugin/addon that invokes "Save As" from FF's own set of functions

I have a basic FF addon that polls for something in the DOM of the page in window.document. When it sees it, it is supposed to save the page. That's the hard part. I don't want to replicate the functionality of "save complete" I just want to call…
paul_h
  • 1,859
  • 3
  • 19
  • 27