summaryrefslogtreecommitdiffstats
path: root/chrome/browser/debugger/browser_list_tabcontents_provider.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/debugger/browser_list_tabcontents_provider.cc')
-rw-r--r--chrome/browser/debugger/browser_list_tabcontents_provider.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/debugger/browser_list_tabcontents_provider.cc b/chrome/browser/debugger/browser_list_tabcontents_provider.cc
new file mode 100644
index 0000000..9321241
--- /dev/null
+++ b/chrome/browser/debugger/browser_list_tabcontents_provider.cc
@@ -0,0 +1,20 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/debugger/browser_list_tabcontents_provider.h"
+
+#include "chrome/browser/browser_list.h"
+#include "chrome/browser/tabs/tab_strip_model.h"
+
+DevToolsHttpProtocolHandler::InspectableTabs
+BrowserListTabContentsProvider::GetInspectableTabs() {
+ DevToolsHttpProtocolHandler::InspectableTabs tabs;
+ for (BrowserList::const_iterator it = BrowserList::begin(),
+ end = BrowserList::end(); it != end; ++it) {
+ TabStripModel* model = (*it)->tabstrip_model();
+ for (int i = 0, size = model->count(); i < size; ++i)
+ tabs.push_back(model->GetTabContentsAt(i));
+ }
+ return tabs;
+}