diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webpreferences.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webpreferences.h | 4 | ||||
-rw-r--r-- | webkit/plugins/webview_plugin.cc | 9 | ||||
-rw-r--r-- | webkit/plugins/webview_plugin.h | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 1 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.h | 34 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_mac.mm | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_win.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 1 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 1 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host.h | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_gtk.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_mac.mm | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_win.cc | 4 |
15 files changed, 40 insertions, 42 deletions
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; |