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

Unified Diff: chrome/browser/ui/search/search_tab_helper.h

Issue 73013002: [Clean up] Replace SearchTabHelper NAV_ENTRY_COMMITTED notification observer with WebContentsObserve (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android compile error Created 7 years, 1 month 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 | « no previous file | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_tab_helper.h
diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h
index fb4c54f7cbd79a52a7d8b762d5d7d3f474b1175f..9a6b31f71291bcd80881848023acbc8f489e8ff3 100644
--- a/chrome/browser/ui/search/search_tab_helper.h
+++ b/chrome/browser/ui/search/search_tab_helper.h
@@ -15,14 +15,13 @@
#include "chrome/browser/ui/search/search_model.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/ntp_logging_events.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "ui/base/window_open_disposition.h"
namespace content {
class WebContents;
+struct LoadCommittedDetails;
}
class GURL;
@@ -38,8 +37,7 @@ class SearchIPCRouterTest;
// support for the page. When a navigation entry is committed (except for
// in-page navigations), SearchTabHelper resets the instant support state to
// INSTANT_SUPPORT_UNKNOWN and cause support to be determined again.
-class SearchTabHelper : public content::NotificationObserver,
- public content::WebContentsObserver,
+class SearchTabHelper : public content::WebContentsObserver,
public content::WebContentsUserData<SearchTabHelper>,
public InstantServiceObserver,
public SearchIPCRouter::Delegate {
@@ -192,11 +190,6 @@ class SearchTabHelper : public content::NotificationObserver,
explicit SearchTabHelper(content::WebContents* web_contents);
- // Overridden from content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// Overridden from contents::WebContentsObserver:
virtual void RenderViewCreated(
content::RenderViewHost* render_view_host) OVERRIDE;
@@ -216,6 +209,8 @@ class SearchTabHelper : public content::NotificationObserver,
const GURL& validated_url,
bool is_main_frame,
content::RenderViewHost* render_view_host) OVERRIDE;
+ virtual void NavigationEntryCommitted(
+ const content::LoadCommittedDetails& load_details) OVERRIDE;
// Overridden from SearchIPCRouter::Delegate:
virtual void OnInstantSupportDetermined(bool supports_instant) OVERRIDE;
@@ -270,8 +265,6 @@ class SearchTabHelper : public content::NotificationObserver,
// Model object for UI that cares about search state.
SearchModel model_;
- content::NotificationRegistrar registrar_;
-
content::WebContents* web_contents_;
SearchIPCRouter ipc_router_;
« no previous file with comments | « no previous file | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698