Override Chrome's Default File Processing

404 views
Skip to first unread message

Si ++

unread,
Apr 14, 2010, 4:40:24 PM4/14/10
to Chromium-extensions
Is it possible for a Chrome extension (page action) to override the
default file processing Chrome does when a file is navigated to? In
other words, if a file with the extension .png is entered into
Chrome's address bar is it possible for an extension to generate its
own HTML page and drop the image into that (maybe to add simple
editing options etc)?

I have been looking around the developer sections of the site but
haven't found any information related to this yet.

Thanks.

Antony Sargent

unread,
Apr 15, 2010, 6:13:16 PM4/15/10
to Si ++, Chromium-extensions
No, not yet. I think there may be a feature request on file at http://crbug.com that you can star to follow, but if you can't find one please feel free to create one.



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Si ++

unread,
Apr 15, 2010, 9:07:01 PM4/15/10
to Chromium-extensions
Thanks for the reply.

I've been playing around with things and seem to be able to intercept
and display files before they are displayed by Chrome, as long as
Chrome - by default - wraps the file in HTML in order to display it.
What I'm doing is listening for tab URL changes within the background/
process page, checking the file extension, and then telling the tab's
content script to replace the HTML generated by Chrome with some
custom HTML. It has been working very well so far.

Not being able to identify the actual content-type of the file (when
the file is delivered from a server) could be a potential problem, but
in most cases the file extension will reflect the file content type.

On Apr 15, 11:13 pm, Antony Sargent <asarg...@chromium.org> wrote:
> No, not yet. I think there may be a feature request on file athttp://crbug.comthat you can star to follow, but if you can't find one
> please feel free to create one.
>
>
>
> On Wed, Apr 14, 2010 at 1:40 PM, Si ++ <he...@si-robertson.com> wrote:
> > Is it possible for a Chrome extension (page action) to override the
> > default file processing Chrome does when a file is navigated to? In
> > other words, if a file with the extension .png is entered into
> > Chrome's address bar is it possible for an extension to generate its
> > own HTML page and drop the image into that (maybe to add simple
> > editing options etc)?
>
> > I have been looking around the developer sections of the site but
> > haven't found any information related to this yet.
>
> > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>
> > .

Daniel Wagner-Hall

unread,
Apr 15, 2010, 10:03:04 PM4/15/10
to Si ++, Chromium-extensions
http://crbug.com/35070 may be relevant

Si ++

unread,
Apr 15, 2010, 11:03:52 PM4/15/10
to Chromium-extensions
Posted a reply there. Thanks guys :)

On Apr 16, 3:03 am, Daniel Wagner-Hall <dawag...@gmail.com> wrote:
> http://crbug.com/35070may be relevant
>
> On 16 April 2010 02:07, Si ++ <he...@si-robertson.com> wrote:
>
>
>
>
>
> > Thanks for the reply.
>
> > I've been playing around with things and seem to be able to intercept
> > and display files before they are displayed by Chrome, as long as
> > Chrome - by default - wraps the file in HTML in order to display it.
> > What I'm doing is listening for tab URL changes within the background/
> > process page, checking the file extension, and then telling the tab's
> > content script to replace the HTML generated by Chrome with some
> > custom HTML. It has been working very well so far.
>
> > Not being able to identify the actual content-type of the file (when
> > the file is delivered from a server) could be a potential problem, but
> > in most cases the file extension will reflect the file content type.
>
> > On Apr 15, 11:13 pm, Antony Sargent <asarg...@chromium.org> wrote:
> >> No, not yet. I think there may be a feature request on file athttp://crbug.comthatyou can star to follow, but if you can't find one
> >> please feel free to create one.
>
> >> On Wed, Apr 14, 2010 at 1:40 PM, Si ++ <he...@si-robertson.com> wrote:
> >> > Is it possible for a Chrome extension (page action) to override the
> >> > default file processing Chrome does when a file is navigated to? In
> >> > other words, if a file with the extension .png is entered into
> >> > Chrome's address bar is it possible for an extension to generate its
> >> > own HTML page and drop the image into that (maybe to add simple
> >> > editing options etc)?
>
> >> > I have been looking around the developer sections of the site but
> >> > haven't found any information related to this yet.
>
> >> > Thanks.
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups
> >> > "Chromium-extensions" group.
> >> > To post to this group, send email to chromium-extensi...@chromium.org.
> >> > To unsubscribe from this group, send email to
> >> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>
> >> > .
> >> > For more options, visit this group at
> >> >http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to chromium-extensions+unsubscr...@chromium.org.
> > For more options, visit this group athttp://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
> To post to this group, send email to chromium-extensi...@chromium.org.
> To unsubscribe from this group, send email to chromium-extensions+unsubscr...@chromium.org.
> For more options, visit this group athttp://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
Reply all
Reply to author
Forward
0 new messages