[chromium-dev] PrefsService shared with OffTheRecordProfile
Hi, I was investigating how notifications should work in incognito mode, and came across the fact that the PrefsService for the incognito profile is the same one as the real profile. In some ways I guess that makes sense, since it's state about *how* the user uses the browser, not what the user is doing. But it does lead to some things that seem odd, like if you whitelist an origin for popups while in incognito mode, that origin is whitelisted permanently even when you go back to normal mode. And in my case, it behaves likewise for notifications, since those permissions are stored in the PrefsService. Is that how we want it to work? -John -- Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev
Re: [chromium-dev] PrefsService shared with OffTheRecordProfile
On Wed, Nov 25, 2009 at 12:26 PM, Peter Kasting pkast...@google.com wrote: On Wed, Nov 25, 2009 at 12:14 PM, Adam Barth aba...@chromium.org wrote: On Wed, Nov 25, 2009 at 11:38 AM, John Gregg john...@google.com wrote: if you whitelist an origin for popups while in incognito mode, that origin is whitelisted permanently even when you go back to normal mode. And in my case, it behaves likewise for notifications, since those permissions are stored in the PrefsService. Is that how we want it to work? Nope. That sounds like a bug. We should never write URLs or hosts the user visits while in incognito to disk. This is the sort of thing for which Profile::ServiceAccessType was invented. Ideally, things like recording whitelisted popup hosts should request IMPLICIT_ACCESS, which should result in no read happening. From reading the code, I'm not sure that's consistent. Adding a whitelisted host for popups is a result of a user action (the user choosing always allow from the blocked popup container), so according to the code comments, that would be an explicit access. It's kind of a gray area: it's like adding a bookmark in terms of user-initiation, but it also affects web browsing. -John -- Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev
[chromium-dev] Re: [chromium-extensions] Re: Desktop Notifications
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.comwrote: 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://XX/, 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.comwrote: 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.orgwrote: OK, that sounds reasonable to me. -Darin On Tue, Oct 20, 2009 at 9:51 AM, John Gregg john...@google.comwrote: 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.orgwrote: 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.orgwrote: 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
[chromium-dev] Re: [chromium-extensions] Re: Desktop Notifications
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://XX/, 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.comwrote: 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.orgwrote: 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.orgwrote: 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.orgwrote: 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 - --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: [chromium-extensions] Re: Desktop Notifications
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.orgwrote: 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? --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: [chromium-extensions] Re: Desktop Notifications
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. -John On Mon, Oct 19, 2009 at 11:05 AM, Aaron Boodman a...@chromium.org wrote: Hello, sorry for not replying sooner. The reason I think nobody responded is that this proposal is not technically part of the extensions system, but would be available to all web pages (including extensions). I think that the wider mailing list chromium-dev may contain people who know what the status is. - a On Mon, Oct 19, 2009 at 10:18 AM, Marcos Aruj marcos.a...@gmail.com wrote: Hi again, Are there really no news in this? Is the notifications API going live for the next release? Any docs on how can we use it now if it's available? We depend on this for some functionality and want to avoid DIV injection since it brings some UI issues when switching pages, override flash contents, etc... Thanks again, Marcos On Sun, Oct 11, 2009 at 7:47 PM, Marcos Aruj marcos.a...@gmail.com wrote: Any news on this? We are really interested in this. Thanks for your help. Marcos On Fri, Oct 9, 2009 at 1:00 AM, Raymond Lee raymondlee...@googlemail.com wrote: Hi all, We are planning to use the desktop notifications in our extension. http://dev.chromium.org/developers/design-documents/desktop-notifications Does anyone when the desktop notifications API will be ready? Best Regards Raymond -- 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 -~--~~~~--~~--~--~---
[chromium-dev] Re: [chromium-extensions] Re: Desktop Notifications
I've posted the (draft) API spec to http://sites.google.com/a/chromium.org/dev/developers/design-documents/desktop-notifications/api-specification . -John On Mon, Oct 19, 2009 at 11:58 AM, Marcos Aruj marcos.a...@gmail.com wrote: Hi all, Thanks for your answer. @John Gregg, We would really appreciate it if you can give us some API specifics and documentation so that we can see how to implement them for our extension and test them as soon as they are available. We are working on a windows-only version for now, so it doesn't matter if it's not ready yet for LInux and Mac. Thanks very much for your help! Marcos On Mon, Oct 19, 2009 at 12:25 PM, 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 - --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Changed WebKit build flags, may require clobber after sync
Hi all, I checked in a change yesterday which sets ENABLE_NOTIFICATIONS=1 for the Chromium build of WebKit (in features_override.gypi). If you sync up and are seeing linking errors regarding notifications, this should be fixed by rebuilding WebCore. Some of the build bots seem to be fine, but others have hit this error. Thanks, -John --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: buildbot failure in Chromium on Linux Builder (Views dbg), revision 28054
Looks like a merge problem with my recent change to render_messages.h regarding WebPreferences. I can submit a fix. -John On Mon, Oct 5, 2009 at 3:03 PM, build...@chromium.org wrote: http://build.chromium.org/buildbot/waterfall/ Automatically closing tree for compile on Linux Builder (Views dbg) http://build.chromium.org/buildbot/waterfall/builders/Linux%20Builder%20%28Views%20dbg%29/builds/1824 Revision: 28053, 28054 Blame list: erik...@chromium.org,fin...@chromium.org Linux Builder (Views dbg) Build 1824http://build.chromium.org/buildbot/waterfall/builders/Linux%20Builder%20%28Views%20dbg%29/builds/1824 update scripts stdiohttp://build.chromium.org/buildbot/waterfall/builders/Linux%20Builder%20%28Views%20dbg%29/builds/1824/steps/shell/logs/stdio update stdiohttp://build.chromium.org/buildbot/waterfall/builders/Linux%20Builder%20%28Views%20dbg%29/builds/1824/steps/gclient/logs/stdio compile failed stdiohttp://build.chromium.org/buildbot/waterfall/builders/Linux%20Builder%20%28Views%20dbg%29/builds/1824/steps/compile/logs/stdio Changed by: *erik...@chromium.org* Changed at: *Mon 05 Oct 2009 15:00:08* Branch: *src* Revision: *28053* Changed files: - *chrome/browser/extensions/extension_host.cc* - *chrome/browser/views/browser_bubble_win.cc* - *chrome/browser/extensions/extension_host.h* - *chrome/common/render_messages.h* - *chrome/test/data/extensions/samples/set_page_color/popup.html* Comments: Allow popups to close themselves with window.close(). This also fixes an issue where not all of the parts of WebPreferences were being serialized/deserialized across IPC. BUG=23832 TEST=run set_page_color extension, when it sets the color, the popup should close Review URL: http://codereview.chromium.org/243096 Changed by: *fin...@chromium.org* Changed at: *Mon 05 Oct 2009 15:00:18* Branch: *src* Revision: *28054* Changed files: - *chrome/app/generated_resources.grd* Comments: Landing a patch (http://codereview.chromium.org/249054) from an external contributor (Thiago Farina). Description from original changelist: Add ellipses to |Add| and |Edit| buttons of Search engine manager(keyword view), since they opens another window and does not, for example, add or edit the selected item. BUG=16380 TEST=Open the search engine manager and see if the |Add| and the |Edit| button has the ... in the end. Review URL: http://codereview.chromium.org/257053 --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] desktop notifications, preliminary code for review
Hi all, I'm still waiting for my WebKit patch which creates the Desktop Notification API to be reviewed and get checked in, but since it may yet be a while I posted some of the chromium-side code at http://codereview.appspot.com/104044/. As I mentioned to some of you offline, I would greatly appreciate a pre-review so I can start to work out the issues and be as ready as possible to check in once the WebKit process finishes. This isn't the entire set of changes but contains the core pieces that would most benefit from feedback. Worker integration, e.g., will follow up in a separate patch. This is my first time through with most of these tools, so let me know if I can do anything to make it easier. A design doc that gives an overview of how this stuff works is attached to this email. Feedback is welcome on that too. Thanks, -John --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~--- Notifications in Chromium Design Doc.rtf Description: RTF file
[chromium-dev] Re: desktop notifications, preliminary code for review
The plan for linux is to use libnotify, which is Growl-like, for text notifications, and possibly something we build for HTML balloon notifications which could be turned on or off by the user. Can you elaborate on what you mean by more broad? We think that offering a text version and an html version which app writers can query for in the browser allow us to offer on each platform the most full-featured option that makes sense to those users. Other user agents could then implement one or the other or both as makes sense for their platforms (thinking mobile especially). I'll update the doc to discuss the linux plan. -John On Wed, Aug 5, 2009 at 4:13 PM, Evan Martin e...@chromium.org wrote: On Wed, Aug 5, 2009 at 4:00 PM, Evan Martine...@chromium.org wrote: On Wed, Aug 5, 2009 at 3:51 PM, John Greggjohn...@google.com wrote: As I mentioned to some of you offline, I would greatly appreciate a pre-review so I can start to work out the issues and be as ready as possible to check in once the WebKit process finishes. Looks promising, but I see Mac and Windows code and no Linux. ? To clarify, I'd at least like to see the design doc address how and whether this will work on Linux. For example, suppose the APIs available were more broad -- maybe then there is extra information that ought to be plumbed around. --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: desktop notifications, preliminary code for review
Sorry, maybe not. It's a big world to keep up to date! Between WHATWG, webkit-dev, and offline it's been discussed at some length at many levels, but not much on this list as I check the archives. But in any case, while the code patch is large as I said I consider it preliminary, and this is why I ask for feedback on the document (and the design expressed in it) as well as the code. Thanks, -John On Wed, Aug 5, 2009 at 4:29 PM, Ben Goodger (Google) b...@chromium.orgwrote: Has a design doc for this feature in general been sent around? This is a fairly large change otherwise. -Ben On Wed, Aug 5, 2009 at 4:13 PM, Evan Martine...@chromium.org wrote: On Wed, Aug 5, 2009 at 4:00 PM, Evan Martine...@chromium.org wrote: On Wed, Aug 5, 2009 at 3:51 PM, John Greggjohn...@google.com wrote: As I mentioned to some of you offline, I would greatly appreciate a pre-review so I can start to work out the issues and be as ready as possible to check in once the WebKit process finishes. Looks promising, but I see Mac and Windows code and no Linux. ? To clarify, I'd at least like to see the design doc address how and whether this will work on Linux. For example, suppose the APIs available were more broad -- maybe then there is extra information that ought to be plumbed around. --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] sandboxing external libraries (like Growl)
Hi all, I'm working on a desktop notifications javascript API for web apps; on Mac these calls will go out to the Growl notification system if it's installed and user has granted permission to get notifications from that origin. I'm still trying to completely grasp the sandbox architecture, so the question I need some input on is how to design the integration with respect to sandboxing security. The Growl code that would be included in Chrome is just a stub that works by marshalling data over to a separate Growl process, so the surface area is small, but as a design question, is calling to a third-party library something that should happen in the sandboxed renderer process, or should it be kept in the browser process? One other factor is that the notification requires an icon to be downloaded, which should happen outside the sandbox. So there are two possible flows: A. renderer gets notification(iconURL, text) call = hop to browser to download icon = call Growl from browser B. renderer gets notification(iconURL, text) call = hop to browser to download icon = pass back icon data to renderer = call Growl from renderer My instinct is that B is safer for the remote possibility that Growl chokes on the input and causes a crash. What do people think? Is there an existing precedent for similar library calls? Thanks, -John --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: sandboxing external libraries (like Growl)
Yes, on Linux the plan is the use the libnotify library, which is a DBus service. Thanks for all the responses; it's clear this needs to be thought of more like a system call than an untrusted library, and the better plan is to check inputs including icon data in the renderer as much as possible, than pass that to the browser to invoke the library. Thanks, -John On Thu, Jun 18, 2009 at 2:24 PM, Adam Langley a...@chromium.org wrote: On Thu, Jun 18, 2009 at 1:58 PM, John Greggjohn...@google.com wrote: B. renderer gets notification(iconURL, text) call = hop to browser to download icon = pass back icon data to renderer = call Growl from renderer Obviously on Linux we'll be using some DBus service for the notification rather than Growl, but this design (calling the service from the renderer) will /not/ work on Linux. AGL --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] RenderViewHost::LoadAlternateHTMLString
I'm trying to load a static HTML string into a small render view (for the purpose of desktop notifications), and I came across the method RenderViewHost::LoadAlternateHTMLString, which, based on the name, sounds like what I want. I have things working the way I want if I call rvh-NavigateToURL(url): it loads the remote URL into my view. But if I replace that call with rvh-LoadAlternateHTMLString(LHello World, false, GURL(), ) [the comments say the last two arguments are ignored if the second argument is false], I get strange behavior: my notification view is empty, and a new tab opens to chrome://chromewebdata/ and displays an INVALID_URL error. Btw, the same thing happens if I replace Hello World with valid HTML. I've tried debugging this but nothing obvious is jumping out as a problem. Any advice on what I might be doing wrong? Is there a better way to load static HTML into a RenderView? Thanks, -John --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---