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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 9121064: Cleanup: Remove more uses of Browser::tabstrip_model(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
===================================================================
--- chrome/browser/automation/testing_automation_provider.cc (revision 120097)
+++ chrome/browser/automation/testing_automation_provider.cc (working copy)
@@ -1358,7 +1358,7 @@
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
Browser* browser = Browser::GetBrowserForController(tab, NULL);
- *tabstrip_index = browser->tabstrip_model()->GetIndexOfController(tab);
+ *tabstrip_index = browser->GetIndexOfController(tab);
}
}
@@ -1564,7 +1564,7 @@
return;
BrowserList::const_iterator iter = BrowserList::begin();
- for (;iter != BrowserList::end(); ++iter) {
+ for (; iter != BrowserList::end(); ++iter) {
gfx::NativeWindow this_window = (*iter)->window()->GetNativeHandle();
if (window == this_window) {
// Add() returns the existing handle for the resource if any.
@@ -1838,7 +1838,7 @@
void TestingAutomationProvider::GetBookmarksAsJSON(
int handle,
std::string* bookmarks_as_json,
- bool *success) {
+ bool* success) {
*success = false;
if (browser_tracker_->ContainsHandle(handle)) {
Browser* browser = browser_tracker_->GetResource(handle);
@@ -3983,7 +3983,7 @@
}
// This observer will delete itself.
- PasswordStoreLoginsChangedObserver *observer =
+ PasswordStoreLoginsChangedObserver* observer =
new PasswordStoreLoginsChangedObserver(this, reply_message,
PasswordStoreChange::ADD,
"password_added");
@@ -4661,13 +4661,10 @@
// Selects the given |browser| and |tab| if not selected already.
void EnsureTabSelected(Browser* browser, WebContents* tab) {
- TabContentsWrapper* active =
- browser->tabstrip_model()->GetActiveTabContents();
- if (!active || active->web_contents() != tab ||
+ if (browser->GetSelectedWebContents() != tab ||
browser != BrowserList::GetLastActive()) {
- browser->ActivateTabAt(
- browser->tabstrip_model()->GetIndexOfController(&tab->GetController()),
- true /* user_gesture */);
+ browser->ActivateTabAt(browser->GetIndexOfController(&tab->GetController()),
+ true /* user_gesture */);
}
}
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698