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

Unified Diff: chrome/browser/ui/find_bar/find_bar_controller.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/find_bar/find_bar_controller.cc
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc
index 87bed69e9aa6db38718556d003b8a5951c1734f5..19e9e1f820bb52164cbec0e4783dce2aad7aa7b8 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.cc
+++ b/chrome/browser/ui/find_bar/find_bar_controller.cc
@@ -15,6 +15,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
+#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "ui/gfx/rect.h"
@@ -85,11 +86,14 @@ void FindBarController::ChangeTabContents(TabContentsWrapper* contents) {
if (!tab_contents_)
return;
- registrar_.Add(this, chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
content::Source<TabContents>(tab_contents_->tab_contents()));
registrar_.Add(
- this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&tab_contents_->controller()));
+ this,
+ content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(
+ &tab_contents_->tab_contents()->controller()));
MaybeSetPrepopulateText();
@@ -129,7 +133,7 @@ void FindBarController::Observe(int type,
} else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* source_controller =
content::Source<NavigationController>(source).ptr();
- if (source_controller == &tab_contents_->controller()) {
+ if (source_controller == &tab_contents_->tab_contents()->controller()) {
content::LoadCommittedDetails* commit_details =
content::Details<content::LoadCommittedDetails>(details).ptr();
content::PageTransition transition_type =

Powered by Google App Engine
This is Rietveld 408576698