1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 def __init__(self
, tab_list_backend
):
6 self
._tab
_list
_backend
= tab_list_backend
8 def New(self
, timeout
=300):
9 return self
._tab
_list
_backend
.New(timeout
)
12 return self
._tab
_list
_backend
.__iter
__()
15 return self
._tab
_list
_backend
.__len
__()
17 def __getitem__(self
, index
):
18 return self
._tab
_list
_backend
.__getitem
__(index
)
20 def GetTabById(self
, identifier
):
21 """The identifier of a tab can be accessed with tab.id."""
22 return self
._tab
_list
_backend
.GetTabById(identifier
)