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

Unified Diff: chrome/browser/ui/browser_instant_controller.h

Issue 20388003: Reload Instant NTP and Instant-process tabs on search url change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed InstantNTPPrerendererTest Created 7 years, 3 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/ui/OWNERS ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_instant_controller.h
diff --git a/chrome/browser/ui/browser_instant_controller.h b/chrome/browser/ui/browser_instant_controller.h
index 66598ef3b9f4aa1d99893fb550ce5747edfd5dc7..a187a8c0fe0537f084601874a55b9559f48cb57c 100644
--- a/chrome/browser/ui/browser_instant_controller.h
+++ b/chrome/browser/ui/browser_instant_controller.h
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/prefs/pref_change_registrar.h"
+#include "chrome/browser/search/instant_service_observer.h"
#include "chrome/browser/ui/search/instant_controller.h"
#include "chrome/browser/ui/search/instant_unload_handler.h"
#include "chrome/browser/ui/search/search_model_observer.h"
@@ -27,7 +27,8 @@ namespace gfx {
class Rect;
}
-class BrowserInstantController : public SearchModelObserver {
+class BrowserInstantController : public SearchModelObserver,
+ public InstantServiceObserver {
public:
explicit BrowserInstantController(Browser* browser);
virtual ~BrowserInstantController();
@@ -91,11 +92,13 @@ class BrowserInstantController : public SearchModelObserver {
virtual void ModelChanged(const SearchModel::State& old_state,
const SearchModel::State& new_state) OVERRIDE;
- // Called when the default search provider changes. Revokes the searchbox API
- // privileges for any existing WebContents (that belong to the erstwhile
- // default search provider) by simply reloading all such WebContents. This
- // ensures that they are reloaded in a non-privileged renderer process.
- void OnDefaultSearchProviderChanged(const std::string& pref_name);
+ // Overridden from InstantServiceObserver:
+ virtual void DefaultSearchProviderChanged() OVERRIDE;
+ virtual void GoogleURLUpdated() OVERRIDE;
+
+ // Reloads the tabs in instant process to ensure that their privileged status
+ // is still valid.
+ void ReloadTabsInInstantProcess();
// Replaces the contents at tab |index| with |new_contents| and deletes the
// existing contents.
@@ -107,8 +110,6 @@ class BrowserInstantController : public SearchModelObserver {
InstantController instant_;
InstantUnloadHandler instant_unload_handler_;
- PrefChangeRegistrar profile_pref_registrar_;
-
DISALLOW_COPY_AND_ASSIGN(BrowserInstantController);
};
« no previous file with comments | « chrome/browser/ui/OWNERS ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698