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

Unified Diff: chrome/browser/ui/webui/feedback_ui.cc

Issue 11419276: Remove tabstrip wrappers in browser_tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 8 years 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/ui/webui/feedback_ui.cc
diff --git a/chrome/browser/ui/webui/feedback_ui.cc b/chrome/browser/ui/webui/feedback_ui.cc
index 7b1ec4b093af2e82b8252f546fd96e3748db9044..5023b7d5bb2da932831f0214c241594ee98bd2b4 100644
--- a/chrome/browser/ui/webui/feedback_ui.cc
+++ b/chrome/browser/ui/webui/feedback_ui.cc
@@ -28,11 +28,11 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/browser/ui/webui/screenshot_source.h"
@@ -169,7 +169,7 @@ std::string GetUserEmail() {
int GetIndexOfFeedbackTab(Browser* browser) {
GURL feedback_url(chrome::kChromeUIFeedbackURL);
for (int i = 0; i < browser->tab_count(); ++i) {
- WebContents* tab = chrome::GetWebContentsAt(browser, i);
+ WebContents* tab = browser->tab_strip_model()->GetWebContentsAt(i);
if (tab && tab->GetURL().GetWithEmptyPath() == feedback_url)
return i;
}
@@ -194,11 +194,11 @@ void ShowFeedbackPage(Browser* browser,
// First check if we're already open (we cannot depend on ShowSingletonTab
// for this functionality since we need to make *sure* we never get
// instantiated again while we are open - with singleton tabs, that can
- // happen)
+ // happen).
int feedback_tab_index = GetIndexOfFeedbackTab(browser);
if (feedback_tab_index >= 0) {
- // Do not refresh screenshot, do not create a new tab
- chrome::ActivateTabAt(browser, feedback_tab_index, true);
+ // Do not refresh screenshot, do not create a new tab.
+ browser->tab_strip_model()->ActivateTabAt(feedback_tab_index, true);
return;
}
@@ -451,7 +451,8 @@ bool FeedbackHandler::Init() {
return false;
if (index >= 0) {
- WebContents* target_tab = chrome::GetWebContentsAt(browser, index);
+ WebContents* target_tab =
+ browser->tab_strip_model()->GetWebContentsAt(index);
if (target_tab)
target_tab_url_ = target_tab->GetURL().spec();
}
« no previous file with comments | « chrome/browser/ui/webui/bookmarks_ui_browsertest.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698