summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 04:08:14 +0000
committerpvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 04:08:14 +0000
commitf5d01f28f7303a06df34324e0549e6d591c5088e (patch)
treefb54447770d34686b2c26e4575a1f952463c7b87 /webkit
parentde61d5f521eb7489a6ec82048fc63f51ef98ece6 (diff)
downloadchromium_src-f5d01f28f7303a06df34324e0549e6d591c5088e.zip
chromium_src-f5d01f28f7303a06df34324e0549e6d591c5088e.tar.gz
chromium_src-f5d01f28f7303a06df34324e0549e6d591c5088e.tar.bz2
webkit/ ifdefs for BSD port; based on sprewell@jaggeri.com patch
Review URL: http://codereview.chromium.org/1483001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/extensions/v8/heap_profiler_extension.cc4
-rw-r--r--webkit/tools/pepper_test_plugin/main.cc12
-rw-r--r--webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp4
-rw-r--r--webkit/tools/test_shell/event_sending_controller.cc4
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc4
-rw-r--r--webkit/tools/test_shell/test_shell.gypi2
6 files changed, 15 insertions, 15 deletions
diff --git a/webkit/extensions/v8/heap_profiler_extension.cc b/webkit/extensions/v8/heap_profiler_extension.cc
index d51d4108..ab20380 100644
--- a/webkit/extensions/v8/heap_profiler_extension.cc
+++ b/webkit/extensions/v8/heap_profiler_extension.cc
@@ -6,7 +6,7 @@
#include "base/basictypes.h"
-#if defined(OS_LINUX) && defined(USE_TCMALLOC)
+#if defined(USE_TCMALLOC) && !defined(OS_WIN)
#include "third_party/tcmalloc/chromium/src/google/heap-profiler.h"
#endif
@@ -60,7 +60,7 @@ class HeapProfilerWrapper : public v8::Extension {
return v8::Handle<v8::FunctionTemplate>();
}
-#if defined(OS_LINUX) && defined(USE_TCMALLOC)
+#if defined(USE_TCMALLOC) && !defined(OS_WIN)
static v8::Handle<v8::Value> HeapProfilerStart(const v8::Arguments& args) {
if (args.Length() >= 1 && args[0]->IsString()) {
v8::Local<v8::String> js_prefix = args[0]->ToString();
diff --git a/webkit/tools/pepper_test_plugin/main.cc b/webkit/tools/pepper_test_plugin/main.cc
index 1ecd8c6..061b54b 100644
--- a/webkit/tools/pepper_test_plugin/main.cc
+++ b/webkit/tools/pepper_test_plugin/main.cc
@@ -113,7 +113,7 @@ void Log(NPP instance, const char* format, ...) {
extern "C" {
EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
, NPPluginFuncs* plugin_funcs
#endif
);
@@ -125,7 +125,7 @@ EXPORT void API_CALL NP_Shutdown() {
#endif
}
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
EXPORT NPError API_CALL NP_GetValue(NPP instance,
NPPVariable variable,
void* value);
@@ -136,7 +136,7 @@ EXPORT const char* API_CALL NP_GetMIMEDescription();
// Plugin entry points
EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
, NPPluginFuncs* plugin_funcs
#endif
) {
@@ -144,7 +144,7 @@ EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs
#if !defined(INDEPENDENT_PLUGIN)
pglInitialize();
#endif
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
return NP_GetEntryPoints(plugin_funcs);
#else
return NPERR_NO_ERROR;
@@ -250,7 +250,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void* value) {
NPError err = NPERR_NO_ERROR;
switch (variable) {
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
case NPPVpluginNameString:
*((const char**)value) = "Pepper Test PlugIn";
break;
@@ -282,7 +282,7 @@ NPError NPP_SetValue(NPP instance, NPNVariable variable, void* value) {
return NPERR_GENERIC_ERROR;
}
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
NPError API_CALL NP_GetValue(NPP instance, NPPVariable variable, void* value) {
return NPP_GetValue(instance, variable, value);
}
diff --git a/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp b/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp
index 2bd0041..fa535a5 100644
--- a/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp
+++ b/webkit/tools/pepper_test_plugin/pepper_test_plugin.gyp
@@ -54,13 +54,13 @@
# it.
'cflags!': ['-gstabs'],
}],
- ['OS=="linux" and (target_arch=="x64" or target_arch=="arm") and linux_fpic!=1', {
+ ['OS=="linux" or OS=="openbsd" or OS=="freebsd" and (target_arch=="x64" or target_arch=="arm") and linux_fpic!=1', {
'product_name': 'pepper_test_plugin',
# Shared libraries need -fPIC on x86-64
'cflags': ['-fPIC'],
'defines': ['INDEPENDENT_PLUGIN'],
}, {
- # Dependencies for all other OS/CPU combinations except the Linux ones above
+ # Dependencies for all other OS/CPU combinations except those above
'dependencies': [
'../../../base/base.gyp:base',
'../../../skia/skia.gyp:skia',
diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc
index 9cc100f..de2d664 100644
--- a/webkit/tools/test_shell/event_sending_controller.cc
+++ b/webkit/tools/test_shell/event_sending_controller.cc
@@ -159,9 +159,9 @@ bool ApplyKeyModifier(const std::wstring& arg, WebInputEvent* event) {
event->modifiers |= WebInputEvent::ShiftKey;
} else if (!wcscmp(arg_string, L"altKey")) {
event->modifiers |= WebInputEvent::AltKey;
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if !defined(OS_MACOSX)
// On Windows all keys with Alt modifier will be marked as system key.
- // We keep the same behavior on Linux, see:
+ // We keep the same behavior on Linux and everywhere non-Mac, see:
// third_party/WebKit/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
// If we want to change this behavior on Linux, this piece of code must be
// kept in sync with the related code in above file.
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 2f3fa75..a569eba 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -450,12 +450,12 @@ void LayoutTestController::Reset() {
if (shell_) {
shell_->webView()->setZoomLevel(false, 0);
shell_->webView()->setTabKeyCyclesThroughElements(true);
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_GTK)
// (Constants copied because we can't depend on the header that defined
// them from this file.)
shell_->webView()->setSelectionColors(
0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232);
-#endif // defined(OS_LINUX)
+#endif // defined(TOOLKIT_GTK)
shell_->webView()->removeAllUserContent();
}
dump_as_text_ = false;
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index d40cac0..7e4c4c1 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -673,7 +673,7 @@
],
},
}],
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources!': [
# Needs simple event record type porting
'../../glue/plugins/test/plugin_windowless_test.cc',