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

Unified Diff: chrome/browser/debugger/devtools_window.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/debugger/devtools_window.cc
===================================================================
--- chrome/browser/debugger/devtools_window.cc (revision 145001)
+++ chrome/browser/debugger/devtools_window.cc (working copy)
@@ -22,6 +22,7 @@
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -173,7 +174,7 @@
bool shared_worker_frontend) {
// Create TabContents with devtools.
TabContents* tab_contents =
- Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL);
+ chrome::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL);
tab_contents->web_contents()->GetRenderViewHost()->AllowBindings(
content::BINDINGS_POLICY_WEB_UI);
tab_contents->web_contents()->GetController().LoadURL(
@@ -257,7 +258,7 @@
// for us.
Browser* browser = browser_;
delete this;
- browser->CloseAllTabs();
+ chrome::CloseAllTabs(browser);
}
}
@@ -388,11 +389,9 @@
if (!inspected_tab_)
return false;
- const NavigationController& controller =
- inspected_tab_->web_contents()->GetController();
for (BrowserList::const_iterator it = BrowserList::begin();
it != BrowserList::end(); ++it) {
- int tab_index = (*it)->GetIndexOfController(&controller);
+ int tab_index = chrome::GetIndexOfTab(*it, inspected_tab_->web_contents());
if (tab_index != TabStripModel::kNoTab) {
*browser = *it;
*tab = tab_index;
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_browsertest.cc ('k') | chrome/browser/download/chrome_download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698