diff options
author | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 00:53:03 +0000 |
---|---|---|
committer | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 00:53:03 +0000 |
commit | 6981f7fbffeccc0f691270627d269cb777e86c93 (patch) | |
tree | 849333c44b75e3f0e08f0c137f6c37fb39d212d1 /chrome | |
parent | d92d3ce3a7a8ed672d2a4b97e455032ff8fcf57c (diff) | |
download | chromium_src-6981f7fbffeccc0f691270627d269cb777e86c93.zip chromium_src-6981f7fbffeccc0f691270627d269cb777e86c93.tar.gz chromium_src-6981f7fbffeccc0f691270627d269cb777e86c93.tar.bz2 |
BSD port: Another chunk of chrome/ ifdef changes
Review URL: http://codereview.chromium.org/652186
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/js_modal_dialog.h | 5 | ||||
-rw-r--r-- | chrome/browser/plugin_process_host.h | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/backing_store_x.cc | 8 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter.h | 6 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_prepopulate_data.cc | 2 | ||||
-rwxr-xr-x | chrome/browser/sync/engine/syncapi.cc | 8 | ||||
-rwxr-xr-x | chrome/chrome_renderer.gypi | 6 | ||||
-rw-r--r-- | chrome/common/plugin_messages_internal.h | 4 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 10 |
9 files changed, 32 insertions, 19 deletions
diff --git a/chrome/browser/js_modal_dialog.h b/chrome/browser/js_modal_dialog.h index 1ec75ac..51b9c81 100644 --- a/chrome/browser/js_modal_dialog.h +++ b/chrome/browser/js_modal_dialog.h @@ -34,10 +34,10 @@ class JavaScriptAppModalDialog : public AppModalDialog, virtual ~JavaScriptAppModalDialog(); // AppModalDialog overrides. -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_POSIX) virtual void CreateAndShowDialog(); #endif -#if defined(OS_LINUX) +#if defined(TOOLKIT_USES_GTK) virtual void HandleDialogResponse(GtkDialog* dialog, gint response_id); #endif virtual int GetDialogButtons(); @@ -99,4 +99,3 @@ class JavaScriptAppModalDialog : public AppModalDialog, }; #endif // CHROME_BROWSER_JS_MODAL_DIALOG_H_ - diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h index 3140c9b..079ca85 100644 --- a/chrome/browser/plugin_process_host.h +++ b/chrome/browser/plugin_process_host.h @@ -118,7 +118,7 @@ class PluginProcessHost : public ChildProcessHost, gfx::NativeWindow caller_window); #endif -#if defined(OS_LINUX) +#if defined(USE_X11) void OnMapNativeViewId(gfx::NativeViewId id, gfx::PluginWindowHandle* output); #endif diff --git a/chrome/browser/renderer_host/backing_store_x.cc b/chrome/browser/renderer_host/backing_store_x.cc index 1738f83..4ef8bb3 100644 --- a/chrome/browser/renderer_host/backing_store_x.cc +++ b/chrome/browser/renderer_host/backing_store_x.cc @@ -10,6 +10,10 @@ #include <sys/ipc.h> #include <sys/shm.h> +#if defined(OS_OPENBSD) || defined(OS_FREEBSD) +#include <sys/endian.h> +#endif + #include <algorithm> #include <utility> @@ -57,7 +61,11 @@ BackingStoreX::BackingStoreX(RenderWidgetHost* widget, visual_(visual), visual_depth_(depth), root_window_(x11_util::GetX11RootWindow()) { +#if defined(OS_OPENBSD) || defined(OS_FREEBSD) + COMPILE_ASSERT(_BYTE_ORDER == _LITTLE_ENDIAN, assumes_little_endian); +#else COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN, assumes_little_endian); +#endif pixmap_ = XCreatePixmap(display_, root_window_, size.width(), size.height(), depth); diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 347c3e5..65f34c6 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -62,7 +62,7 @@ struct WebScreenInfo; } struct ViewHostMsg_ScriptedPrint_Params; -#if defined(OS_LINUX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) struct ViewHostMsg_DidPrintPage_Params; #endif @@ -238,7 +238,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, base::SharedMemoryHandle* browser_handle); #endif -#if defined(OS_LINUX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) // Used to ask the browser allocate a temporary file for the renderer // to fill in resulting PDF in renderer. void OnAllocateTempFileForPrinting(IPC::Message* reply_msg); @@ -319,7 +319,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, void OnTranslateText(ViewHostMsg_TranslateTextParam param); -#if defined(OS_LINUX) +#if defined(USE_X11) void SendDelayedReply(IPC::Message* reply_msg); void DoOnGetScreenInfo(gfx::NativeViewId view, IPC::Message* reply_msg); void DoOnGetWindowRect(gfx::NativeViewId view, IPC::Message* reply_msg); diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc index 91088ab..9bc6632 100644 --- a/chrome/browser/search_engines/template_url_prepopulate_data.cc +++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc @@ -2321,7 +2321,7 @@ int GetCurrentCountryID() { static_cast<char>(isobuf[1])); } -#elif defined(OS_LINUX) +#elif defined(OS_POSIX) int GetCurrentCountryID() { const char* locale = setlocale(LC_MESSAGES, NULL); diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index df0f540..7027453 100755 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -102,10 +102,6 @@ struct AddressWatchTaskParams { HANDLE exit_flag; AddressWatchTaskParams() : conn_mgr(NULL), exit_flag() {} -#elif defined(OS_LINUX) - int exit_pipe[2]; - - AddressWatchTaskParams() : conn_mgr(NULL) {} #elif defined(OS_MACOSX) // Protects run_loop and run_loop_initialized. Lock run_loop_lock; @@ -120,6 +116,10 @@ struct AddressWatchTaskParams { run_loop(NULL), run_loop_initialized(false), params_set(&run_loop_lock) {} +#elif defined(OS_POSIX) + int exit_pipe[2]; + + AddressWatchTaskParams() : conn_mgr(NULL) {} #endif private: diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index 5e735a7..2e8969d 100755 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -189,6 +189,12 @@ '../sandbox/sandbox.gyp:sandbox', ], }], + # BSD-specific rules. + ['OS=="openbsd" or OS=="freebsd"', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], + }], # Windows-specific rules. ['OS=="win"', { 'include_dirs': [ diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h index 1f8dd54..3a5594c 100644 --- a/chrome/common/plugin_messages_internal.h +++ b/chrome/common/plugin_messages_internal.h @@ -121,8 +121,8 @@ IPC_BEGIN_MESSAGES(PluginProcessHost) HWND /* caller window */) #endif -#if defined(OS_LINUX) - // On Linux, the mapping between NativeViewId and X window ids +#if defined(USE_X11) + // On X11, the mapping between NativeViewId and X window ids // is known only to the browser. This message lets the plugin process // ask about a NativeViewId that was provided by the renderer. // It will get 0 back if it's a bogus input. diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 4188b3b..d511825 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -122,7 +122,7 @@ // TODO(port): these files are currently Windows only because they concern: // * theming #include "app/gfx/native_theme_win.h" -#elif defined(OS_LINUX) +#elif defined(USE_X11) #include "third_party/WebKit/WebKit/chromium/public/linux/WebRenderTheme.h" #endif @@ -1646,7 +1646,7 @@ void RenderView::setInputMethodEnabled(bool enabled) { } void RenderView::didChangeSelection(bool is_empty_selection) { -#if defined(OS_LINUX) +#if defined(USE_X11) if (!handling_input_event_) return; // TODO(estade): investigate incremental updates to the selection so that we @@ -3007,14 +3007,14 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate( } void RenderView::CreatedPluginWindow(gfx::PluginWindowHandle window) { -#if defined(OS_LINUX) +#if defined(USE_X11) RenderThread::current()->Send(new ViewHostMsg_CreatePluginContainer( routing_id(), window)); #endif } void RenderView::WillDestroyPluginWindow(gfx::PluginWindowHandle window) { -#if defined(OS_LINUX) +#if defined(USE_X11) RenderThread::current()->Send(new ViewHostMsg_DestroyPluginContainer( routing_id(), window)); #endif @@ -3631,7 +3631,7 @@ void RenderView::OnDisableScrollbarsForSmallWindows( void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) { renderer_preferences_ = renderer_prefs; UpdateFontRenderingFromRendererPrefs(); -#if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) +#if defined(TOOLKIT_GTK) WebColorName name = WebKit::WebColorWebkitFocusRingColor; WebKit::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1); WebKit::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); |