Index: chrome/browser/tab_contents/tab_contents.cc |
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc |
index 891249a79bcd04b57893b02161b5a0de9f16ab66..28153912df2dde7077b42a66dcc2aacfb976d0a0 100644 |
--- a/chrome/browser/tab_contents/tab_contents.cc |
+++ b/chrome/browser/tab_contents/tab_contents.cc |
@@ -319,6 +319,9 @@ TabContents::TabContents(Profile* profile, |
NotificationService::AllSources()); |
#endif |
+ registrar_.Add(this, NotificationType::USER_STYLE_SHEET_UPDATED, |
+ NotificationService::AllSources()); |
+ |
// Register for notifications about content setting changes. |
registrar_.Add(this, NotificationType::CONTENT_SETTINGS_CHANGED, |
NotificationService::AllSources()); |
@@ -2561,9 +2564,9 @@ GURL TabContents::GetAlternateErrorPageURL() const { |
} |
WebPreferences TabContents::GetWebkitPrefs() { |
- PrefService* prefs = render_view_host()->process()->profile()->GetPrefs(); |
+ Profile* profile = render_view_host()->process()->profile(); |
bool is_dom_ui = false; |
- return RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, is_dom_ui); |
+ return RenderViewHostDelegateHelper::GetWebkitPrefs(profile, is_dom_ui); |
} |
void TabContents::OnIgnoredUIEvent() { |
@@ -2779,6 +2782,10 @@ void TabContents::Observe(NotificationType type, |
} |
#endif |
+ case NotificationType::USER_STYLE_SHEET_UPDATED: |
+ UpdateWebPreferences(); |
+ break; |
+ |
case NotificationType::CONTENT_SETTINGS_CHANGED: { |
Details<HostContentSettingsMap::ContentSettingsDetails> |
settings_details(details); |