Comment #11 on issue 11906 by [email protected]: PageActions API probably  
wants a way to update fields temporarily
http://code.google.com/p/chromium/issues/detail?id=11906

We could add a "replace" method. However, the problem aa is pointing out is  
less about how the page action developer
specifies an icon to replace, and more about how the *system* guarantees a  
display order.

Once we have some guarantee here, we can do option 1 as I described or  
implement "replace" (if you think that is better than
option 1). I think a disableForTab is cleaner because I don't need to  
specify NULL as a replacement if I just want to turn
off a page action.

Currently, we iterate through the extensions vector to get at the page  
actions each extension has. The extensions vector is
relatively stable (we always add to the back) and we will never get page  
icon icons from two extensions intermingled. On the
other hand, the order of icons *within* an extension is not well defined.  
Basically, we keep a map keyed off of the
page_action id and the order of icons is based on how the map  
const_iterator iterates through the map.

I think we should allow the extension developer to specify the internal  
display_order for the icons. We could do this by
adding an optional field in the manifest for each page action, called  
display_order, that defaults to 0 and order the icons
within an extension based on that integer. That way, icons state can be  
simulated with two icons and developers can order
the icons any way they want (even if their icons don't represent  
different "states").

I'll start working on changing the patch unless I hear complaints.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to