xpcom

How to close thread when firefox closes

Hello, I have a extension that uses multithreading using worker thread as shown here . Whenever worker thread returns value to main thread, I am updating UI and I am starting that thread again because I want to continuously execute that operation. I cannot use setInterval because inside thread is a call to C++ XPCOM component function w...

do_createinstance xpcom

i use this code nsCOMPtr file = do_CreateInstance("@mozilla.org/file/local;1", &rv); it says error C3861: 'do_CreateInstance': identifier not found ...

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 ? ...

How do I link to a DLL from javascript in XULRunner?

I have a dll (that I didn't write) and I would like to use it in an XULRunner application. I know nearly nothing about this, so bear with me. Apparently I can use XPCOM to load the dll and then call functions in it. How would I do that? ...

XPCOM Security issues

I'm developing a Firefox plugin using XPCOM, I've not yet read all the docs, but as far as I can see, A plugin is simply a DLL that provides services via a XPCOM interface and interacts with the browser via XPCOM interfaces. Since the plugin itself is a native DLL, how would the security model work? Would it rely on the fact that the use...

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++ ? ...

What IPC method should I use between Firefox extension and C# code running on the same machine?

I have a question about how to structure communication between a (new) Firefox extension and existing C# code. The firefox extension will use configuration data and will produce other data, so needs to get the config data from somewhere and save it's output somewhere. The data is produced/consumed by existing C# code, so I need to deci...

components.Classes["THISPART"]

When you need to create or access well-known objects in XPCOM, where do you find their contract IDs? ...

While trying to download a page, why doesn't this code alert test?

I have to download myURLString (http://www.google.com/search?q=http%3A//www.google.com/&btnG=Search+Directory&hl=en&cat=gwd%2FTop). function getcontents(myURLString) { var gChannel; var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var uri = ioService.n...

Adding entry to Firefox cache from an XPCOM component

The nsICacheSession has a method openCacheEntry() which returns an existing cache entry. Is there a method such as createCacheEntry() that will create a cache entry. I want to create an XPCOM object that will read files from disk and write them to Firefox cache. Thanks ...

Detecting Firefox extension version.

I have a Firefox Extension that I would like to populate the About box with the version within install.rdf. I know that FUEL's extIExtension allows one to see the version for an extension but I did not create the extension using FUEL (and the docs on MDC seem very light on how to transition to it). Is there a way to dynamically check th...

Create GStreamer XUL element?

I would like to create a custom XUL element named 'video' for a video editing application based on XULRunner. In the XPCOM documentation it is explained how to access your component from Javascript, but I can't seem to find any documentation on how to declare a new XUL element. Where can I find this? Can anyone point me in the right dire...

Cant find a way to open AppData/LocalLow directory

I am able to get path to User 'AppData/Local' folder as follows. appdatafile = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). get("LocalAppData", Components.interfaces.nsIFile).path; Can anyone help me to get the 'AppData/LocalLow' user folder? ...

Firefox Popup window event

Hi All, I am writing a Firefox extension using XPCOM C++. I want to get notified when the popup window (like we see while browsing www.rediffmail.com) is opening. How do I catch this event? Does anybody knows how to do it? Thanks for your help. ...

Create Firefox Addon to Watch and modify XHR requests & reponses

Update: I guess the subject gave a wrong notion that I'm looking for an existing addon. This is a custom problem and I do NOT want an existing solution. I wish to WRITE (or more appropriately, modify and existing) Addon. Here's my requirement: -> I want my addon to work for a particular site only -> The data on the pages are encoded us...

XPCOM support in Android webkit browser?

Does the Android WebKit supports the XPCOM framework or NPRuntime API`s as like Firefox? How to implement JavaScript in the Android WebKit plug-in? Update: I am writing a media player plug-in for the Android WebKit browser and my plug-in needs to get the command from the web page through JavaScript (some actions like play/pause/stop/re...

How to make use of c++ xpcom component from javascript xpcom component.

I have developed a xpcom component using c++. I have GetHWND() method in my component. I have also developed another xpcom component using javascript. I want to make use of GetHWND function in javascript xpcom component. I am using following code to do so. netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); ...

virtualbox and python API

0 vote down I have installed virtualbox . but i cant import the module xpcom. but the synaptic package shows that it is installed. what could be wrong? -ASK ...

Components.interfaces.nsIProcess2 in Firefox 3.6 -- where did it go?

I am beta testing an application that includes a Firefox extension as one component. It was originally deployed when FF3.5.5 was the latest version, and survived 3.5.6 and 3.5.7. However on FF3.6 I'm getting the following in my error console: Warning: reference to undefined property Components.interfaces.nsIProcess2 Source file: chrome:...

XPCOM Shockwave Flash C++

Hi, I recently started "playing" with xpcom, and I would like to know if there is a way do interact with a Shockwave flash element. In IE I can use the IShockwaveFlash interface, but for the Firefox I can't find any interface. I tried using the nsIFlash5 definition from the header file "wrap_XPCOM_3rdparty.h" (acquired from the XulRun...