summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/find_bar
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/find_bar')
-rw-r--r--chrome/browser/ui/find_bar/find_bar_controller.cc24
-rw-r--r--chrome/browser/ui/find_bar/find_bar_controller.h14
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc4
-rw-r--r--chrome/browser/ui/find_bar/find_tab_helper.cc4
4 files changed, 24 insertions, 22 deletions
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc
index 3a251f0..87bed69 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.cc
+++ b/chrome/browser/ui/find_bar/find_bar_controller.cc
@@ -15,8 +15,8 @@
#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/common/notification_details.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_source.h"
#include "ui/gfx/rect.h"
// The minimum space between the FindInPage window and the search result.
@@ -86,9 +86,10 @@ void FindBarController::ChangeTabContents(TabContentsWrapper* contents) {
return;
registrar_.Add(this, chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
- Source<TabContents>(tab_contents_->tab_contents()));
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- Source<NavigationController>(&tab_contents_->controller()));
+ content::Source<TabContents>(tab_contents_->tab_contents()));
+ registrar_.Add(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(&tab_contents_->controller()));
MaybeSetPrepopulateText();
@@ -105,16 +106,17 @@ void FindBarController::ChangeTabContents(TabContentsWrapper* contents) {
}
////////////////////////////////////////////////////////////////////////////////
-// FindBarHost, NotificationObserver implementation:
+// FindBarHost, content::NotificationObserver implementation:
void FindBarController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
FindTabHelper* find_tab_helper = tab_contents_->find_tab_helper();
if (type == chrome::NOTIFICATION_FIND_RESULT_AVAILABLE) {
// Don't update for notifications from TabContentses other than the one we
// are actively tracking.
- if (Source<TabContents>(source).ptr() == tab_contents_->tab_contents()) {
+ if (content::Source<TabContents>(source).ptr() ==
+ tab_contents_->tab_contents()) {
UpdateFindBarForCurrentResult();
if (find_tab_helper->find_result().final_update() &&
find_tab_helper->find_result().number_of_matches() == 0) {
@@ -126,10 +128,10 @@ void FindBarController::Observe(int type,
}
} else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* source_controller =
- Source<NavigationController>(source).ptr();
+ content::Source<NavigationController>(source).ptr();
if (source_controller == &tab_contents_->controller()) {
content::LoadCommittedDetails* commit_details =
- Details<content::LoadCommittedDetails>(details).ptr();
+ content::Details<content::LoadCommittedDetails>(details).ptr();
content::PageTransition transition_type =
commit_details->entry->transition_type();
// We hide the FindInPage window when the user navigates away, except on
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.h b/chrome/browser/ui/find_bar/find_bar_controller.h
index 6a8e01b..e9ccd3a 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.h
+++ b/chrome/browser/ui/find_bar/find_bar_controller.h
@@ -8,8 +8,8 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace gfx {
class Rect;
@@ -18,7 +18,7 @@ class Rect;
class FindBar;
class TabContentsWrapper;
-class FindBarController : public NotificationObserver {
+class FindBarController : public content::NotificationObserver {
public:
// An enum listing the possible actions to take on a find-in-page selection.
enum SelectionAction {
@@ -45,10 +45,10 @@ class FindBarController : public NotificationObserver {
// the user switches tabs in the Browser window. |contents| can be NULL.
void ChangeTabContents(TabContentsWrapper* contents);
- // Overridden from NotificationObserver:
+ // Overridden from content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
FindBar* find_bar() const { return find_bar_.get(); }
@@ -72,7 +72,7 @@ class FindBarController : public NotificationObserver {
// Mac.
void MaybeSetPrepopulateText();
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
scoped_ptr<FindBar> find_bar_;
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index 3053366..a0966ec 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -584,7 +584,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
// Reload the tab and make sure Find window doesn't go away.
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(
+ content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->controller()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -1109,7 +1109,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, ActivateLinkNavigatesPage) {
// End the find session, click on the link.
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->controller()));
tab->find_tab_helper()->StopFinding(FindBarController::kActivateSelection);
observer.Wait();
}
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index d2eba07..3fff646 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -148,7 +148,7 @@ void FindTabHelper::HandleFindReply(int request_id,
final_update);
NotificationService::current()->Notify(
chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
- Source<TabContents>(tab_contents()),
- Details<FindNotificationDetails>(&last_search_result_));
+ content::Source<TabContents>(tab_contents()),
+ content::Details<FindNotificationDetails>(&last_search_result_));
}
}