| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/prefs/pref_change_registrar.h" | 10 #include "chrome/browser/prefs/pref_change_registrar.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 static void InitPerTabUserPrefStore(OverlayUserPrefStore* pref_store); | 28 static void InitPerTabUserPrefStore(OverlayUserPrefStore* pref_store); |
| 29 static void RegisterUserPrefs(PrefService* prefs); | 29 static void RegisterUserPrefs(PrefService* prefs); |
| 30 | 30 |
| 31 PrefService* per_tab_prefs() { return per_tab_prefs_.get(); } | 31 PrefService* per_tab_prefs() { return per_tab_prefs_.get(); } |
| 32 | 32 |
| 33 protected: | 33 protected: |
| 34 // Update the RenderView's WebPreferences. Exposed as protected for testing. | 34 // Update the RenderView's WebPreferences. Exposed as protected for testing. |
| 35 virtual void UpdateWebPreferences(); | 35 virtual void UpdateWebPreferences(); |
| 36 | 36 |
| 37 // content::WebContentsObserver overrides, exposed as protected for testing. | 37 // content::WebContentsObserver overrides, exposed as protected for testing. |
| 38 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; | 38 virtual void RenderViewCreated( |
| 39 content::RenderViewHost* render_view_host) OVERRIDE; |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 // content::WebContentsObserver overrides: | 42 // content::WebContentsObserver overrides: |
| 42 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; | 43 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; |
| 43 | 44 |
| 44 // content::NotificationObserver overrides: | 45 // content::NotificationObserver overrides: |
| 45 virtual void Observe(int type, | 46 virtual void Observe(int type, |
| 46 const content::NotificationSource& source, | 47 const content::NotificationSource& source, |
| 47 const content::NotificationDetails& details) OVERRIDE; | 48 const content::NotificationDetails& details) OVERRIDE; |
| 48 | 49 |
| 49 // Update the TabContents's RendererPreferences. | 50 // Update the TabContents's RendererPreferences. |
| 50 void UpdateRendererPreferences(); | 51 void UpdateRendererPreferences(); |
| 51 | 52 |
| 52 Profile* GetProfile(); | 53 Profile* GetProfile(); |
| 53 | 54 |
| 54 content::NotificationRegistrar registrar_; | 55 content::NotificationRegistrar registrar_; |
| 55 | 56 |
| 56 scoped_ptr<PrefService> per_tab_prefs_; | 57 scoped_ptr<PrefService> per_tab_prefs_; |
| 57 PrefChangeRegistrar pref_change_registrar_; | 58 PrefChangeRegistrar pref_change_registrar_; |
| 58 PrefChangeRegistrar per_tab_pref_change_registrar_; | 59 PrefChangeRegistrar per_tab_pref_change_registrar_; |
| 59 | 60 |
| 60 DISALLOW_COPY_AND_ASSIGN(PrefsTabHelper); | 61 DISALLOW_COPY_AND_ASSIGN(PrefsTabHelper); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 #endif // CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ | 64 #endif // CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ |
| OLD | NEW |