diff options
author | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 23:31:25 +0000 |
---|---|---|
committer | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 23:31:25 +0000 |
commit | 6717bf27e115a3745e0418688436139c58dac753 (patch) | |
tree | 523fa301eeff4c292a140b56486e027bd075b0ed | |
parent | d1c1aa2d06acaf9bf3f55734a72bb28835367370 (diff) | |
download | chromium_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
55 files changed, 122 insertions, 94 deletions
diff --git a/ash/shell/content_client/shell_content_browser_client.cc b/ash/shell/content_client/shell_content_browser_client.cc index bae0eb5..952bf38 100644 --- a/ash/shell/content_client/shell_content_browser_client.cc +++ b/ash/shell/content_client/shell_content_browser_client.cc @@ -308,7 +308,7 @@ bool ShellContentBrowserClient::IsFastShutdownPossible() { void ShellContentBrowserClient::OverrideWebkitPrefs( content::RenderViewHost* rvh, const GURL& url, - WebPreferences* prefs) { + webkit_glue::WebPreferences* prefs) { } void ShellContentBrowserClient::UpdateInspectorSetting( diff --git a/ash/shell/content_client/shell_content_browser_client.h b/ash/shell/content_client/shell_content_browser_client.h index a9e70f8..4368c66 100644 --- a/ash/shell/content_client/shell_content_browser_client.h +++ b/ash/shell/content_client/shell_content_browser_client.h @@ -165,7 +165,7 @@ class ShellContentBrowserClient : public content::ContentBrowserClient { virtual bool IsFastShutdownPossible() OVERRIDE; virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, const GURL& url, - WebPreferences* prefs) OVERRIDE; + webkit_glue::WebPreferences* prefs) OVERRIDE; virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, const std::string& key, const std::string& value) OVERRIDE; diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index a265133..ba15e9c 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -153,6 +153,7 @@ using content::QuotaPermissionContext; using content::RenderViewHost; using content::SiteInstance; using content::WebContents; +using webkit_glue::WebPreferences; namespace { diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index 4376eff..56067dd 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h @@ -159,7 +159,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { virtual bool IsFastShutdownPossible() OVERRIDE; virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, const GURL& url, - WebPreferences* prefs) OVERRIDE; + webkit_glue::WebPreferences* prefs) OVERRIDE; virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, const std::string& key, const std::string& value) OVERRIDE; diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc index d0310ba..542f029 100644 --- a/chrome/browser/extensions/extension_browsertests_misc.cc +++ b/chrome/browser/extensions/extension_browsertests_misc.cc @@ -128,7 +128,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WebKitPrefsBackgroundPage) { ExtensionProcessManager* manager = browser()->profile()->GetExtensionProcessManager(); ExtensionHost* host = FindHostWithPath(manager, "/backgroundpage.html", 1); - WebPreferences prefs = + webkit_glue::WebPreferences prefs = host->render_view_host()->GetDelegate()->GetWebkitPrefs(); ASSERT_TRUE(prefs.experimental_webgl_enabled); ASSERT_TRUE(prefs.accelerated_compositing_enabled); diff --git a/chrome/browser/extensions/extension_webkit_preferences.cc b/chrome/browser/extensions/extension_webkit_preferences.cc index f07b717..0cf402c 100644 --- a/chrome/browser/extensions/extension_webkit_preferences.cc +++ b/chrome/browser/extensions/extension_webkit_preferences.cc @@ -13,7 +13,7 @@ namespace extension_webkit_preferences { void SetPreferences(const Extension* extension, content::ViewType render_view_type, - WebPreferences* webkit_prefs) { + webkit_glue::WebPreferences* webkit_prefs) { if (!extension) return; diff --git a/chrome/browser/extensions/extension_webkit_preferences.h b/chrome/browser/extensions/extension_webkit_preferences.h index 824104d..f5c1fb4 100644 --- a/chrome/browser/extensions/extension_webkit_preferences.h +++ b/chrome/browser/extensions/extension_webkit_preferences.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,13 +8,16 @@ #include "chrome/common/chrome_view_type.h" class Extension; + +namespace webkit_glue { struct WebPreferences; +} namespace extension_webkit_preferences { void SetPreferences(const Extension* extension, content::ViewType render_view_type, - WebPreferences* webkit_prefs); + webkit_glue::WebPreferences* webkit_prefs); } // namespace extension_webkit_preferences diff --git a/chrome/browser/prefs/pref_service_unittest.cc b/chrome/browser/prefs/pref_service_unittest.cc index 38d6ea96..ab3a62f 100644 --- a/chrome/browser/prefs/pref_service_unittest.cc +++ b/chrome/browser/prefs/pref_service_unittest.cc @@ -387,7 +387,7 @@ class PrefServiceWebKitPrefs : public ChromeRenderViewHostTestHarness { // Tests to see that webkit preferences are properly loaded and copied over // to a WebPreferences object. TEST_F(PrefServiceWebKitPrefs, PrefsCopied) { - WebPreferences webkit_prefs = + webkit_glue::WebPreferences webkit_prefs = WebContentsTester::For(contents())->TestGetWebkitPrefs(); // These values have been overridden by the profile preferences. diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc index ab8d13f..d35d915 100644 --- a/chrome/browser/printing/print_dialog_cloud.cc +++ b/chrome/browser/printing/print_dialog_cloud.cc @@ -357,7 +357,8 @@ void CloudPrintFlowHandler::Observe( url.scheme() == dialog_url.scheme()) { RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); if (rvh && rvh->GetDelegate()) { - WebPreferences webkit_prefs = rvh->GetDelegate()->GetWebkitPrefs(); + webkit_glue::WebPreferences webkit_prefs = + rvh->GetDelegate()->GetWebkitPrefs(); webkit_prefs.allow_scripts_to_close_windows = true; rvh->UpdateWebkitPreferences(webkit_prefs); } else { diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc index 7c7d6a0..65b58ad 100644 --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -26,6 +26,7 @@ #include "webkit/glue/webpreferences.h" using content::WebContents; +using webkit_glue::WebPreferences; namespace { diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.h b/chrome/browser/ui/prefs/prefs_tab_helper.h index 16c3d13..9b2438d 100644 --- a/chrome/browser/ui/prefs/prefs_tab_helper.h +++ b/chrome/browser/ui/prefs/prefs_tab_helper.h @@ -14,7 +14,6 @@ class OverlayUserPrefStore; class PrefService; class Profile; -struct WebPreferences; namespace content { class WebContents; diff --git a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc index 3345d2c..b87c4e7 100644 --- a/chrome/browser/ui/webui/task_manager/task_manager_handler.cc +++ b/chrome/browser/ui/webui/task_manager/task_manager_handler.cc @@ -347,7 +347,8 @@ void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) { content::RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); if (rvh && rvh->GetDelegate()) { - WebPreferences webkit_prefs = rvh->GetDelegate()->GetWebkitPrefs(); + webkit_glue::WebPreferences webkit_prefs = + rvh->GetDelegate()->GetWebkitPrefs(); webkit_prefs.allow_scripts_to_close_windows = true; rvh->UpdateWebkitPreferences(webkit_prefs); } else { diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index 1a06ad6..771cff2 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -1213,7 +1213,7 @@ bool PrintWebViewHelper::CopyAndPrint(WebKit::WebFrame* web_frame) { // Create a new WebView with the same settings as the current display one. // Except that we disable javascript (don't want any active content running // on the page). - WebPreferences prefs = render_view()->GetWebkitPreferences(); + webkit_glue::WebPreferences prefs = render_view()->GetWebkitPreferences(); prefs.javascript_enabled = false; prefs.java_enabled = false; 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 diff --git a/ppapi/shared_impl/ppapi_preferences.cc b/ppapi/shared_impl/ppapi_preferences.cc index c8a5b00..8622640 100644 --- a/ppapi/shared_impl/ppapi_preferences.cc +++ b/ppapi/shared_impl/ppapi_preferences.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,7 +14,7 @@ Preferences::Preferences() is_3d_supported(true) { } -Preferences::Preferences(const WebPreferences& prefs) +Preferences::Preferences(const webkit_glue::WebPreferences& prefs) : standard_font_family(prefs.standard_font_family), fixed_font_family(prefs.fixed_font_family), serif_font_family(prefs.serif_font_family), diff --git a/ppapi/shared_impl/ppapi_preferences.h b/ppapi/shared_impl/ppapi_preferences.h index 497ea38..66b2051 100644 --- a/ppapi/shared_impl/ppapi_preferences.h +++ b/ppapi/shared_impl/ppapi_preferences.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,14 +8,16 @@ #include "base/string16.h" #include "ppapi/shared_impl/ppapi_shared_export.h" +namespace webkit_glue { struct WebPreferences; +} namespace ppapi { struct PPAPI_SHARED_EXPORT Preferences { public: Preferences(); - explicit Preferences(const WebPreferences& prefs); + explicit Preferences(const webkit_glue::WebPreferences& prefs); ~Preferences(); string16 standard_font_family; diff --git a/ui/views/examples/content_client/examples_content_browser_client.cc b/ui/views/examples/content_client/examples_content_browser_client.cc index 3dabb91..419171a 100644 --- a/ui/views/examples/content_client/examples_content_browser_client.cc +++ b/ui/views/examples/content_client/examples_content_browser_client.cc @@ -308,7 +308,7 @@ bool ExamplesContentBrowserClient::IsFastShutdownPossible() { void ExamplesContentBrowserClient::OverrideWebkitPrefs( content::RenderViewHost* rvh, const GURL& url, - WebPreferences* prefs) { + webkit_glue::WebPreferences* prefs) { } void ExamplesContentBrowserClient::UpdateInspectorSetting( diff --git a/ui/views/examples/content_client/examples_content_browser_client.h b/ui/views/examples/content_client/examples_content_browser_client.h index 6addff2..e7b2ccd 100644 --- a/ui/views/examples/content_client/examples_content_browser_client.h +++ b/ui/views/examples/content_client/examples_content_browser_client.h @@ -165,7 +165,7 @@ class ExamplesContentBrowserClient : public content::ContentBrowserClient { virtual bool IsFastShutdownPossible() OVERRIDE; virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, const GURL& url, - WebPreferences* prefs) OVERRIDE; + webkit_glue::WebPreferences* prefs) OVERRIDE; virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, const std::string& key, const std::string& value) OVERRIDE; diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc index 42eb513..359e0b0 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -25,6 +25,8 @@ using WebKit::WebString; using WebKit::WebURL; using WebKit::WebView; +namespace webkit_glue { + WebPreferences::WebPreferences() : standard_font_family(ASCIIToUTF16("Times New Roman")), fixed_font_family(ASCIIToUTF16("Courier New")), @@ -352,3 +354,5 @@ void WebPreferences::Apply(WebView* web_view) const { WebNetworkStateNotifier::setOnLine(is_online); } + +} // namespace webkit_glue diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index dcff7b7..05e0677 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -22,6 +22,8 @@ namespace WebKit { class WebView; } +namespace webkit_glue { + struct WEBKIT_GLUE_EXPORT WebPreferences { // Map of ISO 15924 four-letter script code to font family. For example, // "Arab" to "My Arabic Font". @@ -128,4 +130,6 @@ struct WEBKIT_GLUE_EXPORT WebPreferences { void Apply(WebKit::WebView* web_view) const; }; +} // namespace webkit_glue + #endif // WEBKIT_GLUE_WEBPREFERENCES_H__ diff --git a/webkit/plugins/webview_plugin.cc b/webkit/plugins/webview_plugin.cc index 735e6fc..a1d6b0ab 100644 --- a/webkit/plugins/webview_plugin.cc +++ b/webkit/plugins/webview_plugin.cc @@ -50,10 +50,11 @@ WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate) } // static -WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate, - const WebPreferences& preferences, - const std::string& html_data, - const GURL& url) { +WebViewPlugin* WebViewPlugin::Create( + WebViewPlugin::Delegate* delegate, + const webkit_glue::WebPreferences& preferences, + const std::string& html_data, + const GURL& url) { WebViewPlugin* plugin = new WebViewPlugin(delegate); WebView* web_view = plugin->web_view(); preferences.Apply(web_view); diff --git a/webkit/plugins/webview_plugin.h b/webkit/plugins/webview_plugin.h index 403b80d..9d50b82 100644 --- a/webkit/plugins/webview_plugin.h +++ b/webkit/plugins/webview_plugin.h @@ -20,7 +20,10 @@ namespace WebKit { class WebMouseEvent; } + +namespace webkit_glue { struct WebPreferences; +} namespace webkit { @@ -56,7 +59,7 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, // only used for navigation and never actually resolved. WEBKIT_PLUGINS_EXPORT static WebViewPlugin* Create( Delegate* delegate, - const WebPreferences& preferences, + const webkit_glue::WebPreferences& preferences, const std::string& html_data, const GURL& url); diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index e277fcb..07f57a6 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -63,6 +63,7 @@ using WebKit::WebScriptController; using WebKit::WebSize; using WebKit::WebURLRequest; using WebKit::WebView; +using webkit_glue::WebPreferences; namespace { diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h index f00d38a..590a3b2 100644 --- a/webkit/tools/test_shell/test_shell.h +++ b/webkit/tools/test_shell/test_shell.h @@ -1,27 +1,6 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_H_ @@ -49,7 +28,10 @@ typedef std::list<gfx::NativeWindow> WindowList; +namespace webkit_glue { struct WebPreferences; +} + class GURL; class TestNavigationEntry; class TestNavigationController; @@ -234,7 +216,7 @@ public: static void SetAccelerated2dCanvasEnabled(bool enabled); static void SetAcceleratedCompositingEnabled(bool enabled); - static WebPreferences* GetWebPreferences(); + static webkit_glue::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. @@ -425,7 +407,7 @@ private: bool allow_scripts_; // The preferences for the test shell. - static WebPreferences* web_prefs_; + static webkit_glue::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 9b7904b..c99d070 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -156,7 +156,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode, layout_test_mode_ = layout_test_mode; allow_external_pages_ = allow_external_pages; - web_prefs_ = new WebPreferences; + web_prefs_ = new webkit_glue::WebPreferences; 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 e5f749d..9c38d44 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -207,7 +207,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode, layout_test_mode_ = layout_test_mode; allow_external_pages_ = allow_external_pages; - web_prefs_ = new WebPreferences; + web_prefs_ = new webkit_glue::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 b07c26d..e56530b 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 WebPreferences; + web_prefs_ = new webkit_glue::WebPreferences; ResetWebPreferences(); diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 3cf56cc..04260ed 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -128,6 +128,7 @@ using WebKit::WebWindowFeatures; using WebKit::WebWorker; using WebKit::WebVector; using WebKit::WebView; +using webkit_glue::WebPreferences; namespace { diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 435830a..dffaa40 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -45,7 +45,6 @@ #include <gdk/gdk.h> #endif -struct WebPreferences; class GURL; class TestShell; class WebWidgetHost; diff --git a/webkit/tools/test_shell/webview_host.h b/webkit/tools/test_shell/webview_host.h index 5faf32d..9a99f03 100644 --- a/webkit/tools/test_shell/webview_host.h +++ b/webkit/tools/test_shell/webview_host.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,7 +14,10 @@ #include "webkit/plugins/npapi/gtk_plugin_container_manager.h" #endif +namespace webkit_glue { struct WebPreferences; +} + class TestWebViewDelegate; namespace WebKit { @@ -31,7 +34,7 @@ class WebViewHost : public WebWidgetHost { static WebViewHost* Create(gfx::NativeView parent_view, TestWebViewDelegate* delegate, WebKit::WebDevToolsAgentClient* devtools_client, - const WebPreferences& prefs); + const webkit_glue::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 e5fb2d7..40b61fa 100644 --- a/webkit/tools/test_shell/webview_host_gtk.cc +++ b/webkit/tools/test_shell/webview_host_gtk.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,7 +21,7 @@ using WebKit::WebView; WebViewHost* WebViewHost::Create(GtkWidget* parent_view, TestWebViewDelegate* delegate, WebDevToolsAgentClient* dev_tools_client, - const WebPreferences& prefs) { + const webkit_glue::WebPreferences& prefs) { WebViewHost* host = new WebViewHost(); host->view_ = WebWidgetHost::CreateWidget(parent_view, host); diff --git a/webkit/tools/test_shell/webview_host_mac.mm b/webkit/tools/test_shell/webview_host_mac.mm index 9f41abf..584a631 100644 --- a/webkit/tools/test_shell/webview_host_mac.mm +++ b/webkit/tools/test_shell/webview_host_mac.mm @@ -24,7 +24,7 @@ using WebKit::WebView; WebViewHost* WebViewHost::Create(NSView* parent_view, TestWebViewDelegate* delegate, WebDevToolsAgentClient* dev_tools_client, - const WebPreferences& prefs) { + const webkit_glue::WebPreferences& prefs) { WebViewHost* host = new WebViewHost(); NSRect content_rect = [parent_view frame]; diff --git a/webkit/tools/test_shell/webview_host_win.cc b/webkit/tools/test_shell/webview_host_win.cc index bc5f35b..f1f7842 100644 --- a/webkit/tools/test_shell/webview_host_win.cc +++ b/webkit/tools/test_shell/webview_host_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -19,7 +19,7 @@ static const wchar_t kWindowClassName[] = L"WebViewHost"; WebViewHost* WebViewHost::Create(HWND parent_view, TestWebViewDelegate* delegate, WebDevToolsAgentClient* dev_tools_client, - const WebPreferences& prefs) { + const webkit_glue::WebPreferences& prefs) { WebViewHost* host = new WebViewHost(); static bool registered_class = false; |