Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Side by Side Diff: tools/telemetry/telemetry/core/tab_list.py

Issue 915173012: telemetry: Add a method to access tabs by key in TabList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 class TabList(object): 4 class TabList(object):
5 def __init__(self, tab_list_backend): 5 def __init__(self, tab_list_backend):
6 self._tab_list_backend = tab_list_backend 6 self._tab_list_backend = tab_list_backend
7 7
8 def New(self, timeout=None): 8 def New(self, timeout=None):
9 return self._tab_list_backend.New(timeout) 9 return self._tab_list_backend.New(timeout)
10 10
11 def __iter__(self): 11 def __iter__(self):
12 return self._tab_list_backend.__iter__() 12 return self._tab_list_backend.__iter__()
13 13
14 def __len__(self): 14 def __len__(self):
15 return self._tab_list_backend.__len__() 15 return self._tab_list_backend.__len__()
16 16
17 def __getitem__(self, index): 17 def __getitem__(self, index):
18 return self._tab_list_backend.__getitem__(index) 18 return self._tab_list_backend.__getitem__(index)
19
20 def GetTabFromContextId(self, context_id):
nednguyen 2015/02/13 16:46:06 GetTabById(...) ContextId is an implementation de
erikchen 2015/02/13 23:17:15 Done.
21 return self._tab_list_backend.GetTabFromContextId(context_id)
22
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698