diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-17 23:00:59 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-17 23:00:59 +0000 |
commit | 2fab253a61e797b461b21671af7942521b749ee3 (patch) | |
tree | 6d61d2cbf0dd13956924fd7323a3c7506422dadd /webkit/tools/test_shell/test_webview_delegate.cc | |
parent | 5220e732b9c11a4309c6f5a45a27d4658087b1ed (diff) | |
download | chromium_src-2fab253a61e797b461b21671af7942521b749ee3.zip chromium_src-2fab253a61e797b461b21671af7942521b749ee3.tar.gz chromium_src-2fab253a61e797b461b21671af7942521b749ee3.tar.bz2 |
Remove webview's dependency on webpreferences.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/165513
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_webview_delegate.cc')
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index dbd199b..2836a5f 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -27,6 +27,7 @@ #include "webkit/api/public/WebFrame.h" #include "webkit/api/public/WebKit.h" #include "webkit/api/public/WebScreenInfo.h" +#include "webkit/api/public/WebSettings.h" #include "webkit/api/public/WebString.h" #include "webkit/api/public/WebURL.h" #include "webkit/api/public/WebURLError.h" @@ -805,16 +806,16 @@ int TestWebViewDelegate::GetHistoryForwardListCount() { } void TestWebViewDelegate::SetUserStyleSheetEnabled(bool is_enabled) { - WebPreferences* prefs = shell_->GetWebPreferences(); - prefs->user_style_sheet_enabled = is_enabled; - shell_->webView()->SetPreferences(*prefs); + // Disabling/enabling this is really just setting it to an empty URL or + // setting it to something else. From this location in the code, there's + // no way to know what it's supposed to be. Luckily, right now, this is only + // used to disable the user style sheet. + DCHECK(!is_enabled); + shell_->webView()->GetSettings()->setUserStyleSheetLocation(WebURL()); } void TestWebViewDelegate::SetUserStyleSheetLocation(const GURL& location) { - WebPreferences* prefs = shell_->GetWebPreferences(); - prefs->user_style_sheet_enabled = true; - prefs->user_style_sheet_location = location; - shell_->webView()->SetPreferences(*prefs); + shell_->webView()->GetSettings()->setUserStyleSheetLocation(location); } // WebWidgetDelegate --------------------------------------------------------- |