summaryrefslogtreecommitdiffstats
path: root/content
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 /content
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 'content')
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.cc3
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.h5
-rw-r--r--content/browser/renderer_host/render_view_host_delegate.cc4
-rw-r--r--content/browser/renderer_host/render_view_host_delegate.h5
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc5
-rw-r--r--content/browser/renderer_host/render_view_host_impl.h4
-rw-r--r--content/browser/web_contents/interstitial_page_impl.cc4
-rw-r--r--content/browser/web_contents/interstitial_page_impl.h2
-rw-r--r--content/browser/web_contents/web_contents_impl.cc2
-rw-r--r--content/browser/web_contents/web_contents_impl.h4
-rw-r--r--content/common/view_messages.h4
-rw-r--r--content/public/browser/content_browser_client.h7
-rw-r--r--content/public/browser/render_view_host.h10
-rw-r--r--content/public/common/common_param_traits_macros.h4
-rw-r--r--content/public/renderer/render_view.h8
-rw-r--r--content/public/test/render_view_test.cc2
-rw-r--r--content/public/test/web_contents_tester.h5
-rw-r--r--content/renderer/pepper/pepper_plugin_delegate_impl.cc2
-rw-r--r--content/renderer/render_view_browsertest_mac.mm3
-rw-r--r--content/renderer/render_view_impl.cc7
-rw-r--r--content/renderer/render_view_impl.h13
-rw-r--r--content/renderer/render_view_impl_params.cc2
-rw-r--r--content/renderer/render_view_impl_params.h10
-rw-r--r--content/shell/shell_content_browser_client.cc2
-rw-r--r--content/shell/shell_content_browser_client.h2
-rw-r--r--content/shell/shell_messages.h2
-rw-r--r--content/shell/webkit_test_controller.cc11
-rw-r--r--content/shell/webkit_test_controller.h6
-rw-r--r--content/shell/webkit_test_helpers.cc34
-rw-r--r--content/shell/webkit_test_helpers.h10
-rw-r--r--content/shell/webkit_test_runner.cc5
-rw-r--r--content/test/test_web_contents.cc2
-rw-r--r--content/test/test_web_contents.h2
33 files changed, 79 insertions, 112 deletions
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index e6fc470..5863e22 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -535,8 +535,7 @@ void GpuDataManagerImpl::AppendPluginCommandLine(
#endif
}
-void GpuDataManagerImpl::UpdateRendererWebPrefs(
- webkit_glue::WebPreferences* prefs) const {
+void GpuDataManagerImpl::UpdateRendererWebPrefs(WebPreferences* prefs) const {
DCHECK(prefs);
if (IsFeatureBlacklisted(GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING))
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 0bca69b..34462ff 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -33,10 +33,7 @@
class CommandLine;
class GURL;
-
-namespace webkit_glue {
struct WebPreferences;
-};
namespace content {
@@ -115,7 +112,7 @@ class CONTENT_EXPORT GpuDataManagerImpl
void AppendPluginCommandLine(CommandLine* command_line) const;
// Update WebPreferences for renderer based on blacklisting decisions.
- void UpdateRendererWebPrefs(webkit_glue::WebPreferences* prefs) const;
+ void UpdateRendererWebPrefs(WebPreferences* prefs) const;
GpuSwitchingOption GetGpuSwitchingOption() const;
diff --git a/content/browser/renderer_host/render_view_host_delegate.cc b/content/browser/renderer_host/render_view_host_delegate.cc
index 0d7c523..ddd381f 100644
--- a/content/browser/renderer_host/render_view_host_delegate.cc
+++ b/content/browser/renderer_host/render_view_host_delegate.cc
@@ -37,8 +37,8 @@ WebContents* RenderViewHostDelegate::GetAsWebContents() {
return NULL;
}
-webkit_glue::WebPreferences RenderViewHostDelegate::GetWebkitPrefs() {
- return webkit_glue::WebPreferences();
+WebPreferences RenderViewHostDelegate::GetWebkitPrefs() {
+ return WebPreferences();
}
bool RenderViewHostDelegate::IsFullscreenForCurrentTab() const {
diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h
index e15af3d..f2be7e1 100644
--- a/content/browser/renderer_host/render_view_host_delegate.h
+++ b/content/browser/renderer_host/render_view_host_delegate.h
@@ -27,10 +27,7 @@ struct ViewHostMsg_CreateWindow_Params;
struct ViewHostMsg_DidFailProvisionalLoadWithError_Params;
struct ViewHostMsg_FrameNavigate_Params;
struct ViewMsg_PostMessage_Params;
-
-namespace webkit_glue {
struct WebPreferences;
-}
namespace base {
class ListValue;
@@ -278,7 +275,7 @@ class CONTENT_EXPORT RenderViewHostDelegate {
// Returns a WebPreferences object that will be used by the renderer
// associated with the owning render view host.
- virtual webkit_glue::WebPreferences GetWebkitPrefs();
+ virtual WebPreferences GetWebkitPrefs();
// Notification the user has made a gesture while focus was on the
// page. This is used to avoid uninitiated user downloads (aka carpet
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 3190b7d..8424da9 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1745,7 +1745,7 @@ void RenderViewHostImpl::ExitFullscreen() {
WasResized();
}
-webkit_glue::WebPreferences RenderViewHostImpl::GetWebkitPreferences() {
+WebPreferences RenderViewHostImpl::GetWebkitPreferences() {
return delegate_->GetWebkitPrefs();
}
@@ -1771,8 +1771,7 @@ void RenderViewHostImpl::SetAccessibilityOtherCallbackForTesting(
accessibility_other_callback_ = callback;
}
-void RenderViewHostImpl::UpdateWebkitPreferences(
- const webkit_glue::WebPreferences& prefs) {
+void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) {
Send(new ViewMsg_UpdateWebPreferences(GetRoutingID(), prefs));
}
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index ec1dc69..baa4b2e 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -204,9 +204,9 @@ class CONTENT_EXPORT RenderViewHostImpl
virtual void Zoom(PageZoom zoom) OVERRIDE;
virtual void SyncRendererPrefs() OVERRIDE;
virtual void ToggleSpeechInput() OVERRIDE;
- virtual webkit_glue::WebPreferences GetWebkitPreferences() OVERRIDE;
+ virtual WebPreferences GetWebkitPreferences() OVERRIDE;
virtual void UpdateWebkitPreferences(
- const webkit_glue::WebPreferences& prefs) OVERRIDE;
+ const WebPreferences& prefs) OVERRIDE;
virtual void NotifyTimezoneChange() OVERRIDE;
#if defined(OS_ANDROID)
diff --git a/content/browser/web_contents/interstitial_page_impl.cc b/content/browser/web_contents/interstitial_page_impl.cc
index 0a5fa03..33743c6 100644
--- a/content/browser/web_contents/interstitial_page_impl.cc
+++ b/content/browser/web_contents/interstitial_page_impl.cc
@@ -451,9 +451,9 @@ RendererPreferences InterstitialPageImpl::GetRendererPrefs(
return renderer_preferences_;
}
-webkit_glue::WebPreferences InterstitialPageImpl::GetWebkitPrefs() {
+WebPreferences InterstitialPageImpl::GetWebkitPrefs() {
if (!enabled())
- return webkit_glue::WebPreferences();
+ return WebPreferences();
return WebContentsImpl::GetWebkitPrefs(render_view_host_, url_);
}
diff --git a/content/browser/web_contents/interstitial_page_impl.h b/content/browser/web_contents/interstitial_page_impl.h
index 648a233..2b3108a 100644
--- a/content/browser/web_contents/interstitial_page_impl.h
+++ b/content/browser/web_contents/interstitial_page_impl.h
@@ -104,7 +104,7 @@ class CONTENT_EXPORT InterstitialPageImpl
base::i18n::TextDirection title_direction) OVERRIDE;
virtual RendererPreferences GetRendererPrefs(
BrowserContext* browser_context) const OVERRIDE;
- virtual webkit_glue::WebPreferences GetWebkitPrefs() OVERRIDE;
+ virtual WebPreferences GetWebkitPrefs() OVERRIDE;
virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE;
virtual void CreateNewWindow(
int route_id,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 798ce04..721f137 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -141,8 +141,6 @@
// the user goes back. The process only stays live if another tab is using
// it, but if so, the existing frame relationships will be maintained.
-using webkit_glue::WebPreferences;
-
namespace content {
namespace {
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index c87aff2..dd40577 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -91,7 +91,7 @@ class CONTENT_EXPORT WebContentsImpl
int guest_instance_id);
// Returns the content specific prefs for the given RVH.
- static webkit_glue::WebPreferences GetWebkitPrefs(
+ static WebPreferences GetWebkitPrefs(
RenderViewHost* rvh, const GURL& url);
// Creates a swapped out RenderView. This is used by the browser plugin to
@@ -370,7 +370,7 @@ class CONTENT_EXPORT WebContentsImpl
const string16& source_id) OVERRIDE;
virtual RendererPreferences GetRendererPrefs(
BrowserContext* browser_context) const OVERRIDE;
- virtual webkit_glue::WebPreferences GetWebkitPrefs() OVERRIDE;
+ virtual WebPreferences GetWebkitPrefs() OVERRIDE;
virtual void OnUserGesture() OVERRIDE;
virtual void OnIgnoredUIEvent() OVERRIDE;
virtual void RendererUnresponsive(RenderViewHost* render_view_host,
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index adc35cf..4e5ebc5 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -647,7 +647,7 @@ IPC_STRUCT_BEGIN(ViewMsg_New_Params)
IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
// Preferences for this view.
- IPC_STRUCT_MEMBER(webkit_glue::WebPreferences, web_preferences)
+ IPC_STRUCT_MEMBER(WebPreferences, web_preferences)
// The ID of the view to be created.
IPC_STRUCT_MEMBER(int32, view_id)
@@ -793,7 +793,7 @@ IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
// This passes a set of webkit preferences down to the renderer.
IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
- webkit_glue::WebPreferences)
+ WebPreferences)
// Informs the renderer that the timezone has changed.
IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange)
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 5047f645..a226872 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -30,6 +30,7 @@
class CommandLine;
class GURL;
+struct WebPreferences;
namespace base {
class FilePath;
@@ -66,10 +67,6 @@ namespace fileapi {
class FileSystemMountPointProvider;
}
-namespace webkit_glue {
-struct WebPreferences;
-}
-
namespace content {
class AccessTokenStore;
@@ -444,7 +441,7 @@ class CONTENT_EXPORT ContentBrowserClient {
// to the embedder to update it if it wants.
virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host,
const GURL& url,
- webkit_glue::WebPreferences* prefs) {}
+ WebPreferences* prefs) {}
// Inspector setting was changed and should be persisted.
virtual void UpdateInspectorSetting(RenderViewHost* rvh,
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index 9d5332a..e59f5bc 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -14,6 +14,7 @@
class GURL;
struct WebDropData;
+struct WebPreferences;
namespace gfx {
class Point;
@@ -34,10 +35,6 @@ struct WebMediaPlayerAction;
struct WebPluginAction;
}
-namespace webkit_glue {
-struct WebPreferences;
-}
-
namespace content {
class ChildProcessSecurityPolicy;
@@ -273,11 +270,10 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost {
virtual void ToggleSpeechInput() = 0;
// Returns the current WebKit preferences.
- virtual webkit_glue::WebPreferences GetWebkitPreferences() = 0;
+ virtual WebPreferences GetWebkitPreferences() = 0;
// Passes a list of Webkit preferences to the renderer.
- virtual void UpdateWebkitPreferences(
- const webkit_glue::WebPreferences& prefs) = 0;
+ virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0;
// Informs the renderer process of a change in timezone.
virtual void NotifyTimezoneChange() = 0;
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h
index f69e19e..306d8b7 100644
--- a/content/public/common/common_param_traits_macros.h
+++ b/content/public/common/common_param_traits_macros.h
@@ -31,7 +31,7 @@ IPC_ENUM_TRAITS(content::PageTransition)
IPC_ENUM_TRAITS(content::SecurityStyle)
IPC_ENUM_TRAITS(WebKit::WebReferrerPolicy)
IPC_ENUM_TRAITS(WindowOpenDisposition)
-IPC_ENUM_TRAITS(webkit_glue::WebPreferences::EditingBehavior)
+IPC_ENUM_TRAITS(webkit_glue::EditingBehavior)
IPC_ENUM_TRAITS(content::PasswordForm::Type)
IPC_ENUM_TRAITS(net::RequestPriority)
@@ -93,7 +93,7 @@ IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginInfo)
IPC_STRUCT_TRAITS_MEMBER(pepper_permissions)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebPreferences)
+IPC_STRUCT_TRAITS_BEGIN(WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(standard_font_family_map)
IPC_STRUCT_TRAITS_MEMBER(fixed_font_family_map)
IPC_STRUCT_TRAITS_MEMBER(serif_font_family_map)
diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h
index 44dc636..8024f49 100644
--- a/content/public/renderer/render_view.h
+++ b/content/public/renderer/render_view.h
@@ -15,10 +15,7 @@
#include "ui/gfx/native_widget_types.h"
class SkPicture;
-
-namespace webkit_glue {
struct WebPreferences;
-}
namespace WebKit {
class WebFrame;
@@ -73,12 +70,11 @@ class CONTENT_EXPORT RenderView : public IPC::Sender {
virtual gfx::Size GetSize() const = 0;
// Gets WebKit related preferences associated with this view.
- virtual webkit_glue::WebPreferences& GetWebkitPreferences() = 0;
+ virtual WebPreferences& GetWebkitPreferences() = 0;
// Overrides the WebKit related preferences associated with this view. Note
// that the browser process may update the preferences at any time.
- virtual void SetWebkitPreferences(
- const webkit_glue::WebPreferences& preferences) = 0;
+ virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0;
// Returns the associated WebView. May return NULL when the view is closing.
virtual WebKit::WebView* GetWebView() = 0;
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index 0146074..8b575d0 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -167,7 +167,7 @@ void RenderViewTest::SetUp() {
RenderViewImpl* view = RenderViewImpl::Create(
kOpenerId,
RendererPreferences(),
- webkit_glue::WebPreferences(),
+ WebPreferences(),
new SharedRenderViewCounter(0),
kRouteId,
kSurfaceId,
diff --git a/content/public/test/web_contents_tester.h b/content/public/test/web_contents_tester.h
index d6a1f7a..8b0734a 100644
--- a/content/public/test/web_contents_tester.h
+++ b/content/public/test/web_contents_tester.h
@@ -8,10 +8,7 @@
#include "content/public/common/page_transition_types.h"
class GURL;
-
-namespace webkit_glue {
struct WebPreferences;
-}
namespace content {
@@ -91,7 +88,7 @@ class WebContentsTester {
PageTransition transition) = 0;
// Promote GetWebkitPrefs to public.
- virtual webkit_glue::WebPreferences TestGetWebkitPrefs() = 0;
+ virtual WebPreferences TestGetWebkitPrefs() = 0;
};
} // namespace content
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index ecde1fa..6abd88b 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -842,7 +842,7 @@ webkit::ppapi::PluginDelegate::PlatformContext3D*
// If accelerated compositing of plugins is disabled, fail to create a 3D
// context, because it won't be visible. This allows graceful fallback in the
// modules.
- const webkit_glue::WebPreferences& prefs = render_view_->webkit_preferences();
+ const WebPreferences& prefs = render_view_->webkit_preferences();
if (!prefs.accelerated_compositing_for_plugins_enabled)
return NULL;
return new PlatformContext3DImpl;
diff --git a/content/renderer/render_view_browsertest_mac.mm b/content/renderer/render_view_browsertest_mac.mm
index ed9908a..ab4af5d 100644
--- a/content/renderer/render_view_browsertest_mac.mm
+++ b/content/renderer/render_view_browsertest_mac.mm
@@ -8,6 +8,7 @@
#include "content/public/test/render_view_test.h"
#include "content/renderer/render_view_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webkit/glue/webpreferences.h"
#include <Cocoa/Cocoa.h>
#include <Carbon/Carbon.h> // for the kVK_* constants.
@@ -83,7 +84,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) {
);
#undef HTML
- webkit_glue::WebPreferences prefs;
+ WebPreferences prefs;
prefs.enable_scroll_animator = false;
RenderViewImpl* view = static_cast<RenderViewImpl*>(view_);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 591696b..580b548 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -327,7 +327,6 @@ using base::TimeDelta;
using webkit_glue::AltErrorPageResourceFetcher;
using webkit_glue::ResourceFetcher;
-using webkit_glue::WebPreferences;
using webkit_glue::WebURLResponseExtraDataImpl;
#if defined(OS_ANDROID)
@@ -741,7 +740,7 @@ void RenderViewImpl::Initialize(RenderViewImplParams* params) {
webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled(
ShouldUseFixedPositionCompositing(device_scale_factor_));
- webkit_preferences_.Apply(webview());
+ webkit_glue::ApplyWebPreferences(webkit_preferences_, webview());
webview()->initializeMainFrame(this);
if (switches::IsTouchDragDropEnabled())
@@ -1977,7 +1976,7 @@ WebView* RenderViewImpl::createView(
WebUserGestureIndicator::consumeUserGesture();
- webkit_glue::WebPreferences transferred_preferences = webkit_preferences_;
+ WebPreferences transferred_preferences = webkit_preferences_;
// Unless accelerated compositing has been explicitly disabled from the
// command line (e.g. via the blacklist or about:flags) re-enable it for
@@ -5200,7 +5199,7 @@ void RenderViewImpl::OnDragSourceSystemDragEnded() {
void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
webkit_preferences_ = prefs;
- webkit_preferences_.Apply(webview());
+ webkit_glue::ApplyWebPreferences(webkit_preferences_, webview());
}
void RenderViewImpl::OnUpdateTimezone() {
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index aeb29a3..bdfe77e 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -211,7 +211,7 @@ class CONTENT_EXPORT RenderViewImpl
static RenderViewImpl* Create(
int32 opener_id,
const RendererPreferences& renderer_prefs,
- const webkit_glue::WebPreferences& webkit_prefs,
+ const WebPreferences& webkit_prefs,
SharedRenderViewCounter* counter,
int32 routing_id,
int32 surface_id,
@@ -240,7 +240,7 @@ class CONTENT_EXPORT RenderViewImpl
int history_list_offset() const { return history_list_offset_; }
- const webkit_glue::WebPreferences& webkit_preferences() const {
+ const WebPreferences& webkit_preferences() const {
return webkit_preferences_;
}
@@ -690,9 +690,8 @@ class CONTENT_EXPORT RenderViewImpl
virtual int GetRoutingID() const OVERRIDE;
virtual int GetPageId() const OVERRIDE;
virtual gfx::Size GetSize() const OVERRIDE;
- virtual webkit_glue::WebPreferences& GetWebkitPreferences() OVERRIDE;
- virtual void SetWebkitPreferences(
- const webkit_glue::WebPreferences& preferences) OVERRIDE;
+ virtual WebPreferences& GetWebkitPreferences() OVERRIDE;
+ virtual void SetWebkitPreferences(const WebPreferences& preferences) OVERRIDE;
virtual WebKit::WebView* GetWebView() OVERRIDE;
virtual WebKit::WebNode GetFocusedNode() const OVERRIDE;
virtual WebKit::WebNode GetContextMenuNode() const OVERRIDE;
@@ -1028,7 +1027,7 @@ class CONTENT_EXPORT RenderViewImpl
void OnThemeChanged();
void OnUpdateTargetURLAck();
void OnUpdateTimezone();
- void OnUpdateWebPreferences(const webkit_glue::WebPreferences& prefs);
+ void OnUpdateWebPreferences(const WebPreferences& prefs);
void OnZoom(PageZoom zoom);
void OnZoomFactor(PageZoom zoom, int zoom_center_x, int zoom_center_y);
@@ -1187,7 +1186,7 @@ class CONTENT_EXPORT RenderViewImpl
// Settings ------------------------------------------------------------------
- webkit_glue::WebPreferences webkit_preferences_;
+ WebPreferences webkit_preferences_;
RendererPreferences renderer_preferences_;
HostZoomLevels host_zoom_levels_;
diff --git a/content/renderer/render_view_impl_params.cc b/content/renderer/render_view_impl_params.cc
index 5035b35..521778b 100644
--- a/content/renderer/render_view_impl_params.cc
+++ b/content/renderer/render_view_impl_params.cc
@@ -9,7 +9,7 @@ namespace content {
RenderViewImplParams::RenderViewImplParams(
int32 opener_id,
const RendererPreferences& renderer_prefs,
- const webkit_glue::WebPreferences& webkit_prefs,
+ const WebPreferences& webkit_prefs,
SharedRenderViewCounter* counter,
int32 routing_id,
int32 surface_id,
diff --git a/content/renderer/render_view_impl_params.h b/content/renderer/render_view_impl_params.h
index 7288ab1..da29fea 100644
--- a/content/renderer/render_view_impl_params.h
+++ b/content/renderer/render_view_impl_params.h
@@ -11,14 +11,12 @@
#include "content/common/content_export.h"
#include "content/common/view_message_enums.h"
+struct WebPreferences;
+
namespace WebKit {
struct WebScreenInfo;
}
-namespace webkit_glue {
-struct WebPreferences;
-}
-
namespace content {
struct RendererPreferences;
@@ -28,7 +26,7 @@ typedef base::RefCountedData<int> SharedRenderViewCounter;
struct CONTENT_EXPORT RenderViewImplParams {
RenderViewImplParams(int32 opener_id,
const RendererPreferences& renderer_prefs,
- const webkit_glue::WebPreferences& webkit_prefs,
+ const WebPreferences& webkit_prefs,
SharedRenderViewCounter* counter,
int32 routing_id,
int32 surface_id,
@@ -44,7 +42,7 @@ struct CONTENT_EXPORT RenderViewImplParams {
int32 opener_id;
const RendererPreferences& renderer_prefs;
- const webkit_glue::WebPreferences& webkit_prefs;
+ const WebPreferences& webkit_prefs;
SharedRenderViewCounter* counter;
int32 routing_id;
int32 surface_id;
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index 3737e538..eb50c57 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -121,7 +121,7 @@ void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
void ShellContentBrowserClient::OverrideWebkitPrefs(
RenderViewHost* render_view_host,
const GURL& url,
- webkit_glue::WebPreferences* prefs) {
+ WebPreferences* prefs) {
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
return;
WebKitTestController::Get()->OverrideWebkitPrefs(prefs);
diff --git a/content/shell/shell_content_browser_client.h b/content/shell/shell_content_browser_client.h
index 44431b9..0adba6f 100644
--- a/content/shell/shell_content_browser_client.h
+++ b/content/shell/shell_content_browser_client.h
@@ -46,7 +46,7 @@ class ShellContentBrowserClient : public ContentBrowserClient,
int child_process_id) OVERRIDE;
virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host,
const GURL& url,
- webkit_glue::WebPreferences* prefs) OVERRIDE;
+ WebPreferences* prefs) OVERRIDE;
virtual void ResourceDispatcherHostCreated() OVERRIDE;
virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
virtual std::string GetDefaultDownloadName() OVERRIDE;
diff --git a/content/shell/shell_messages.h b/content/shell/shell_messages.h
index da5b96c..dde2dda 100644
--- a/content/shell/shell_messages.h
+++ b/content/shell/shell_messages.h
@@ -75,7 +75,7 @@ IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinishedInSecondaryWindow)
// WebTestDelegate related.
IPC_MESSAGE_ROUTED1(ShellViewHostMsg_OverridePreferences,
- webkit_glue::WebPreferences /* preferences */)
+ WebPreferences /* preferences */)
IPC_SYNC_MESSAGE_ROUTED1_1(ShellViewHostMsg_RegisterIsolatedFileSystem,
std::vector<base::FilePath> /* absolute_filenames */,
std::string /* filesystem_id */)
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc
index 7af5ef8..bf7e24c 100644
--- a/content/shell/webkit_test_controller.cc
+++ b/content/shell/webkit_test_controller.cc
@@ -235,8 +235,7 @@ bool WebKitTestController::PrepareForLayoutTest(
main_window_->web_contents()->GetRenderViewHost()->WasResized();
RenderViewHost* render_view_host =
main_window_->web_contents()->GetRenderViewHost();
- webkit_glue::WebPreferences prefs =
- render_view_host->GetWebkitPreferences();
+ WebPreferences prefs = render_view_host->GetWebkitPreferences();
OverrideWebkitPrefs(&prefs);
render_view_host->UpdateWebkitPreferences(prefs);
SendTestConfiguration();
@@ -271,7 +270,7 @@ bool WebKitTestController::ResetAfterLayoutTest() {
enable_pixel_dumping_ = false;
expected_pixel_hash_.clear();
test_url_ = GURL();
- prefs_ = webkit_glue::WebPreferences();
+ prefs_ = WebPreferences();
should_override_prefs_ = false;
watchdog_.Cancel();
return true;
@@ -286,8 +285,7 @@ void WebKitTestController::RendererUnresponsive() {
LOG(WARNING) << "renderer unresponsive";
}
-void WebKitTestController::OverrideWebkitPrefs(
- webkit_glue::WebPreferences* prefs) {
+void WebKitTestController::OverrideWebkitPrefs(WebPreferences* prefs) {
if (should_override_prefs_) {
*prefs = prefs_;
} else {
@@ -533,8 +531,7 @@ void WebKitTestController::OnPrintMessage(const std::string& message) {
printer_->AddMessageRaw(message);
}
-void WebKitTestController::OnOverridePreferences(
- const webkit_glue::WebPreferences& prefs) {
+void WebKitTestController::OnOverridePreferences(const WebPreferences& prefs) {
should_override_prefs_ = true;
prefs_ = prefs;
}
diff --git a/content/shell/webkit_test_controller.h b/content/shell/webkit_test_controller.h
index 7e1fee7..f2e626e 100644
--- a/content/shell/webkit_test_controller.h
+++ b/content/shell/webkit_test_controller.h
@@ -92,7 +92,7 @@ class WebKitTestController : public base::NonThreadSafe,
void SetTempPath(const base::FilePath& temp_path);
void RendererUnresponsive();
- void OverrideWebkitPrefs(webkit_glue::WebPreferences* prefs);
+ void OverrideWebkitPrefs(WebPreferences* prefs);
void OpenURL(const GURL& url);
void TestFinishedInSecondaryWindow();
@@ -129,7 +129,7 @@ class WebKitTestController : public base::NonThreadSafe,
void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
void OnTextDump(const std::string& dump);
void OnPrintMessage(const std::string& message);
- void OnOverridePreferences(const webkit_glue::WebPreferences& prefs);
+ void OnOverridePreferences(const WebPreferences& prefs);
void OnTestFinished(bool did_timeout);
void OnShowDevTools();
void OnCloseDevTools();
@@ -169,7 +169,7 @@ class WebKitTestController : public base::NonThreadSafe,
// True if the WebPreferences of newly created RenderViewHost should be
// overridden with prefs_.
bool should_override_prefs_;
- webkit_glue::WebPreferences prefs_;
+ WebPreferences prefs_;
base::CancelableClosure watchdog_;
diff --git a/content/shell/webkit_test_helpers.cc b/content/shell/webkit_test_helpers.cc
index 5599d43..1bddfcd 100644
--- a/content/shell/webkit_test_helpers.cc
+++ b/content/shell/webkit_test_helpers.cc
@@ -12,20 +12,18 @@
#include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/WebPreferences.h"
#include "webkit/glue/webpreferences.h"
-using WebTestRunner::WebPreferences;
-
namespace content {
-void ExportLayoutTestSpecificPreferences(const WebPreferences& from,
- webkit_glue::WebPreferences* to) {
+void ExportLayoutTestSpecificPreferences(
+ const WebTestRunner::WebPreferences& from,
+ WebPreferences* to) {
to->allow_universal_access_from_file_urls =
from.allowUniversalAccessFromFileURLs;
to->dom_paste_enabled = from.DOMPasteAllowed;
to->javascript_can_access_clipboard = from.javaScriptCanAccessClipboard;
to->xss_auditor_enabled = from.XSSAuditorEnabled;
- to->editing_behavior =
- static_cast<webkit_glue::WebPreferences::EditingBehavior>(
- from.editingBehavior);
+ to->editing_behavior = static_cast<webkit_glue::EditingBehavior>(
+ from.editingBehavior);
to->default_font_size = from.defaultFontSize;
to->minimum_font_size = from.minimumFontSize;
to->default_encoding = from.defaultTextEncodingName.utf8().data();
@@ -58,16 +56,16 @@ void ExportLayoutTestSpecificPreferences(const WebPreferences& from,
// Applies settings that differ between layout tests and regular mode. Some
// of the defaults are controlled via command line flags which are
// automatically set for layout tests.
-void ApplyLayoutTestDefaultPreferences(webkit_glue::WebPreferences* prefs) {
+void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) {
CommandLine& command_line = *CommandLine::ForCurrentProcess();
prefs->allow_universal_access_from_file_urls = true;
prefs->dom_paste_enabled = true;
prefs->javascript_can_access_clipboard = true;
prefs->xss_auditor_enabled = false;
#if defined(OS_MACOSX)
- prefs->editing_behavior = webkit_glue::WebPreferences::EDITING_BEHAVIOR_MAC;
+ prefs->editing_behavior = webkit_glue::EDITING_BEHAVIOR_MAC;
#else
- prefs->editing_behavior = webkit_glue::WebPreferences::EDITING_BEHAVIOR_WIN;
+ prefs->editing_behavior = webkit_glue::EDITING_BEHAVIOR_WIN;
#endif
prefs->java_enabled = false;
prefs->application_cache_enabled = true;
@@ -78,26 +76,26 @@ void ApplyLayoutTestDefaultPreferences(webkit_glue::WebPreferences* prefs) {
prefs->webgl_errors_to_console_enabled = false;
string16 serif;
#if defined(OS_MACOSX)
- prefs->cursive_font_family_map[webkit_glue::WebPreferences::kCommonScript] =
+ prefs->cursive_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Apple Chancery");
- prefs->fantasy_font_family_map[webkit_glue::WebPreferences::kCommonScript] =
+ prefs->fantasy_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Papyrus");
serif = ASCIIToUTF16("Times");
#else
- prefs->cursive_font_family_map[webkit_glue::WebPreferences::kCommonScript] =
+ prefs->cursive_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Comic Sans MS");
- prefs->fantasy_font_family_map[webkit_glue::WebPreferences::kCommonScript] =
+ prefs->fantasy_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Impact");
serif = ASCIIToUTF16("times new roman");
#endif
- prefs->serif_font_family_map[webkit_glue::WebPreferences::kCommonScript] =
+ prefs->serif_font_family_map[webkit_glue::kCommonScript] =
serif;
- prefs->standard_font_family_map[webkit_glue::WebPreferences::kCommonScript] =
+ prefs->standard_font_family_map[webkit_glue::kCommonScript] =
serif;
- prefs->fixed_font_family_map[webkit_glue::WebPreferences::kCommonScript] =
+ prefs->fixed_font_family_map[webkit_glue::kCommonScript] =
ASCIIToUTF16("Courier");
prefs->sans_serif_font_family_map[
- webkit_glue::WebPreferences::kCommonScript] = ASCIIToUTF16("Helvetica");
+ webkit_glue::kCommonScript] = ASCIIToUTF16("Helvetica");
prefs->minimum_logical_font_size = 9;
prefs->asynchronous_spell_checking_enabled = false;
prefs->user_style_sheet_enabled = true;
diff --git a/content/shell/webkit_test_helpers.h b/content/shell/webkit_test_helpers.h
index 280d37b..08ccec8 100644
--- a/content/shell/webkit_test_helpers.h
+++ b/content/shell/webkit_test_helpers.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_SHELL_WEBKIT_TEST_HELPERS_H_
#define CONTENT_SHELL_WEBKIT_TEST_HELPERS_H_
+struct WebPreferences;
+
namespace WebTestRunner {
struct WebPreferences;
}
@@ -13,21 +15,19 @@ namespace base {
class FilePath;
}
-namespace webkit_glue {
struct WebPreferences;
-}
namespace content {
// The TestRunner library keeps its settings in a WebTestRunner::WebPreferenes
-// object. The content_shell, however, uses webkit_glue::WebPreferences. This
+// object. The content_shell, however, uses WebPreferences. This
// method exports the settings from the WebTestRunner library which are relevant
// for layout tests.
void ExportLayoutTestSpecificPreferences(
- const WebTestRunner::WebPreferences& from, webkit_glue::WebPreferences* to);
+ const WebTestRunner::WebPreferences& from, WebPreferences* to);
// Applies settings that differ between layout tests and regular mode.
-void ApplyLayoutTestDefaultPreferences(webkit_glue::WebPreferences* prefs);
+void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs);
// Returns the root of the Blink checkout.
base::FilePath GetWebKitRootDirFilePath();
diff --git a/content/shell/webkit_test_runner.cc b/content/shell/webkit_test_runner.cc
index e9eafa6..ef41b09 100644
--- a/content/shell/webkit_test_runner.cc
+++ b/content/shell/webkit_test_runner.cc
@@ -83,7 +83,6 @@ using WebKit::WebURLRequest;
using WebKit::WebTestingSupport;
using WebKit::WebVector;
using WebKit::WebView;
-using WebTestRunner::WebPreferences;
using WebTestRunner::WebTask;
using WebTestRunner::WebTestInterfaces;
using WebTestRunner::WebTestProxyBase;
@@ -299,12 +298,12 @@ WebURL WebKitTestRunner::rewriteLayoutTestsURL(const std::string& utf8_url) {
return WebURL(GURL(new_url));
}
-WebPreferences* WebKitTestRunner::preferences() {
+WebTestRunner::WebPreferences* WebKitTestRunner::preferences() {
return &prefs_;
}
void WebKitTestRunner::applyPreferences() {
- webkit_glue::WebPreferences prefs = render_view()->GetWebkitPreferences();
+ WebPreferences prefs = render_view()->GetWebkitPreferences();
ExportLayoutTestSpecificPreferences(prefs_, &prefs);
render_view()->SetWebkitPreferences(prefs);
Send(new ShellViewHostMsg_OverridePreferences(routing_id(), prefs));
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index 678aa1f..a51be65 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -88,7 +88,7 @@ void TestWebContents::TestDidNavigateWithReferrer(
DidNavigate(render_view_host, params);
}
-webkit_glue::WebPreferences TestWebContents::TestGetWebkitPrefs() {
+WebPreferences TestWebContents::TestGetWebkitPrefs() {
return GetWebkitPrefs();
}
diff --git a/content/test/test_web_contents.h b/content/test/test_web_contents.h
index 644c45d..569edb9 100644
--- a/content/test/test_web_contents.h
+++ b/content/test/test_web_contents.h
@@ -42,7 +42,7 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester {
const GURL& url,
const Referrer& referrer,
PageTransition transition) OVERRIDE;
- virtual webkit_glue::WebPreferences TestGetWebkitPrefs() OVERRIDE;
+ virtual WebPreferences TestGetWebkitPrefs() OVERRIDE;
TestRenderViewHost* pending_test_rvh() const;