Hi John,

To be more specific. We have logic in our background page that acts as a
single entry point for several features, including opening site pages
according to some user preferences and location. Any component that needs to
open a page should do it through this entry point. We also have implemented
an observer-like service, so that several parts of the application can react
over several events.

Use cases:

* The notification contains a link or button that when clicked, the
extension performs an action, ie. opening a custom link in a new tab, in a
new window, etc...
* The extension would want to update a notification's content(if visible)
when some updated data is received via a remote API.

Those are our specific use cases.

Shared workers sound like what we need though.

@Drew, Does "near future" include the 4.0 release? Let us know if you need
help testing this.

Thanks a lot!

On Mon, Nov 9, 2009 at 10:33 PM, John Gregg <john...@google.com> wrote:

> 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 <marcos.a...@gmail.com>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 <marcos.a...@gmail.com>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 <john...@google.com> 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 <marcos.a...@gmail.com>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 <marcos.a...@gmail.com>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 <da...@chromium.org>wrote:
>>>>>>
>>>>>>> OK, that sounds reasonable to me.
>>>>>>> -Darin
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 20, 2009 at 9:51 AM, John Gregg <john...@google.com>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 
>>>>>>>> <da...@chromium.org>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 <
>>>>>>>>> atwil...@chromium.org> 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 <i...@chromium.org>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 <e...@chromium.org>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Oct 19, 2009 at 11:16 AM, John Gregg <
>>>>>>>>>>>> john...@google.com> 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
>>>>>> -------------------------------
>>>>>> marcos.a...@gmail.com
>>>>>> -----
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Marcos Aruj Alvarez
>>>>> Ingeniero de Software
>>>>> -------------------------------
>>>>> marcos.a...@gmail.com
>>>>> -----
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Marcos Aruj Alvarez
>>> Ingeniero de Software
>>> -------------------------------
>>> marcos.a...@gmail.com
>>> -----
>>>
>>
>>
>>
>> --
>> Marcos Aruj Alvarez
>> Ingeniero de Software
>> -------------------------------
>> marcos.a...@gmail.com
>> -----
>>
>
>


-- 
Marcos Aruj Alvarez
Ingeniero de Software
-------------------------------
marcos.a...@gmail.com
-----

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to