According to the docs, you can't put null:
 chrome.windows.getAll({ populate: true }, function(windowList) {
   alert('Number of opened windows: ' + windowList.length);
 }

You can get the tab's url name by iterating the windowList (since its an
array of windows), and for each window windowList[i].tabs[j].url


- Mohamed Mansour


On Sun, Sep 20, 2009 at 2:57 PM, Hill Hill <[email protected]> wrote:

> Thanks a lot! Another one question:
> when i call this way
> chrome.windows.getAll(null,callback);
> it doesn't fall into callback function when this way
> chrome.windows.getAll(true,callback);
> it shows an error cause bool is not an object. can you give a valid
> example?
>
> 2009/9/21 Mohamed Mansour <[email protected]>
>
> You  could iterate through all the 
> windows<http://code.google.com/chrome/extensions/windows.html#method-getAll>,
>>  and for each window you get all the 
>> tabs<http://code.google.com/chrome/extensions/tabs.html#method-getAllInWindow>
>>  via
>> the window_id.
>> That is how you will know how many tabs there are. Unless there is an
>> easier way that the extensions people know of.
>>
>> - Mohamed
>>
>> On Sun, Sep 20, 2009 at 1:56 PM, Hill Hill <[email protected]> wrote:
>>
>>> BTW,. you gave me links to tab Type, but may be you can explain how to
>>> get tabs count  or  IDs of tabs?
>>>
>>> 2009/9/19 Mohamed Mansour <[email protected]>
>>>
>>>> Hello, you could write an extension that does that. The API allows this
>>>> kind of stuff. If your familiar with writing extension. Each tab has a url.
>>>> http://code.google.com/chrome/extensions/tabs.html#type-Tab
>>>>
>>>> <http://code.google.com/chrome/extensions/tabs.html#type-Tab>For more
>>>> info on writing extensions, refer to the documentation here:
>>>> http://code.google.com/chrome/extensions/
>>>>  <http://code.google.com/chrome/extensions/>
>>>> -- Mohamed Mansour
>>>>
>>>>
>>>>
>>>> On Thu, Sep 17, 2009 at 4:05 PM, Hill <[email protected]> wrote:
>>>>
>>>>>
>>>>> Hi to all!
>>>>> I want to get urls of opened pages in Chrome at current session?
>>>>> With FF, IE and opera i use Active Accessibility to get 'em but with
>>>>> Chrome i can get only tab name w/o page url.
>>>>> So does anyone can help me?
>>>>>
>>>>> >>>>>
>>>>>
>>>>
>>>
>>
>

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

Reply via email to