summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorwangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 23:31:25 +0000
committerwangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 23:31:25 +0000
commit6717bf27e115a3745e0418688436139c58dac753 (patch)
tree523fa301eeff4c292a140b56486e027bd075b0ed /content
parentd1c1aa2d06acaf9bf3f55734a72bb28835367370 (diff)
downloadchromium_src-6717bf27e115a3745e0418688436139c58dac753.zip
chromium_src-6717bf27e115a3745e0418688436139c58dac753.tar.gz
chromium_src-6717bf27e115a3745e0418688436139c58dac753.tar.bz2
Quote WebPreferences in namespace webkit_glue.
To avoid name conflict when linking DumpRenderTree which has its own implementation of the class with the same name. BUG=127811 TEST=Build all without errors TBR=kalman@chromium.org,dpapad@chromium.org,ben@chromium.org,battre@chromium.org Review URL: https://chromiumcodereview.appspot.com/10384128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/mock_content_browser_client.cc7
-rw-r--r--content/browser/mock_content_browser_client.h2
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc3
-rw-r--r--content/browser/renderer_host/render_view_host_impl.h3
-rw-r--r--content/browser/web_contents/interstitial_page_impl.cc2
-rw-r--r--content/browser/web_contents/interstitial_page_impl.h2
-rw-r--r--content/browser/web_contents/test_web_contents.cc2
-rw-r--r--content/browser/web_contents/test_web_contents.h2
-rw-r--r--content/browser/web_contents/web_contents_impl.cc1
-rw-r--r--content/browser/web_contents/web_contents_impl.h4
-rw-r--r--content/common/view_messages.h6
-rw-r--r--content/public/browser/content_browser_client.h5
-rw-r--r--content/public/browser/render_view_host.h6
-rw-r--r--content/public/browser/render_view_host_delegate.cc4
-rw-r--r--content/public/browser/render_view_host_delegate.h5
-rw-r--r--content/public/renderer/render_view.h4
-rw-r--r--content/renderer/render_view_browsertest_mac.mm2
-rw-r--r--content/renderer/render_view_impl.cc1
-rw-r--r--content/renderer/render_view_impl.h13
-rw-r--r--content/shell/shell_content_browser_client.cc7
-rw-r--r--content/shell/shell_content_browser_client.h2
-rw-r--r--content/test/render_view_test.cc2
-rw-r--r--content/test/web_contents_tester.h5
23 files changed, 56 insertions, 34 deletions
diff --git a/content/browser/mock_content_browser_client.cc b/content/browser/mock_content_browser_client.cc
index 1ce2fcd..2406bed8 100644
--- a/content/browser/mock_content_browser_client.cc
+++ b/content/browser/mock_content_browser_client.cc
@@ -284,9 +284,10 @@ bool MockContentBrowserClient::IsFastShutdownPossible() {
return true;
}
-void MockContentBrowserClient::OverrideWebkitPrefs(RenderViewHost* rvh,
- const GURL& url,
- WebPreferences* prefs) {
+void MockContentBrowserClient::OverrideWebkitPrefs(
+ RenderViewHost* rvh,
+ const GURL& url,
+ webkit_glue::WebPreferences* prefs) {
}
void MockContentBrowserClient::UpdateInspectorSetting(
diff --git a/content/browser/mock_content_browser_client.h b/content/browser/mock_content_browser_client.h
index ff6d41b..6a6944a 100644
--- a/content/browser/mock_content_browser_client.h
+++ b/content/browser/mock_content_browser_client.h
@@ -151,7 +151,7 @@ class MockContentBrowserClient : public ContentBrowserClient {
virtual bool IsFastShutdownPossible() OVERRIDE;
virtual void OverrideWebkitPrefs(RenderViewHost* rvh,
const GURL& url,
- WebPreferences* prefs) OVERRIDE;
+ webkit_glue::WebPreferences* prefs) OVERRIDE;
virtual void UpdateInspectorSetting(RenderViewHost* rvh,
const std::string& key,
const std::string& value) OVERRIDE;
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 10095439..7ea514c 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1584,7 +1584,8 @@ void RenderViewHostImpl::ExitFullscreen() {
WasResized();
}
-void RenderViewHostImpl::UpdateWebkitPreferences(const WebPreferences& prefs) {
+void RenderViewHostImpl::UpdateWebkitPreferences(
+ const webkit_glue::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 91a7cc9..9f1972d 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -220,7 +220,8 @@ class CONTENT_EXPORT RenderViewHostImpl
virtual void Zoom(PageZoom zoom) OVERRIDE;
virtual void SyncRendererPrefs() OVERRIDE;
virtual void ToggleSpeechInput() OVERRIDE;
- virtual void UpdateWebkitPreferences(const WebPreferences& prefs) OVERRIDE;
+ virtual void UpdateWebkitPreferences(
+ const webkit_glue::WebPreferences& prefs) OVERRIDE;
void set_delegate(RenderViewHostDelegate* d) {
CHECK(d); // http://crbug.com/82827
diff --git a/content/browser/web_contents/interstitial_page_impl.cc b/content/browser/web_contents/interstitial_page_impl.cc
index f7a62a6..bf67736 100644
--- a/content/browser/web_contents/interstitial_page_impl.cc
+++ b/content/browser/web_contents/interstitial_page_impl.cc
@@ -468,7 +468,7 @@ content::RendererPreferences InterstitialPageImpl::GetRendererPrefs(
return renderer_preferences_;
}
-WebPreferences InterstitialPageImpl::GetWebkitPrefs() {
+webkit_glue::WebPreferences InterstitialPageImpl::GetWebkitPrefs() {
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 f305f20..ceca2cb 100644
--- a/content/browser/web_contents/interstitial_page_impl.h
+++ b/content/browser/web_contents/interstitial_page_impl.h
@@ -95,7 +95,7 @@ class CONTENT_EXPORT InterstitialPageImpl
base::i18n::TextDirection title_direction) OVERRIDE;
virtual content::RendererPreferences GetRendererPrefs(
content::BrowserContext* browser_context) const OVERRIDE;
- virtual WebPreferences GetWebkitPrefs() OVERRIDE;
+ virtual webkit_glue::WebPreferences GetWebkitPrefs() OVERRIDE;
virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) OVERRIDE;
virtual void HandleKeyboardEvent(
diff --git a/content/browser/web_contents/test_web_contents.cc b/content/browser/web_contents/test_web_contents.cc
index 0b303c6..b735774 100644
--- a/content/browser/web_contents/test_web_contents.cc
+++ b/content/browser/web_contents/test_web_contents.cc
@@ -82,7 +82,7 @@ void TestWebContents::TestDidNavigateWithReferrer(
DidNavigate(render_view_host, params);
}
-WebPreferences TestWebContents::TestGetWebkitPrefs() {
+webkit_glue::WebPreferences TestWebContents::TestGetWebkitPrefs() {
return GetWebkitPrefs();
}
diff --git a/content/browser/web_contents/test_web_contents.h b/content/browser/web_contents/test_web_contents.h
index c862d62..195b7bc 100644
--- a/content/browser/web_contents/test_web_contents.h
+++ b/content/browser/web_contents/test_web_contents.h
@@ -41,7 +41,7 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester {
const GURL& url,
const Referrer& referrer,
PageTransition transition) OVERRIDE;
- virtual WebPreferences TestGetWebkitPrefs() OVERRIDE;
+ virtual webkit_glue::WebPreferences TestGetWebkitPrefs() OVERRIDE;
TestRenderViewHost* pending_test_rvh() const;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 558fa45..e8da542 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -155,6 +155,7 @@ using content::WebContentsObserver;
using content::WebUI;
using content::WebUIController;
using content::WebUIControllerFactory;
+using webkit_glue::WebPreferences;
namespace {
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 5ed6325..24f0049 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -70,7 +70,7 @@ class CONTENT_EXPORT WebContentsImpl
virtual ~WebContentsImpl();
// Returns the content specific prefs for the given RVH.
- static WebPreferences GetWebkitPrefs(
+ static webkit_glue::WebPreferences GetWebkitPrefs(
content::RenderViewHost* rvh, const GURL& url);
// Returns the SavePackage which manages the page saving job. May be NULL.
@@ -324,7 +324,7 @@ class CONTENT_EXPORT WebContentsImpl
IPC::Message* reply_msg) OVERRIDE;
virtual content::RendererPreferences GetRendererPrefs(
content::BrowserContext* browser_context) const OVERRIDE;
- virtual WebPreferences GetWebkitPrefs() OVERRIDE;
+ virtual webkit_glue::WebPreferences GetWebkitPrefs() OVERRIDE;
virtual void OnUserGesture() OVERRIDE;
virtual void OnIgnoredUIEvent() OVERRIDE;
virtual void RendererUnresponsive(content::RenderViewHost* render_view_host,
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 4a89eb7..957b465 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -127,7 +127,7 @@ IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo)
IPC_STRUCT_TRAITS_MEMBER(availableRect)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(WebPreferences)
+IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(standard_font_family)
IPC_STRUCT_TRAITS_MEMBER(fixed_font_family)
IPC_STRUCT_TRAITS_MEMBER(serif_font_family)
@@ -622,7 +622,7 @@ IPC_STRUCT_BEGIN(ViewMsg_New_Params)
IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
// Preferences for this view.
- IPC_STRUCT_MEMBER(WebPreferences, web_preferences)
+ IPC_STRUCT_MEMBER(webkit_glue::WebPreferences, web_preferences)
// The ID of the view to be created.
IPC_STRUCT_MEMBER(int32, view_id)
@@ -727,7 +727,7 @@ IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs,
// This passes a set of webkit preferences down to the renderer.
IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
- WebPreferences)
+ webkit_glue::WebPreferences)
// Tells the render view to close.
IPC_MESSAGE_ROUTED0(ViewMsg_Close)
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index b390748..2c2f6ef 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -22,7 +22,10 @@ class GURL;
class PluginProcessHost;
class ResourceDispatcherHost;
class SkBitmap;
+
+namespace webkit_glue {
struct WebPreferences;
+}
namespace content {
class AccessTokenStore;
@@ -377,7 +380,7 @@ class ContentBrowserClient {
// to the embedder to update it if it wants.
virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
const GURL& url,
- WebPreferences* prefs) = 0;
+ webkit_glue::WebPreferences* prefs) = 0;
// Inspector setting was changed and should be persisted.
virtual void UpdateInspectorSetting(content::RenderViewHost* rvh,
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index 991c868..0076281 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -16,7 +16,10 @@
class FilePath;
class GURL;
struct WebDropData;
+
+namespace webkit_glue {
struct WebPreferences;
+}
namespace gfx {
class Point;
@@ -246,7 +249,8 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost {
virtual void ToggleSpeechInput() = 0;
// Passes a list of Webkit preferences to the renderer.
- virtual void UpdateWebkitPreferences(const WebPreferences& prefs) = 0;
+ virtual void UpdateWebkitPreferences(
+ const webkit_glue::WebPreferences& prefs) = 0;
};
} // namespace content
diff --git a/content/public/browser/render_view_host_delegate.cc b/content/public/browser/render_view_host_delegate.cc
index 82d0e30..50552fd 100644
--- a/content/public/browser/render_view_host_delegate.cc
+++ b/content/public/browser/render_view_host_delegate.cc
@@ -30,8 +30,8 @@ WebContents* RenderViewHostDelegate::GetAsWebContents() {
return NULL;
}
-WebPreferences RenderViewHostDelegate::GetWebkitPrefs() {
- return WebPreferences();
+webkit_glue::WebPreferences RenderViewHostDelegate::GetWebkitPrefs() {
+ return webkit_glue::WebPreferences();
}
bool RenderViewHostDelegate::PreHandleKeyboardEvent(
diff --git a/content/public/browser/render_view_host_delegate.h b/content/public/browser/render_view_host_delegate.h
index 4d43760..17a4dc9 100644
--- a/content/public/browser/render_view_host_delegate.h
+++ b/content/public/browser/render_view_host_delegate.h
@@ -32,7 +32,10 @@ struct ViewHostMsg_DidFailProvisionalLoadWithError_Params;
struct ViewHostMsg_FrameNavigate_Params;
struct WebDropData;
struct WebMenuItem;
+
+namespace webkit_glue {
struct WebPreferences;
+}
namespace base {
class ListValue;
@@ -348,7 +351,7 @@ class CONTENT_EXPORT RenderViewHostDelegate : public IPC::Channel::Listener {
// Returns a WebPreferences object that will be used by the renderer
// associated with the owning render view host.
- virtual WebPreferences GetWebkitPrefs();
+ virtual webkit_glue::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/public/renderer/render_view.h b/content/public/renderer/render_view.h
index 966488f..7d291a4 100644
--- a/content/public/renderer/render_view.h
+++ b/content/public/renderer/render_view.h
@@ -12,7 +12,9 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityState.h"
#include "ui/gfx/native_widget_types.h"
+namespace webkit_glue {
struct WebPreferences;
+}
namespace WebKit {
class WebFrame;
@@ -66,7 +68,7 @@ class CONTENT_EXPORT RenderView : public IPC::Message::Sender {
virtual gfx::NativeViewId GetHostWindow() const = 0;
// Gets WebKit related preferences associated with this view.
- virtual WebPreferences& GetWebkitPreferences() = 0;
+ virtual webkit_glue::WebPreferences& GetWebkitPreferences() = 0;
// Returns the associated WebView. May return NULL when the view is closing.
virtual WebKit::WebView* GetWebView() = 0;
diff --git a/content/renderer/render_view_browsertest_mac.mm b/content/renderer/render_view_browsertest_mac.mm
index dfb70b00..e2d28a7 100644
--- a/content/renderer/render_view_browsertest_mac.mm
+++ b/content/renderer/render_view_browsertest_mac.mm
@@ -83,7 +83,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) {
);
#undef HTML
- WebPreferences prefs;
+ webkit_glue::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 3681e9b..f915189 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -287,6 +287,7 @@ using webkit::forms::PasswordForm;
using webkit::forms::PasswordFormDomManager;
using webkit_glue::AltErrorPageResourceFetcher;
using webkit_glue::ResourceFetcher;
+using webkit_glue::WebPreferences;
using webkit_glue::WebURLResponseExtraDataImpl;
//-----------------------------------------------------------------------------
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 470aefe..7df6c99b 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -187,7 +187,7 @@ class RenderViewImpl : public RenderWidget,
gfx::NativeViewId parent_hwnd,
int32 opener_id,
const content::RendererPreferences& renderer_prefs,
- const WebPreferences& webkit_prefs,
+ const webkit_glue::WebPreferences& webkit_prefs,
SharedRenderViewCounter* counter,
int32 routing_id,
int32 surface_id,
@@ -216,7 +216,7 @@ class RenderViewImpl : public RenderWidget,
int history_list_offset() const { return history_list_offset_; }
- const WebPreferences& webkit_preferences() const {
+ const webkit_glue::WebPreferences& webkit_preferences() const {
return webkit_preferences_;
}
@@ -610,7 +610,7 @@ class RenderViewImpl : public RenderWidget,
virtual int GetPageId() const OVERRIDE;
virtual gfx::Size GetSize() const OVERRIDE;
virtual gfx::NativeViewId GetHostWindow() const OVERRIDE;
- virtual WebPreferences& GetWebkitPreferences() OVERRIDE;
+ virtual webkit_glue::WebPreferences& GetWebkitPreferences() OVERRIDE;
virtual WebKit::WebView* GetWebView() OVERRIDE;
virtual WebKit::WebNode GetFocusedNode() const OVERRIDE;
virtual WebKit::WebNode GetContextMenuNode() const OVERRIDE;
@@ -743,7 +743,7 @@ class RenderViewImpl : public RenderWidget,
RenderViewImpl(gfx::NativeViewId parent_hwnd,
int32 opener_id,
const content::RendererPreferences& renderer_prefs,
- const WebPreferences& webkit_prefs,
+ const webkit_glue::WebPreferences& webkit_prefs,
SharedRenderViewCounter* counter,
int32 routing_id,
int32 surface_id,
@@ -911,7 +911,8 @@ class RenderViewImpl : public RenderWidget,
void OnThemeChanged();
void OnUndo();
void OnUpdateTargetURLAck();
- CONTENT_EXPORT void OnUpdateWebPreferences(const WebPreferences& prefs);
+ CONTENT_EXPORT void OnUpdateWebPreferences(
+ const webkit_glue::WebPreferences& prefs);
#if defined(OS_MACOSX)
void OnWindowFrameChanged(const gfx::Rect& window_frame,
@@ -1032,7 +1033,7 @@ class RenderViewImpl : public RenderWidget,
// Settings ------------------------------------------------------------------
- WebPreferences webkit_preferences_;
+ webkit_glue::WebPreferences webkit_preferences_;
content::RendererPreferences renderer_preferences_;
HostZoomLevels host_zoom_levels_;
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index f0cf431..48c7fc4 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -299,9 +299,10 @@ bool ShellContentBrowserClient::IsFastShutdownPossible() {
return true;
}
-void ShellContentBrowserClient::OverrideWebkitPrefs(RenderViewHost* rvh,
- const GURL& url,
- WebPreferences* prefs) {
+void ShellContentBrowserClient::OverrideWebkitPrefs(
+ RenderViewHost* rvh,
+ const GURL& url,
+ webkit_glue::WebPreferences* prefs) {
}
void ShellContentBrowserClient::UpdateInspectorSetting(
diff --git a/content/shell/shell_content_browser_client.h b/content/shell/shell_content_browser_client.h
index 4d57ebd..551bc8e 100644
--- a/content/shell/shell_content_browser_client.h
+++ b/content/shell/shell_content_browser_client.h
@@ -157,7 +157,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
virtual bool IsFastShutdownPossible() OVERRIDE;
virtual void OverrideWebkitPrefs(RenderViewHost* rvh,
const GURL& url,
- WebPreferences* prefs) OVERRIDE;
+ webkit_glue::WebPreferences* prefs) OVERRIDE;
virtual void UpdateInspectorSetting(RenderViewHost* rvh,
const std::string& key,
const std::string& value) OVERRIDE;
diff --git a/content/test/render_view_test.cc b/content/test/render_view_test.cc
index 9454109..a7d2018b 100644
--- a/content/test/render_view_test.cc
+++ b/content/test/render_view_test.cc
@@ -158,7 +158,7 @@ void RenderViewTest::SetUp() {
0,
kOpenerId,
content::RendererPreferences(),
- WebPreferences(),
+ webkit_glue::WebPreferences(),
new SharedRenderViewCounter(0),
kRouteId,
kSurfaceId,
diff --git a/content/test/web_contents_tester.h b/content/test/web_contents_tester.h
index 9ede723..66a702f 100644
--- a/content/test/web_contents_tester.h
+++ b/content/test/web_contents_tester.h
@@ -9,7 +9,10 @@
#include "content/public/common/page_transition_types.h"
class GURL;
+
+namespace webkit_glue {
struct WebPreferences;
+}
namespace content {
@@ -109,7 +112,7 @@ class WebContentsTester {
content::PageTransition transition) = 0;
// Promote GetWebkitPrefs to public.
- virtual WebPreferences TestGetWebkitPrefs() = 0;
+ virtual webkit_glue::WebPreferences TestGetWebkitPrefs() = 0;
};
} // namespace content