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

Unified Diff: chrome/browser/infobars/infobar_delegate.cc

Issue 230853002: Remove remaining dependencies of infobars on content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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/infobars/infobar_delegate.h ('k') | chrome/browser/infobars/infobar_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/infobars/infobar_delegate.cc
diff --git a/chrome/browser/infobars/infobar_delegate.cc b/chrome/browser/infobars/infobar_delegate.cc
index e733f4390fe779305de4036c3fc476749db72aed..b4576d25012686c535641ec5c1a420651cb9c8e2 100644
--- a/chrome/browser/infobars/infobar_delegate.cc
+++ b/chrome/browser/infobars/infobar_delegate.cc
@@ -7,17 +7,9 @@
#include "base/logging.h"
#include "build/build_config.h"
#include "chrome/browser/infobars/infobar.h"
-#include "chrome/browser/infobars/infobar_service.h"
-#include "content/public/browser/navigation_controller.h"
-#include "content/public/browser/navigation_details.h"
-#include "content/public/browser/navigation_entry.h"
-#include "content/public/browser/web_contents.h"
+#include "chrome/browser/infobars/infobar_manager.h"
#include "ui/base/resource/resource_bundle.h"
-using content::NavigationEntry;
-
-// InfoBarDelegate ------------------------------------------------------------
-
const int InfoBarDelegate::kNoIconID = 0;
InfoBarDelegate::~InfoBarDelegate() {
@@ -95,14 +87,7 @@ TranslateInfoBarDelegate* InfoBarDelegate::AsTranslateInfoBarDelegate() {
}
void InfoBarDelegate::StoreActiveEntryUniqueID() {
- // TODO(droger): Remove this dependency on InfoBarService, see
- // http://crbug.com/354379.
- content::WebContents* web_contents =
- InfoBarService::WebContentsFromInfoBar(infobar());
- DCHECK(web_contents);
- NavigationEntry* active_entry =
- web_contents->GetController().GetActiveEntry();
- contents_unique_id_ = active_entry ? active_entry->GetUniqueID() : 0;
+ contents_unique_id_ = infobar()->owner()->GetActiveEntryID();
}
gfx::Image InfoBarDelegate::GetIcon() const {
« no previous file with comments | « chrome/browser/infobars/infobar_delegate.h ('k') | chrome/browser/infobars/infobar_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698