Hi Marcos, It might help if you could describe (as specifically as you feel you can) the use-case you're hoping to realize, since changes to the spec should be driven by use-cases rather than just programming style. At present my concern is to make sure we remain flexible with the presentation of notifications rather than building in too many hooks before the feature has received a lot of use. But if there's an important use-case that the spec doesn't meet, that would be a place to start.
As far as workarounds that wouldn't depend on changing the Notifications spec, you might look at shared workers, which are coming soon to Chromium as well (atwilson@ can provide details): it should be the case that both the notification page and the main creating script can communicate via the same shared worker. -John On Mon, Nov 9, 2009 at 11:11 PM, Marcos Aruj <[email protected]> wrote: > Hi all, > > We've managed to use the Notifications API from our extension, thanks to > John Gregg's implementation. However we are missing a key feature for us, > which is to be able to have some logic inside the notifications itself, so > that we can communicate with the background script for several things. I > understand the way of communicating this components is under discussion, but > are there any tips or clues for us to base our work on? > > We've tried setting something like background to the Notification object > and try accesing it from the inner javascript in the notification, with no > luck, ince we can only reach up to a DOMWindow object. The same goes > backwards, where onDisplay we were trying to call a method in the > notifications internal javscript, but we can go deeper from the Notification > object. > > Inside the DOMWindow from the notification we can go through > chrome.[windows/tabs/extension] but any call to those APIs will throw an > access denied error. > > Is there any workaround or something we can do in the short term to > accomplish this type of communication? Maybe something like what content > scripts do with ports. > > What are the proposals for this under discussion? > > Thanks for your help. > > Marcos > > On Thu, Nov 5, 2009 at 6:22 PM, Marcos Aruj <[email protected]> wrote: > >> Ok, done: http://www.crbug.com/26859 >> >> I attached a crx to the report that triggers the bug. >> >> Thanks! >> >> On Thu, Nov 5, 2009 at 5:19 PM, John Gregg <[email protected]> wrote: >> >>> Thanks for the bug report, I am currently working on getting >>> Notifications working for extensions and I'm familiar with this issue, >>> although I don't think there is a bug for it yet. If you would create one I >>> can update it as I get the fix checked in (which will hopefully be tomorrow, >>> I think it's a fairly easy fix). >>> >>> -John >>> >>> On Thu, Nov 5, 2009 at 6:11 PM, Marcos Aruj <[email protected]>wrote: >>> >>>> Hi all, >>>> >>>> We've been testing the Notifications API and have shown them >>>> successfully on a regular page. We are trying to use it from within an >>>> extension, but Chromium crashes when calling requestPermission. It >>>> correctly >>>> asks to allow notifications for chrome-extension://XXXXXXXXXXXXXXXXXXXXXX/, >>>> but after allowing or denying, it crashes. >>>> >>>> Let me know if a bug needs to be created, if it's a known issue or if we >>>> are missing something. >>>> >>>> Thanks, >>>> >>>> Marcos >>>> >>>> On Fri, Oct 30, 2009 at 3:57 PM, Marcos Aruj <[email protected]>wrote: >>>> >>>>> Hi all, >>>>> >>>>> Quick question, how is the Notifications API going for the release of >>>>> 4.0? Are there any news on this? Any sample code? Just wanted to know if >>>>> we >>>>> can rely on it now or if we should wait. >>>>> >>>>> Thanks! >>>>> >>>>> Marcos >>>>> >>>>> On Tue, Oct 20, 2009 at 11:04 AM, Darin Fisher <[email protected]>wrote: >>>>> >>>>>> OK, that sounds reasonable to me. >>>>>> -Darin >>>>>> >>>>>> >>>>>> On Tue, Oct 20, 2009 at 9:51 AM, John Gregg <[email protected]>wrote: >>>>>> >>>>>>> Not precisely embedding a TabContents; I'm drawing a custom toast >>>>>>> using views and putting a RenderViewHost+RenderWidgetHostView in it. >>>>>>> >>>>>>> -John >>>>>>> >>>>>>> >>>>>>> On Tue, Oct 20, 2009 at 12:27 AM, Darin Fisher >>>>>>> <[email protected]>wrote: >>>>>>> >>>>>>>> Is this accomplished by embedding a TabContents in a custom drawn >>>>>>>> (using Views) toast? >>>>>>>> -Darin >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Oct 19, 2009 at 2:17 PM, Drew Wilson <[email protected] >>>>>>>> > wrote: >>>>>>>> >>>>>>>>> To be clear - our priority is to support HTML notifications on all >>>>>>>>> platforms *before* investigating support for native notification >>>>>>>>> platforms >>>>>>>>> (like Growl/libnotify). >>>>>>>>> >>>>>>>>> -atw >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Oct 19, 2009 at 11:25 AM, Ian Fette <[email protected]>wrote: >>>>>>>>> >>>>>>>>>> We're trying to come up with a way to display html notifications >>>>>>>>>> on these platforms, once we get the windows one checked in. (Likely >>>>>>>>>> code >>>>>>>>>> that we will have to write.) >>>>>>>>>> >>>>>>>>>> 2009/10/19 Evan Martin <[email protected]> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> On Mon, Oct 19, 2009 at 11:16 AM, John Gregg <[email protected]> >>>>>>>>>>> wrote: >>>>>>>>>>> > The implementation of notifications is nearly complete for >>>>>>>>>>> Windows chromium >>>>>>>>>>> > with the final pieces being reviewed right now. Hopefully it >>>>>>>>>>> will be >>>>>>>>>>> > available on the dev channel very soon behind a command-line >>>>>>>>>>> switch for >>>>>>>>>>> > developers to start using. >>>>>>>>>>> > If you have questions about the specifics of the API, let me >>>>>>>>>>> know, I'm happy >>>>>>>>>>> > to answer them and/or provide more documentation. >>>>>>>>>>> >>>>>>>>>>> I had alluded to this before, but I don't still see a good >>>>>>>>>>> answer: >>>>>>>>>>> what is the plan on Mac/Linux when the API is called with HTML? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Marcos Aruj Alvarez >>>>> Ingeniero de Software >>>>> ------------------------------- >>>>> [email protected] >>>>> ----- >>>>> >>>> >>>> >>>> >>>> -- >>>> Marcos Aruj Alvarez >>>> Ingeniero de Software >>>> ------------------------------- >>>> [email protected] >>>> ----- >>>> >>> >>> >> >> >> -- >> Marcos Aruj Alvarez >> Ingeniero de Software >> ------------------------------- >> [email protected] >> ----- >> > > > > -- > Marcos Aruj Alvarez > Ingeniero de Software > ------------------------------- > [email protected] > ----- > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
