summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc8
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 79b2fa1..977674d 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -193,9 +193,13 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
web_prefs.show_composited_layer_borders =
command_line.HasSwitch(switches::kShowCompositedLayerBorders);
- web_prefs.user_style_sheet_enabled = true;
- web_prefs.user_style_sheet_location =
+ web_prefs.user_style_sheet_enabled =
+ command_line.HasSwitch(switches::kEnableUserStyleSheet);
+ if (web_prefs.user_style_sheet_enabled) {
+ web_prefs.user_style_sheet_location =
profile->GetUserStyleSheetWatcher()->user_style_sheet();
+ }
+
}
web_prefs.uses_universal_detector =
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 8e95e65..260df1b 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -316,6 +316,9 @@ const char kEnableSyncTypedUrls[] = "enable-sync-typed-urls";
// enabled or not.
const char kEnableUserDataDirProfiles[] = "enable-udd-profiles";
+// Enable user style sheet (read from User Style Sheet in the profile dir).
+const char kEnableUserStyleSheet[] = "enable-user-stylesheet";
+
// Enables the option to show tabs as a vertical stack down the side of the
// browser window.
const char kEnableVerticalTabs[] = "enable-vertical-tabs";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index e2383ca..3b541b9 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -106,6 +106,7 @@ extern const char kEnableSyncPreferences[];
extern const char kEnableSyncThemes[];
extern const char kEnableSyncTypedUrls[];
extern const char kEnableUserDataDirProfiles[];
+extern const char kEnableUserStyleSheet[];
extern const char kEnableVerticalTabs[];
extern const char kEnableVideoLayering[];
extern const char kEnableVideoLogging[];