Chromium Code Reviews| 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 0d99aaab1aa6c9256552044bdbcc1b7d1f82a4c1..29db9b0dd9f09f3e42944d6f005ed1d08015bb8c 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(); |
| @@ -84,11 +85,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: |
| + // Reloads the tabs in instant process to ensure that their privileged status |
|
samarth
2013/07/26 23:33:15
I would move this comment down to MaybeReload...
Anuj
2013/07/31 07:16:18
Done.
|
| + // is still valid. |
| + virtual void DefaultSearchProviderChanged() OVERRIDE; |
| + virtual void GoogleURLUpdated() OVERRIDE; |
| + |
| + void MaybeReloadInstantWebContents(); |
|
samarth
2013/07/26 23:33:15
How about ReloadTabsInInstantProcess();
Anuj
2013/07/31 07:16:18
Done.
|
| // Replaces the contents at tab |index| with |new_contents| and deletes the |
| // existing contents. |
| @@ -100,8 +103,6 @@ class BrowserInstantController : public SearchModelObserver { |
| InstantController instant_; |
| InstantUnloadHandler instant_unload_handler_; |
| - PrefChangeRegistrar profile_pref_registrar_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); |
| }; |