summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-01 18:17:53 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-01 18:17:53 +0000
commit3184f90bff4653bfb7a90ec4a1398559c4668247 (patch)
tree80e1db929000e7153d41e8101e4d0c3af08e696b /webkit/tools
parent09c38f53b7ad3cf529f51c32a997aa9fc24fb518 (diff)
downloadchromium_src-3184f90bff4653bfb7a90ec4a1398559c4668247.zip
chromium_src-3184f90bff4653bfb7a90ec4a1398559c4668247.tar.gz
chromium_src-3184f90bff4653bfb7a90ec4a1398559c4668247.tar.bz2
Move WebPreferences to root namespace
This is in preparation to using the IPC_STRUCT_XXX macros BUG=235200 TBR=darin@chromium.org,brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/14364006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/test_shell/test_shell.cc21
-rw-r--r--webkit/tools/test_shell/test_shell.h9
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm2
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc7
-rw-r--r--webkit/tools/test_shell/webview_host.h7
-rw-r--r--webkit/tools/test_shell/webview_host_gtk.cc4
-rw-r--r--webkit/tools/test_shell/webview_host_mac.mm4
-rw-r--r--webkit/tools/test_shell/webview_host_win.cc4
10 files changed, 27 insertions, 35 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 90df75e..40c7118 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -65,7 +65,6 @@ using WebKit::WebScriptController;
using WebKit::WebSize;
using WebKit::WebURLRequest;
using WebKit::WebView;
-using webkit_glue::WebPreferences;
namespace {
@@ -313,16 +312,16 @@ void TestShell::ResetWebPreferences() {
*web_prefs_ = WebPreferences();
#if defined(OS_MACOSX)
- web_prefs_->serif_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->serif_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Times");
- web_prefs_->cursive_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->cursive_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Apple Chancery");
- web_prefs_->fantasy_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->fantasy_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Papyrus");
#else
// NOTE: case matters here, this must be 'times new roman', else
// some layout tests fail.
- web_prefs_->serif_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->serif_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("times new roman");
// These two fonts are picked from the intersection of
@@ -335,16 +334,16 @@ void TestShell::ResetWebPreferences() {
// They (especially Impact for fantasy) are not typical cursive
// and fantasy fonts, but it should not matter for layout tests
// as long as they're available.
- web_prefs_->cursive_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->cursive_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Comic Sans MS");
- web_prefs_->fantasy_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->fantasy_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Impact");
#endif
- web_prefs_->standard_font_family_map[WebPreferences::kCommonScript] =
- web_prefs_->serif_font_family_map[WebPreferences::kCommonScript];
- web_prefs_->fixed_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->standard_font_family_map[webkit_glue::kCommonScript] =
+ web_prefs_->serif_font_family_map[webkit_glue::kCommonScript];
+ web_prefs_->fixed_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Courier");
- web_prefs_->sans_serif_font_family_map[WebPreferences::kCommonScript] =
+ web_prefs_->sans_serif_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Helvetica");
web_prefs_->default_encoding = "ISO-8859-1";
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index d2ee7a9..c48126f 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -31,10 +31,6 @@ class ScopedOleInitializer;
}
#endif
-namespace webkit_glue {
-struct WebPreferences;
-}
-
class GURL;
class TestNavigationEntry;
class TestNavigationController;
@@ -42,6 +38,7 @@ class TestNotificationPresenter;
class TestShellDevToolsAgent;
class TestShellDevToolsClient;
class TestWebViewDelegate;
+struct WebPreferences;
namespace WebKit {
class WebDeviceOrientationClientMock;
@@ -206,7 +203,7 @@ public:
static void SetAccelerated2dCanvasEnabled(bool enabled);
static void SetAcceleratedCompositingEnabled(bool enabled);
- static webkit_glue::WebPreferences* GetWebPreferences();
+ static WebPreferences* GetWebPreferences();
// Some layout tests hardcode a file:///tmp/LayoutTests URL. We get around
// this by substituting "tmp" with the path to the LayoutTests parent dir.
@@ -395,7 +392,7 @@ private:
bool allow_scripts_;
// The preferences for the test shell.
- static webkit_glue::WebPreferences* web_prefs_;
+ static WebPreferences* web_prefs_;
#if defined(OS_WIN)
// Used by the watchdog to know when it's finished.
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 50f1578..b949312 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -157,7 +157,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
layout_test_mode_ = layout_test_mode;
allow_external_pages_ = allow_external_pages;
- web_prefs_ = new webkit_glue::WebPreferences;
+ web_prefs_ = new WebPreferences;
base::FilePath data_path;
PathService::Get(base::DIR_EXE, &data_path);
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index 73aa907..d5757bd 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -206,7 +206,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
layout_test_mode_ = layout_test_mode;
allow_external_pages_ = allow_external_pages;
- web_prefs_ = new webkit_glue::WebPreferences;
+ web_prefs_ = new WebPreferences;
// mmap the data pack which holds strings used by WebCore. This is only
// a fatal error if we're bundled, which means we might be running layout
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index ecc1647..6ab9644 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -162,7 +162,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
layout_test_mode_ = layout_test_mode;
allow_external_pages_ = allow_external_pages;
- web_prefs_ = new webkit_glue::WebPreferences;
+ web_prefs_ = new WebPreferences;
ResetWebPreferences();
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 2814bb9..766ecc0 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -131,7 +131,6 @@ using WebKit::WebWindowFeatures;
using WebKit::WebWorker;
using WebKit::WebVector;
using WebKit::WebView;
-using webkit_glue::WebPreferences;
namespace {
@@ -201,20 +200,20 @@ std::string TestWebViewDelegate::GetResourceDescription(uint32 identifier) {
void TestWebViewDelegate::SetUserStyleSheetEnabled(bool is_enabled) {
WebPreferences* prefs = shell_->GetWebPreferences();
prefs->user_style_sheet_enabled = is_enabled;
- prefs->Apply(shell_->webView());
+ webkit_glue::ApplyWebPreferences(*prefs, shell_->webView());
}
void TestWebViewDelegate::SetUserStyleSheetLocation(const GURL& location) {
WebPreferences* prefs = shell_->GetWebPreferences();
prefs->user_style_sheet_enabled = true;
prefs->user_style_sheet_location = location;
- prefs->Apply(shell_->webView());
+ webkit_glue::ApplyWebPreferences(*prefs, shell_->webView());
}
void TestWebViewDelegate::SetAuthorAndUserStylesEnabled(bool is_enabled) {
WebPreferences* prefs = shell_->GetWebPreferences();
prefs->author_and_user_styles_enabled = is_enabled;
- prefs->Apply(shell_->webView());
+ webkit_glue::ApplyWebPreferences(*prefs, shell_->webView());
}
// WebViewClient -------------------------------------------------------------
diff --git a/webkit/tools/test_shell/webview_host.h b/webkit/tools/test_shell/webview_host.h
index 9a99f03..5f43a1c 100644
--- a/webkit/tools/test_shell/webview_host.h
+++ b/webkit/tools/test_shell/webview_host.h
@@ -14,11 +14,8 @@
#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
#endif
-namespace webkit_glue {
-struct WebPreferences;
-}
-
class TestWebViewDelegate;
+struct WebPreferences;
namespace WebKit {
class WebDevToolsAgentClient;
@@ -34,7 +31,7 @@ class WebViewHost : public WebWidgetHost {
static WebViewHost* Create(gfx::NativeView parent_view,
TestWebViewDelegate* delegate,
WebKit::WebDevToolsAgentClient* devtools_client,
- const webkit_glue::WebPreferences& prefs);
+ const WebPreferences& prefs);
WebKit::WebView* webview() const;
diff --git a/webkit/tools/test_shell/webview_host_gtk.cc b/webkit/tools/test_shell/webview_host_gtk.cc
index 117da89..8af556a 100644
--- a/webkit/tools/test_shell/webview_host_gtk.cc
+++ b/webkit/tools/test_shell/webview_host_gtk.cc
@@ -22,7 +22,7 @@ using WebKit::WebView;
WebViewHost* WebViewHost::Create(GtkWidget* parent_view,
TestWebViewDelegate* delegate,
WebDevToolsAgentClient* dev_tools_client,
- const webkit_glue::WebPreferences& prefs) {
+ const WebPreferences& prefs) {
WebViewHost* host = new WebViewHost();
host->view_ = WebWidgetHost::CreateWidget(parent_view, host);
@@ -30,7 +30,7 @@ WebViewHost* WebViewHost::Create(GtkWidget* parent_view,
host->webwidget_ = WebView::create(delegate);
host->webview()->setDevToolsAgentClient(dev_tools_client);
- prefs.Apply(host->webview());
+ webkit_glue::ApplyWebPreferences(prefs, host->webview());
host->webview()->settings()->setExperimentalCSSGridLayoutEnabled(true);
host->webview()->initializeMainFrame(delegate);
host->webwidget_->layout();
diff --git a/webkit/tools/test_shell/webview_host_mac.mm b/webkit/tools/test_shell/webview_host_mac.mm
index 8b9156f..57bb1ca 100644
--- a/webkit/tools/test_shell/webview_host_mac.mm
+++ b/webkit/tools/test_shell/webview_host_mac.mm
@@ -25,7 +25,7 @@ using WebKit::WebView;
WebViewHost* WebViewHost::Create(NSView* parent_view,
TestWebViewDelegate* delegate,
WebDevToolsAgentClient* dev_tools_client,
- const webkit_glue::WebPreferences& prefs) {
+ const WebPreferences& prefs) {
WebViewHost* host = new WebViewHost();
NSRect content_rect = [parent_view frame];
@@ -42,7 +42,7 @@ WebViewHost* WebViewHost::Create(NSView* parent_view,
host->webwidget_ = WebView::create(delegate);
host->webview()->setDevToolsAgentClient(dev_tools_client);
- prefs.Apply(host->webview());
+ webkit_glue::ApplyWebPreferences(prefs, host->webview());
host->webview()->settings()->setExperimentalCSSGridLayoutEnabled(true);
host->webview()->initializeMainFrame(delegate);
host->webwidget_->resize(WebSize(NSWidth(content_rect),
diff --git a/webkit/tools/test_shell/webview_host_win.cc b/webkit/tools/test_shell/webview_host_win.cc
index c911b2d..85ea5fa 100644
--- a/webkit/tools/test_shell/webview_host_win.cc
+++ b/webkit/tools/test_shell/webview_host_win.cc
@@ -20,7 +20,7 @@ static const wchar_t kWindowClassName[] = L"WebViewHost";
WebViewHost* WebViewHost::Create(HWND parent_view,
TestWebViewDelegate* delegate,
WebDevToolsAgentClient* dev_tools_client,
- const webkit_glue::WebPreferences& prefs) {
+ const WebPreferences& prefs) {
WebViewHost* host = new WebViewHost();
static bool registered_class = false;
@@ -44,7 +44,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view,
host->webwidget_ = WebView::create(delegate);
host->webview()->setDevToolsAgentClient(dev_tools_client);
- prefs.Apply(host->webview());
+ webkit_glue::ApplyWebPreferences(prefs, host->webview());
host->webview()->settings()->setExperimentalCSSGridLayoutEnabled(true);
host->webview()->initializeMainFrame(delegate);