Closed
Bug 285080
Opened 20 years ago
Closed 14 years ago
We should put the frozen embedding contracts into nsEmbedCID.h
Categories
(Core Graveyard :: Embedding: APIs, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
|
51.42 KB,
patch
|
darin.moz
:
review+
|
Details | Diff | Splinter Review |
|
1.66 KB,
patch
|
Biesinger
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
Contracts which are "frozen" (that is, for which we either guarantee or require support of certain interfaces) should be moved into the SDK in nsEmbedCID.h. Also, I have a proposal to use contracts that include the string "embeddor.implemented" or some such (see http://lxr.mozilla.org/seamonkey/source/xpfe/components/build/nsModule.cpp#181) for things that we expect embeddors to implement, in the future. That will differentiate those contracts from the ones that our embedding layer itself implements.
| Assignee | ||
Comment 1•20 years ago
|
||
Actually, ignore the additional proposal thing... I should put that in a separate bug.
| Assignee | ||
Comment 2•20 years ago
|
||
I didn't touch embeddors for now (because they sometimes use <> for headers and sometimes use "" and I can't tell which they would want here). I also didn't touch any places that don't use REQUIRES, since I wasn't sure they would build...
| Assignee | ||
Updated•20 years ago
|
Attachment #176544 -
Flags: review?(darin)
Comment 3•20 years ago
|
||
Comment on attachment 176544 [details] [diff] [review] Patch for prompt service >Index: embedding/base/nsEmbedCID.h >+/** >+ * Prompt Service ContractID >+ * The prompt service is the way to pose various prompts, alerts, >+ * and confirmation dialogs to the user. >+ * >+ * This contract implements the following interfaces: >+ * nsIPromptService >+ */ >+#define NS_PROMPTSERVICE_CONTRACTID \ >+ "@mozilla.org/embedcomp/prompt-service;1" This comment is good, but maybe you should add something about the fact that embedders may override this ContractID with their own implementation. r=darin
Attachment #176544 -
Flags: review?(darin) → review+
Comment 4•20 years ago
|
||
Hey, cc me on these ;)
For windowwatcher, I think we should move the contractid to nsEmbedCID.h and add
a %{C++ #include "nsEmbedCID.h" %} block to the file, so that existing code
doesn't break. The CIDs should be hidden and inaccessible.| Assignee | ||
Comment 5•20 years ago
|
||
bsmedberg, sorry. I meant to cc you and missed, somehow. What about the random IID define that windowwatcher has? It's the same value as the IID defined by the idl, but a different constant name. :( Added the following to the comment for prompt-service: * Embedders may override this ContractID with their own implementation if they * want more control over the way prompts, alerts, and confirmation dialogs are * presented to the user. And checked it in.
Comment 6•20 years ago
|
||
the comments should make clear whether to use createInstance or getService for the contractid... I think the web browser one could be improved in this respect (the prompt service one is ok I guess, since it has a "service" in the name...)
| Assignee | ||
Comment 7•20 years ago
|
||
Attachment #177617 -
Flags: superreview?(darin)
Attachment #177617 -
Flags: review?(cbiesinger)
Comment 8•20 years ago
|
||
Comment on attachment 177617 [details] [diff] [review] Like so? great, thanks
Attachment #177617 -
Flags: review?(cbiesinger) → review+
Comment 9•20 years ago
|
||
Comment on attachment 177617 [details] [diff] [review] Like so? BTW, the method is named createInstanceByContractID ;-) In nsNetCID.h, I use the phrase: "service implementing nsIFoo" and "component implementing nsIBar" that's not so great either (kinda vague actually), but it avoids talking about ContractID-taking functions named createInstance() and getService() that don't exactly exist.
Updated•20 years ago
|
Attachment #177617 -
Flags: superreview?(darin) → superreview+
| Assignee | ||
Comment 10•20 years ago
|
||
Comment on attachment 177617 [details] [diff] [review] Like so? Checked in, with the function names fixed.
Comment 11•20 years ago
|
||
*** Bug 270240 has been marked as a duplicate of this bug. ***
Updated•15 years ago
|
QA Contact: apis
| Assignee | ||
Comment 12•14 years ago
|
||
Fixed enough. People can file more bugs as desired.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•