diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 15:09:39 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 15:09:39 +0000 |
commit | 9146221ca83c4996713894316661b442b20c9e28 (patch) | |
tree | 0cd1efb863d39a4ac44aacde045c957552e3da7d /webkit/tools | |
parent | 98f5f88b53f774cee109503b0225a5bfb9deb550 (diff) | |
download | chromium_src-9146221ca83c4996713894316661b442b20c9e28.zip chromium_src-9146221ca83c4996713894316661b442b20c9e28.tar.gz chromium_src-9146221ca83c4996713894316661b442b20c9e28.tar.bz2 |
Adds some ifdefs so that test_shell can be compiled on linux
without GTK.
I had to recreate this patch as my workspace for various
resonds. UGH!
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/67024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rwxr-xr-x | webkit/tools/test_shell/test_shell.cc | 8 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 6 | ||||
-rw-r--r-- | webkit/tools/test_shell/webwidget_host.h | 16 |
3 files changed, 23 insertions, 7 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index df8b087..6ce2509 100755 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -574,9 +574,11 @@ void AppendToLog(const char* file, int line, const char* msg) { logging::LogMessage(file, line).stream() << msg; } +#if !defined(LINUX2) bool GetApplicationDirectory(std::wstring *path) { return PathService::Get(base::DIR_EXE, path); } +#endif GURL GetInspectorURL() { return GURL("test-shell-resource://inspector/inspector.html"); @@ -586,9 +588,11 @@ std::string GetUIResourceProtocol() { return "test-shell-resource"; } +#if !defined(LINUX2) bool GetExeDirectory(std::wstring *path) { return PathService::Get(base::DIR_EXE, path); } +#endif bool SpellCheckWord(const wchar_t* word, int word_len, int* misspelling_start, int* misspelling_len) { @@ -598,14 +602,17 @@ bool SpellCheckWord(const wchar_t* word, int word_len, return true; } +#if !defined(LINUX2) bool IsPluginRunningInRendererProcess() { return true; } +#endif bool GetPluginFinderURL(std::string* plugin_finder_url) { return false; } +#if !defined(LINUX2) bool IsDefaultPluginEnabled() { return false; } @@ -613,5 +620,6 @@ bool IsDefaultPluginEnabled() { std::wstring GetWebKitLocale() { return L"en-US"; } +#endif } // namespace webkit_glue diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 03d7387..15f92f5 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -16,7 +16,7 @@ #endif #include <map> -#if defined(OS_LINUX) +#if defined(TOOLKIT_GTK) #include <gdk/gdkcursor.h> #endif @@ -69,7 +69,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, #else , select_trailing_whitespace_enabled_(false) #endif -#if defined(OS_LINUX) +#if defined(TOOLKIT_GTK) , cursor_type_(GDK_X_CURSOR) #endif { @@ -341,7 +341,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>, scoped_refptr<TestDropDelegate> drop_delegate_; #endif -#if defined(OS_LINUX) +#if defined(TOOLKIT_GTK) // The type of cursor the window is currently using. // Used for judging whether a new SetCursor call is actually changing the // cursor. diff --git a/webkit/tools/test_shell/webwidget_host.h b/webkit/tools/test_shell/webwidget_host.h index 1fd02c1..96235a9 100644 --- a/webkit/tools/test_shell/webwidget_host.h +++ b/webkit/tools/test_shell/webwidget_host.h @@ -8,16 +8,13 @@ #include "base/basictypes.h" #include "base/gfx/native_widget_types.h" #include "base/gfx/rect.h" +#include "base/gfx/size.h" #include "base/scoped_ptr.h" #include "skia/ext/platform_canvas.h" class WebWidget; class WebWidgetDelegate; -namespace gfx { -class Size; -} - namespace WebKit { struct WebScreenInfo; } @@ -51,6 +48,9 @@ class WebWidgetHost { #if defined(OS_WIN) void SetCursor(HCURSOR cursor); #endif +#if defined(LINUX2) + const gfx::Size& size() const { return size_; } +#endif void DiscardBackingStore(); // Allow clients to update the paint rect. For example, if we get a gdk @@ -58,6 +58,8 @@ class WebWidgetHost { void UpdatePaintRect(const gfx::Rect& rect); void Paint(); + skia::PlatformCanvas* canvas() const { return canvas_.get(); } + WebKit::WebScreenInfo GetScreenInfo(); protected: @@ -112,6 +114,12 @@ class WebWidgetHost { #endif } +#if defined(LINUX2) + void ScheduleRepaint(const gfx::Rect& bounds); + + gfx::Size size_; +#endif + gfx::NativeView view_; WebWidget* webwidget_; scoped_ptr<skia::PlatformCanvas> canvas_; |