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

Unified Diff: chrome/browser/download/download_shelf.cc

Issue 12066003: Remove TabStripModel wrapper use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 7 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 | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/errorpage_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_shelf.cc
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index be24469942e6294f136bc59705bd6d44a758d5a4..843a662208d0dd52a2375d829122e9cd6776b9a0 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
@@ -117,10 +117,11 @@ void DownloadShelf::ShowDownload(DownloadItem* download) {
// Show the download started animation if:
// - Download started animation is enabled for this download. It is disabled
// for "Save As" downloads and extension installs, for example.
- // - The browser has an active visble WebContents. (browser isn't minimized,
+ // - The browser has an active visible WebContents. (browser isn't minimized,
// or running under a test etc.)
// - Rich animations are enabled.
- content::WebContents* shelf_tab = chrome::GetActiveWebContents(browser());
+ content::WebContents* shelf_tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
if (DownloadItemModel(download).ShouldShowDownloadStartedAnimation() &&
shelf_tab &&
platform_util::IsVisible(shelf_tab->GetNativeView()) &&
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/errorpage_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698