chrome.windows.create and "tabs" permission

193 views
Skip to first unread message

Ben

unread,
Apr 2, 2012, 6:13:45 PM4/2/12
to Chromium-extensions
Please read the following as constructive criticism and non-hostile.

I would really like to use chrome.windows.create to open a new window;
it is (so far) the only method from chrome.windows or chrome.tabs that I
need. However, you need the "tabs" permission in order to use it.

I do not need access to information contained in tabs or windows; the
window I am creating simply opens an extension page, and I can access
its Window object using the extension.getViews method (and I can change
the url or close the tab, and therefore the window, from that context).

An extension utilizing content scripts, browser- or page-actions
(onClicked listeners) will have access to the tab's url and more
anyway*. As such, they should not be required to have the "tabs"
permission if all they need to do is open (for instance) a panel**.

Therefore, I would like to request that either a separate permission be
added for windows.create or chrome.windows as a whole, or that some
other way to access windows.create be provided. Of course, there's no
reason why the "tabs" permission can't still allow use of chrome.windows
too.


* Unless it's not included without the "tabs" permission, but that's not
obvious by looking at the docs; if that's the case, such properties
should be marked as optional or dependent on the presence of the "tabs"
permission.

** What is the "panel" type, anyway? Why is it in windows.create instead
of tabs.create? The bug about sidepanels had said they will be per-tab
rather than per-window; shouldn't they then be in tabs.create, or
somewhere else altogether?

PhistucK

unread,
May 10, 2012, 2:29:29 AM5/10/12
to Ben, Chromium-extensions
This has (at least partly) changed since Chrome 7. chrome.tabs.create does not need any permission anymore. I am not sure about chrome.windows.create, but it would be weird if that needs any special permission.
Anyway, you can just use window.open() in your background page, I guess, instead.

PhistucK




--
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.


Reply all
Reply to author
Forward
0 new messages