New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 23879 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner:
User never visited
Closed: Oct 2009
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug
M-4

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment

Finalize browser actions API

Project Member Reported by aa@chromium.org, Oct 5 2009

Issue description

They should both have the API documented at 
http://code.google.com/p/chromium/wiki/BrowserActions, except the page 
actions API should have an additional show(int tabID) method, and should 
not have the badge related methods.

We need to keep the current page action API for compat. This should be easy 
to do in extension_process_bindings.js.

I'm currently thinking that we should allow multiple browser actions and 
page actions per extension.

My reasoning is that although it would be neat to have one-extension one-
feature, we cannot come up with any way to do this and allow extensions to 
communicate easily. Also, it would increase memory bloat (more processes).
 

Comment 1 by aa@chromium.org, Oct 5 2009

Labels: Mstone-4
Just as an FYI: Having multiple Browser Actions per extension means implementing 
something similar to Page Actions, where the Chrome support js makes a native call into 
Chrome to find out what Browser Actions the extension supports and sets up events for 
each one.

Comment 3 by aa@chromium.org, Oct 5 2009

Yeah, I figure it should be pretty easy to combine the best parts of both these APIs (?
).
Sure. I have no problem with that.

Comment 5 by aa@chromium.org, Oct 5 2009

Labels: Pri-2

Comment 6 by aa@chromium.org, Oct 6 2009

Labels: -Pri-2 Pri-1
Bumping to P1 as it is a large API change.

Comment 7 by aa@chromium.org, Oct 10 2009

I've put a draft of how to do this here:

http://code.google.com/p/chromium/wiki/BrowserActions
http://code.google.com/p/chromium/wiki/PageActionAPIv2

Please let me know what you think.

Comment 8 by finnur@chromium.org, Oct 10 2009

Good stuff.

Out of curiosity... in what scenario does it make sense to update the browser action 
tooltip per tab? 

I presume details of dragging etc. apply to Browser Actions also, even though they are 
only specified for Page Actions?

nit: the documentation for setBadgeText should appear before setBadgeBackgroundColor 
and setBadgeTextColor. It would give the two latter functions more context.

 

Comment 9 by aa@chromium.org, Oct 10 2009

To be honest, I think the tooltip component is pretty uninteresting. I include it 
mainly for consistency with other things in the toolbar that also have tooltips.

But playing along, say you had a 'bookmark in delicious' browser action. If a tab is 
already bookmarked you might want to change the icon, and change the tooltip to say 
'edit bookmark'.

Comment 10 by aa@chromium.org, Oct 12 2009

Status: Assigned
Summary: Finalize browser actions API
Splitting into two bugs: one for browser actions and one for page actions.
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=29068 

------------------------------------------------------------------------
r29068 | aa@chromium.org | 2009-10-14 17:02:24 -0700 (Wed, 14 Oct 2009) | 6 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/extension_browser_actions_api.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/extension_browser_actions_api.h?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/extension_browser_event_router.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/extension_browser_event_router.h?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/extension_function_dispatcher.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/image_loading_tracker.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/gtk/browser_actions_toolbar_gtk.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/views/browser_actions_container.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/api/extension_api.json?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/browserAction.html?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/extension_resource_unittest.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/extensions/extension_process_bindings.cc?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/resources/extension_process_bindings.js?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/samples/gmail_browser_action/background.html?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/samples/make_page_red/background.html?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/samples/print_browser_action/background.html?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/samples/test_browser_action/background.html?r1=29068&r2=29067
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/samples/test_browser_action/manifest.json?r1=29068&r2=29067

Update browser actions api to be like new design doc.

BUG= 23879 
TEST=Install sample gmail browser action sample.

Review URL: http://codereview.chromium.org/264046
------------------------------------------------------------------------

Comment 12 by aa@chromium.org, Oct 15 2009

Status: Fixed
Labels: Area-Internals Internals-Install
Labels: -Area-Internals -Internals-Install
Fixing a bulk edit. Looks like the search query was not correct.
Labels: Feature-Extensions
Project Member

Comment 16 by bugdroid1@chromium.org, Oct 12 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member

Comment 17 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Mstone-4 -Feature-Extensions M-4 Cr-Platform-Extensions
Project Member

Comment 18 by bugdroid1@chromium.org, Mar 13 2013

Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue

Sign in to add a comment