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

Unified Diff: chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm

Issue 11305008: Remove TabContents from TabStripModelObserverBridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
Index: chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
index 5c169e0b11cd7de711c27819a1483fe533446669..5b0a89c47d0de8f5c94af2d52e3e8e49e8def2f1 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm
@@ -13,7 +13,6 @@
#import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
#import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
#import "chrome/browser/ui/cocoa/view_id_util.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -136,14 +135,14 @@ class InfoBarNotificationObserver : public content::NotificationObserver {
return controller;
}
-- (void)changeTabContents:(TabContents*)contents {
+- (void)changeWebContents:(content::WebContents*)contents {
registrar_.RemoveAll();
[self removeAllInfoBars];
- currentTabContents_ = contents;
- if (currentTabContents_) {
+ currentWebContents_ = contents;
+ if (currentWebContents_) {
InfoBarTabHelper* infobarTabHelper =
- InfoBarTabHelper::FromWebContents(currentTabContents_->web_contents());
+ InfoBarTabHelper::FromWebContents(currentWebContents_);
for (size_t i = 0; i < infobarTabHelper->GetInfoBarCount(); ++i) {
InfoBar* infobar = infobarTabHelper->
GetInfoBarDelegateAt(i)->CreateInfoBar(infobarTabHelper);
@@ -162,9 +161,9 @@ class InfoBarNotificationObserver : public content::NotificationObserver {
[self positionInfoBarsAndRedraw];
}
-- (void)tabDetachedWithContents:(TabContents*)contents {
- if (currentTabContents_ == contents)
- [self changeTabContents:NULL];
+- (void)tabDetachedWithContents:(content::WebContents*)contents {
+ if (currentWebContents_ == contents)
+ [self changeWebContents:NULL];
}
- (NSUInteger)infobarCount {

Powered by Google App Engine
This is Rietveld 408576698