summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc7
-rw-r--r--chrome/browser/tab_contents/tab_contents.h1
3 files changed, 10 insertions, 0 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 6132743..f0608bc 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -142,6 +142,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
prefs->GetBoolean(prefs::kWebKitDomPasteEnabled);
web_prefs.shrinks_standalone_images_to_fit =
prefs->GetBoolean(prefs::kWebKitShrinksStandaloneImagesToFit);
+ web_prefs.inspector_settings =
+ prefs->GetString(prefs::kWebKitInspectorSettings);
{ // Command line switches are used for preferences with no user interface.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index b0d5b71..db05c00 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -364,6 +364,8 @@ void TabContents::RegisterUserPrefs(PrefService* prefs) {
pref_defaults.shrinks_standalone_images_to_fit);
prefs->RegisterBooleanPref(prefs::kWebKitDeveloperExtrasEnabled,
pref_defaults.developer_extras_enabled);
+ prefs->RegisterStringPref(prefs::kWebKitInspectorSettings,
+ pref_defaults.inspector_settings);
prefs->RegisterBooleanPref(prefs::kWebKitTextAreasAreResizable,
pref_defaults.text_areas_are_resizable);
prefs->RegisterBooleanPref(prefs::kWebKitJavaEnabled,
@@ -1774,6 +1776,11 @@ void TabContents::UpdateThumbnail(const GURL& url,
}
}
+void TabContents::UpdateInspectorSettings(const std::wstring& raw_settings) {
+ profile()->GetPrefs()->SetString(prefs::kWebKitInspectorSettings,
+ raw_settings);
+}
+
void TabContents::Close(RenderViewHost* rvh) {
// Ignore this if it comes from a RenderViewHost that we aren't showing.
if (delegate() && rvh == render_view_host())
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 7e3a70f..c43a919 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -758,6 +758,7 @@ class TabContents : public PageNavigator,
virtual void UpdateThumbnail(const GURL& url,
const SkBitmap& bitmap,
const ThumbnailScore& score);
+ virtual void UpdateInspectorSettings(const std::wstring& raw_settings);
virtual void Close(RenderViewHost* render_view_host);
virtual void RequestMove(const gfx::Rect& new_bounds);
virtual void DidStartLoading(RenderViewHost* render_view_host);