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

Unified Diff: chrome/browser/ui/browser_list.cc

Issue 8227038: Sync Promo: Close browser tab when closing promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix merge issues Created 9 years, 2 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/ui/browser_list.h ('k') | chrome/browser/ui/webui/ntp/ntp_login_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_list.cc
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 668c32dac556b154bbbced9102b67b36b023e3a2..be11579dd2359840435112537ac8179c225e8e87 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -690,6 +690,16 @@ Browser* BrowserList::FindBrowserWithWindow(gfx::NativeWindow window) {
}
// static
+Browser* BrowserList::FindBrowserWithTabContents(TabContents* tab_contents) {
+ DCHECK(tab_contents);
+ for (TabContentsIterator it; !it.done(); ++it) {
+ if (it->tab_contents() == tab_contents)
+ return it.browser();
+ }
+ return NULL;
+}
+
+// static
size_t BrowserList::GetBrowserCountForType(Profile* profile,
bool match_tabbed) {
size_t result = 0;
« no previous file with comments | « chrome/browser/ui/browser_list.h ('k') | chrome/browser/ui/webui/ntp/ntp_login_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698