diff options
author | Rene Ladan <rene@FreeBSD.org> | 2010-11-13 09:22:45 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2010-11-13 09:22:45 +0000 |
commit | 73d79ddb86cf21d4c3835fbcf4cf775437fde73b (patch) | |
tree | 6ec27166aedcc647d1ff00512537a9e18de3af9e /www | |
parent | 7c642d9fdcbf7aca1a0b3987939607577c478782 (diff) | |
download | ports-73d79ddb86cf21d4c3835fbcf4cf775437fde73b.tar.gz ports-73d79ddb86cf21d4c3835fbcf4cf775437fde73b.zip |
- Update to 6.0.472.63, again without the Courgette code
- Add option to depend on VP8 codec from ports
- Makefile cleanups
- Tested to work with --integrated-as by maintainer
PR: ports/152166
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=264471
Diffstat (limited to 'www')
-rw-r--r-- | www/chromium/Makefile | 38 | ||||
-rw-r--r-- | www/chromium/distinfo | 5 | ||||
-rw-r--r-- | www/chromium/files/patch-chromium | 3444 | ||||
-rw-r--r-- | www/chromium/files/patch-clang | 178 | ||||
-rw-r--r-- | www/chromium/files/patch-codecs | 187 | ||||
-rw-r--r-- | www/chromium/files/patch-thirdparty | 400 | ||||
-rw-r--r-- | www/chromium/pkg-plist | 91 |
7 files changed, 2303 insertions, 2040 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile index d9f2eb74a290..4f8cac40e8e9 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -7,7 +7,7 @@ PORTNAME= chromium DISTVERSIONPREFIX= courgette-redacted- -DISTVERSION= 5.0.375.127 +DISTVERSION= 6.0.472.63 CATEGORIES= www MASTER_SITES= http://chromium.hybridsource.org/old/ports/ \ CRITICAL @@ -15,8 +15,8 @@ MASTER_SITES= http://chromium.hybridsource.org/old/ports/ \ MAINTAINER= chromium@hybridsource.org COMMENT= A mostly BSD-licensed web browser based on WebKit and Gtk+ -BUILD_DEPENDS= flex:${PORTSDIR}/textproc/flex \ - gperf:${PORTSDIR}/devel/gperf \ +BUILD_DEPENDS= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \ + ${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf \ bash:${PORTSDIR}/shells/bash \ pkg-config:${PORTSDIR}/devel/pkg-config \ yasm:${PORTSDIR}/devel/yasm \ @@ -30,23 +30,26 @@ LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo \ Xss.1:${PORTSDIR}/x11/libXScrnSaver \ asound.2:${PORTSDIR}/audio/alsa-lib \ freetype.9:${PORTSDIR}/print/freetype2 \ - nss3.1:${PORTSDIR}/security/nss + nss3.1:${PORTSDIR}/security/nss \ + gnome-keyring.0:${PORTSDIR}/security/libgnome-keyring RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins ONLY_FOR_ARCHS= i386 amd64 -USE_BZIP2= yes +USE_XZ= yes USE_BISON= build USE_PYTHON= 2.6 # only needed at build time USE_PERL5_BUILD=yes USE_GMAKE= yes -USE_GCC= 4.2+ MAN1= chrome.1 USE_XORG= scrnsaverproto -USE_GNOME= glib20 gtk20 gconf2 +USE_GNOME= glib20 gtk20 gconf2 libxslt LICENSE_COMB= multi LICENSE= BSD LGPL21 MPL +DESKTOP_ENTRIES="Chromium" "${COMMENT}" "${DATADIR}/product_logo_48.png" \ + "chrome" "Application;Network;WebBrowser;" true + ALL_TARGET= chrome #user tunables showing defaults, some won't compile if changed @@ -59,14 +62,8 @@ GYP_DEFINES+= use_system_libxml=1 #GYP_DEFINES+= use_system_sqlite=0 #GYP_DEFINES+= use_system_zlib=1 -OPTIONS= CODECS "Compile and enable patented codecs like H.264" off - -DESKTOP_ENTRIES= "Chromium" \ - "${COMMENT}" \ - "${DATADIR}/product_logo_48.png" \ - "chrome" \ - "Application;Network;WebBrowser;" \ - "true" +OPTIONS= CODECS "Compile and enable patented codecs like H.264" off \ + VPX "Use system libvpx for VP8 codec" on .include <bsd.port.pre.mk> @@ -80,12 +77,19 @@ GYP_DEFINES+= ffmpeg_branding=Chrome GYP_DEFINES+= ffmpeg_branding=Chromium .endif +.if defined(WITH_VPX) +LIB_DEPENDS+= vpx:${PORTSDIR}/multimedia/libvpx +GYP_DEFINES+= use_system_vpx=1 +.endif + .if !defined(WITH_DEBUG) BUILDTYPE= Release .else BUILDTYPE= Debug .endif +#pull newer flex and gperf in from ports +MAKE_ENV+= PATH=${LOCALBASE}/bin:${PATH} MAKE_ENV+= BUILDTYPE=${BUILDTYPE} MAKE_JOBS_SAFE= yes STRIP= @@ -110,18 +114,18 @@ post-patch: ${WRKSRC}/v8/tools/gyp/v8.gyp @${REINPLACE_CMD} -e 's|/usr/bin/gcc|${CC}|' \ ${WRKSRC}/third_party/WebKit/WebCore/bindings/scripts/IDLParser.pm \ - ${WRKSRC}/third_party/WebKit/WebCore/css/make-css-file-arrays.pl \ ${WRKSRC}/third_party/WebKit/WebCore/dom/make_names.pl do-configure: cd ${WRKSRC} && \ - ${SETENV} GYP_GENERATORS="make" GYP_DEFINES="${GYP_DEFINES}" ${PYTHON_CMD} ./build/gyp_chromium chrome/chrome.gyp --depth ./ + GYP_DEFINES="${GYP_DEFINES}" ${PYTHON_CMD} ./build/gyp_chromium chrome/chrome.gyp --depth ./ do-install: ${MKDIR} ${DATADIR} ${INSTALL_MAN} ${WRKSRC}/out/${BUILDTYPE}/chrome.1 ${MANPREFIX}/man/man1 ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/chrome.pak ${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/product_logo_48.png ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/resources.pak ${DATADIR} ${INSTALL_SCRIPT} ${WRKSRC}/out/${BUILDTYPE}/chrome-wrapper ${DATADIR} ${INSTALL_SCRIPT} ${WRKSRC}/out/${BUILDTYPE}/xdg-settings ${DATADIR} .for f in chrome ffmpegsumo_nolink libffmpegsumo.so mksnapshot protoc diff --git a/www/chromium/distinfo b/www/chromium/distinfo index 68d6d86e52b8..0866dac769b2 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,3 +1,2 @@ -MD5 (chromium-courgette-redacted-5.0.375.127.tar.bz2) = 8f2677735d2e4b11f9935e1827d749e9 -SHA256 (chromium-courgette-redacted-5.0.375.127.tar.bz2) = bc9140746a97877ab5e5da405ee0e9fd1b6ceb86cefc56969d92d3365e74c0b1 -SIZE (chromium-courgette-redacted-5.0.375.127.tar.bz2) = 162104866 +SHA256 (chromium-courgette-redacted-6.0.472.63.tar.xz) = 94ffd913f3724570eaa4bc9c61b8c78e0fd66c6d3e4a39fe4c27bcd075c0a455 +SIZE (chromium-courgette-redacted-6.0.472.63.tar.xz) = 95188168 diff --git a/www/chromium/files/patch-chromium b/www/chromium/files/patch-chromium index 68eebb514d9a..4de14d7017cc 100644 --- a/www/chromium/files/patch-chromium +++ b/www/chromium/files/patch-chromium @@ -1,8 +1,8 @@ diff --git a/app/app_base.gypi b/app/app_base.gypi -index 2eaa8f6..afbd919 100644 +index adefed7..ee12622 100644 --- app/app_base.gypi +++ app/app_base.gypi -@@ -164,7 +164,7 @@ +@@ -194,7 +194,7 @@ 'surface/io_surface_support_mac.cc', 'surface/io_surface_support_mac.h', 'surface/transport_dib.h', @@ -11,21 +11,87 @@ index 2eaa8f6..afbd919 100644 'surface/transport_dib_mac.cc', 'surface/transport_dib_win.cc', 'table_model.cc', -diff --git a/app/resources/app_resources.grd b/app/resources/app_resources.grd -index 65ba81c..0091169 100644 ---- app/resources/app_resources.grd -+++ app/resources/app_resources.grd -@@ -31,7 +31,7 @@ - <include name="IDR_MINIMIZE_P" file="minimize_p.png" type="BINDATA" /> - </if> - -- <if expr="os == 'linux2' or os == 'freebsd7' or os == 'openbsd4'"> -+ <if expr="os == 'linux2' or os.find('bsd') != -1"> - <!-- Window controls for Linux/BSD, in the style of Metacity --> - <include name="IDR_CLOSE" file="linux_close.png" type="BINDATA" /> - <include name="IDR_CLOSE_H" file="linux_close_h.png" type="BINDATA" /> +@@ -296,7 +296,7 @@ + 'os_exchange_data.cc', + ], + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'sources': [ + 'gfx/gl/gl_context_egl.cc', + 'gfx/gl/gl_context_egl.h', +@@ -319,7 +319,6 @@ + 'link_settings': { + 'libraries': [ + '-lX11', +- '-ldl', + ], + }, + }, +diff --git a/app/gfx/gl/gl_bindings.h b/app/gfx/gl/gl_bindings.h +index e384bfd..2bf33de 100644 +--- app/gfx/gl/gl_bindings.h ++++ app/gfx/gl/gl_bindings.h +@@ -18,7 +18,7 @@ + // The standard OpenGL native extension headers are also included. + #if defined(OS_WIN) + #include <GL/wglext.h> +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + #include <GL/glx.h> + #include <GL/glxext.h> + +@@ -42,7 +42,7 @@ + typedef struct osmesa_context *OSMesaContext; + typedef void (*OSMESAproc)(); + +-#if defined(OS_WIN) || defined(OS_LINUX) ++#if defined(OS_WIN) || defined(OS_NIX) + + // Forward declare EGL types. + typedef unsigned int EGLBoolean; +@@ -65,7 +65,7 @@ typedef Pixmap EGLNativePixmapType; + typedef Window EGLNativeWindowType; + #endif + +-#endif // OS_WIN || OS_LINUX ++#endif // OS_WIN || OS_NIX + + #include "gl_bindings_autogen_gl.h" + #include "gl_bindings_autogen_osmesa.h" +@@ -73,7 +73,7 @@ typedef Window EGLNativeWindowType; + #if defined(OS_WIN) + #include "gl_bindings_autogen_egl.h" + #include "gl_bindings_autogen_wgl.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + #include "gl_bindings_autogen_egl.h" + #include "gl_bindings_autogen_glx.h" + #endif +diff --git a/app/gfx/gl/gl_context_egl.cc b/app/gfx/gl/gl_context_egl.cc +index 1d05eb0..c988081 100644 +--- app/gfx/gl/gl_context_egl.cc ++++ app/gfx/gl/gl_context_egl.cc +@@ -5,7 +5,7 @@ + #include <EGL/egl.h> + + #include "build/build_config.h" +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + #include "app/x11_util.h" + #define EGL_HAS_PBUFFERS 1 + #endif +@@ -28,7 +28,7 @@ bool BaseEGLContext::InitializeOneOff() { + if (initialized) + return true; + +-#ifdef OS_LINUX ++#ifdef OS_NIX + EGLNativeDisplayType native_display = x11_util::GetXDisplay(); + #else + EGLNativeDisplayType native_display = EGL_DEFAULT_DISPLAY; diff --git a/app/surface/transport_dib.h b/app/surface/transport_dib.h -index 7a60f08..5241873 100644 +index c392c5f..eb19d04 100644 --- app/surface/transport_dib.h +++ app/surface/transport_dib.h @@ -7,7 +7,7 @@ @@ -37,25 +103,25 @@ index 7a60f08..5241873 100644 #include "base/shared_memory.h" #endif -@@ -73,7 +73,7 @@ class TransportDIB { - // Returns a default, invalid handle, that is meant to indicate a missing - // Transport DIB. - static Handle DefaultHandleValue() { return NULL; } +@@ -80,7 +80,7 @@ class TransportDIB { + static int fake_handle = 10; + return reinterpret_cast<Handle>(fake_handle++); + } -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_FREEBSD) typedef base::SharedMemoryHandle Handle; // On Mac, the inode number of the backing file is used as an id. typedef base::SharedMemoryId Id; -@@ -81,7 +81,7 @@ class TransportDIB { - // Returns a default, invalid handle, that is meant to indicate a missing - // Transport DIB. - static Handle DefaultHandleValue() { return Handle(); } +@@ -95,7 +95,7 @@ class TransportDIB { + static int fake_handle = 10; + return Handle(fake_handle++, false); + } -#elif defined(USE_X11) +#elif defined(OS_LINUX) typedef int Handle; // These two ints are SysV IPC shared memory keys typedef int Id; -@@ -136,11 +136,12 @@ class TransportDIB { +@@ -161,11 +161,12 @@ class TransportDIB { private: TransportDIB(); @@ -163,10 +229,10 @@ index 0000000..b49ba71 + return x_shm_; +} diff --git a/app/surface/transport_dib_linux.cc b/app/surface/transport_dib_linux.cc -index 6c41a0c..a670938 100644 +index 26cad3f..b5feed5 100644 --- app/surface/transport_dib_linux.cc +++ app/surface/transport_dib_linux.cc -@@ -27,6 +27,9 @@ TransportDIB::TransportDIB() +@@ -28,6 +28,9 @@ TransportDIB::TransportDIB() TransportDIB::~TransportDIB() { if (address_ != kInvalidAddress) { shmdt(address_); @@ -176,7 +242,7 @@ index 6c41a0c..a670938 100644 address_ = kInvalidAddress; } -@@ -52,7 +55,13 @@ TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) { +@@ -53,7 +56,13 @@ TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) { // Here we mark the shared memory for deletion. Since we attached it in the // line above, it doesn't actually get deleted but, if we crash, this means // that the kernel will automatically clean it up for us. @@ -190,11 +256,32 @@ index 6c41a0c..a670938 100644 if (address == kInvalidAddress) return NULL; +diff --git a/app/test_suite.h b/app/test_suite.h +index 3a738b2..bf876dd 100644 +--- app/test_suite.h ++++ app/test_suite.h +@@ -48,14 +48,14 @@ class AppTestSuite : public TestSuite { + mac_util::SetOverrideAppBundlePath(path); + #endif // OS_MACOSX + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + FilePath pak_dir; + PathService::Get(base::DIR_MODULE, &pak_dir); + pak_dir = pak_dir.AppendASCII("app_unittests_strings"); + PathService::Override(app::DIR_LOCALES, pak_dir); + PathService::Override(app::FILE_RESOURCES_PAK, + pak_dir.AppendASCII("app_resources.pak")); +-#endif // OS_LINUX ++#endif // OS_NIX + + // Force unittests to run using en-US so if we test against string + // output, it'll pass regardless of the system language. diff --git a/base/base.gyp b/base/base.gyp -index 05f8a0f..607bf02 100644 +index d2c9a68..8d2e294 100644 --- base/base.gyp +++ base/base.gyp -@@ -221,6 +221,13 @@ +@@ -230,6 +230,13 @@ 'test/test_file_util_posix.cc', 'test/test_file_util_win.cc', ], @@ -209,77 +296,37 @@ index 05f8a0f..607bf02 100644 { 'target_name': 'test_support_perf', diff --git a/base/base.gypi b/base/base.gypi -index df96e51..b51b6df 100644 +index ff05d2a..307d902 100644 --- base/base.gypi +++ base/base.gypi -@@ -420,6 +420,9 @@ +@@ -319,8 +319,6 @@ + [ 'OS != "linux"', { + 'sources!': [ + # Not automatically excluded by the *linux.cc rules. +- 'gtk_util.cc', +- 'gtk_util.h', + 'linux_util.cc', + 'setproctitle_linux.c', + 'setproctitle_linux.h', +@@ -556,6 +554,9 @@ ], },], [ 'OS == "freebsd" or OS == "openbsd"', { -+ 'sources!': [ -+ 'process_linux.cc', -+ ], - 'link_settings': { - 'libraries': [ - '-L/usr/local/lib -lexecinfo', -diff --git a/base/base_paths_posix.cc b/base/base_paths_posix.cc -index e44028e..9551c73 100644 ---- base/base_paths_posix.cc -+++ base/base_paths_posix.cc -@@ -7,6 +7,9 @@ - #include "base/base_paths.h" - - #include <unistd.h> -+#if defined(OS_FREEBSD) -+#include <sys/sysctl.h> -+#endif - - #include "base/env_var.h" - #include "base/file_path.h" -@@ -23,8 +26,6 @@ namespace base { - const char kSelfExe[] = "/proc/self/exe"; - #elif defined(OS_SOLARIS) - const char kSelfExe[] = getexecname(); --#elif defined(OS_FREEBSD) --const char kSelfExe[] = "/proc/curproc/file"; - #endif - - bool PathProviderPosix(int key, FilePath* result) { -@@ -32,6 +33,7 @@ bool PathProviderPosix(int key, FilePath* result) { - switch (key) { - case base::FILE_EXE: - case base::FILE_MODULE: { // TODO(evanm): is this correct? -+#if defined(OS_LINUX) - char bin_dir[PATH_MAX + 1]; - int bin_dir_size = readlink(kSelfExe, bin_dir, PATH_MAX); - if (bin_dir_size < 0 || bin_dir_size > PATH_MAX) { -@@ -41,6 +43,26 @@ bool PathProviderPosix(int key, FilePath* result) { - bin_dir[bin_dir_size] = 0; - *result = FilePath(bin_dir); - return true; -+#elif defined(OS_FREEBSD) -+ char bin_dir[PATH_MAX + 1]; -+ int error, name[4]; -+ size_t length; -+ -+ name[0] = CTL_KERN; -+ name[1] = KERN_PROC; -+ name[2] = KERN_PROC_PATHNAME; -+ name[3] = -1; -+ -+ length = sizeof(bin_dir); -+ error = sysctl(name, 4, bin_dir, &length, NULL, 0); -+ if (error < 0 || length == 0 || strlen(bin_dir) == 0) { -+ NOTREACHED() << "Unable to resolve path."; -+ return false; -+ } -+ bin_dir[strlen(bin_dir)] = 0; -+ *result = FilePath(bin_dir); -+ return true; -+#endif - } - case base::DIR_SOURCE_ROOT: - // On POSIX, unit tests execute two levels deep from the source root. ++ 'sources!': [ ++ 'process_linux.cc', ++ ], + 'link_settings': { + 'libraries': [ + '-L/usr/local/lib -lexecinfo', +@@ -630,7 +631,7 @@ + }, + ], + }], +- [ 'OS == "linux" and internal_pdf', { ++ [ '(OS == "linux" or OS == "freebsd") and internal_pdf', { + 'targets': [ + { + 'target_name': 'base_fpic', diff --git a/base/debug_util_posix.cc b/base/debug_util_posix.cc index 110cb20..4894cc7 100644 --- base/debug_util_posix.cc @@ -295,18 +342,17 @@ index 110cb20..4894cc7 100644 } #endif // defined(OS_FREEBSD) -diff --git a/base/file_util_linux.cc b/base/file_util_linux.cc -index 0f9795e..bf9bd97 100644 ---- base/file_util_linux.cc -+++ base/file_util_linux.cc -@@ -25,7 +25,12 @@ bool GetTempDir(FilePath* path) { +diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc +index 434c859..10d3200 100644 +--- base/file_util_posix.cc ++++ base/file_util_posix.cc +@@ -777,7 +777,11 @@ bool GetTempDir(FilePath* path) { } bool GetShmemTempDir(FilePath* path) { +#if defined(OS_LINUX) *path = FilePath("/dev/shm"); +#else -+//BSD not sure this is the best way to do this but it works for now + *path = FilePath("/tmp"); +#endif return true; @@ -364,10 +410,10 @@ index e291117..a6f1486 100644 #endif } diff --git a/base/test/test_suite.h b/base/test/test_suite.h -index a8dfdeb..d20f63a 100644 +index ff6f131..17d52c0 100644 --- base/test/test_suite.h +++ base/test/test_suite.h -@@ -59,7 +59,7 @@ class TestSuite { +@@ -63,7 +63,7 @@ class TestSuite { #if defined(OS_POSIX) && !defined(OS_MACOSX) g_thread_init(NULL); gtk_init_check(&argc, &argv); @@ -417,10 +463,10 @@ index c0a7bee..32e215c 100644 #endif diff --git a/build/common.gypi b/build/common.gypi -index 6990fcf..b369814 100644 +index 8a9fd97..8f9abe4 100644 --- build/common.gypi +++ build/common.gypi -@@ -84,7 +84,7 @@ +@@ -106,7 +106,7 @@ 'linux_fpic%': 0, # Python version. @@ -429,12 +475,17 @@ index 6990fcf..b369814 100644 # Set ARM-v7 compilation flags 'armv7%': 0, -@@ -203,10 +203,10 @@ - 'linux_strip_binary%': 0, +@@ -208,7 +208,7 @@ + + # Whether proprietary audio/video codecs are assumed to be included with + # this build (only meaningful if branding!=Chrome). +- 'proprietary_codecs%': 0, ++ 'proprietary_codecs%': 1, - # Enable TCMalloc. -- 'linux_use_tcmalloc%': 0, -+ 'linux_use_tcmalloc%': 1, + # TODO(bradnelson): eliminate this when possible. + # To allow local gyp files to prevent release.vsprops from being included. +@@ -246,21 +246,21 @@ + 'linux_use_debugallocation%': 0, # Disable TCMalloc's heapchecker. - 'linux_use_heapchecker%': 0, @@ -442,7 +493,14 @@ index 6990fcf..b369814 100644 # Set to 1 to turn on seccomp sandbox by default. # (Note: this is ignored for official builds.) -@@ -217,7 +217,7 @@ + 'linux_use_seccomp_sandbox%': 0, + + # Set to 1 to link against libgnome-keyring instead of using dlopen(). +- 'linux_link_gnome_keyring%': 0, ++ 'linux_link_gnome_keyring%': 1, + + # Set to select the Title Case versions of strings in GRD files. + 'use_titlecase_in_grd_files%': 0, # Used to disable Native Client at compile time, for platforms where it # isn't supported @@ -451,7 +509,7 @@ index 6990fcf..b369814 100644 # Set Thumb compilation flags. 'arm_thumb%': 0, -@@ -232,7 +232,7 @@ +@@ -285,7 +285,7 @@ # This is used to tweak build flags for gcc 4.4. 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', # Figure out the python architecture to decide if we build pyauto. @@ -460,7 +518,7 @@ index 6990fcf..b369814 100644 'conditions': [ ['branding=="Chrome" or linux_chromium_breakpad==1', { 'linux_breakpad%': 1, -@@ -493,7 +493,7 @@ +@@ -576,7 +576,7 @@ ['exclude', '/(gtk|x11)_[^/]*\\.cc$'], ], }], @@ -469,8 +527,21 @@ index 6990fcf..b369814 100644 'sources/': [ ['exclude', '_linux(_unittest)?\\.cc$'], ['exclude', '/linux/'], +diff --git a/build/features_override.gypi b/build/features_override.gypi +index 2e19776..b12261d 100644 +--- build/features_override.gypi ++++ build/features_override.gypi +@@ -61,7 +61,7 @@ + 'enable_svg%': '<(enable_svg)', + 'enable_touch_events%': '<(enable_touch_events)', + 'conditions': [ +- ['OS=="win" or OS=="linux" or use_accelerated_compositing==1', { ++ ['OS=="win" or OS=="linux" or OS=="freebsd" or use_accelerated_compositing==1', { + 'feature_defines': [ + 'WTF_USE_ACCELERATED_COMPOSITING=1', + 'ENABLE_3D_RENDERING=1', diff --git a/build/linux/python_arch.sh b/build/linux/python_arch.sh -index f364469..ba2d747 100755 +index f364469..a6c3f43 100755 --- build/linux/python_arch.sh +++ build/linux/python_arch.sh @@ -1,4 +1,4 @@ @@ -494,24 +565,23 @@ index f364469..ba2d747 100755 echo unknown exit 0; diff --git a/build/linux/system.gyp b/build/linux/system.gyp -index 4176719..f67130e 100644 +index 876579a..23d1c6c 100644 --- build/linux/system.gyp +++ build/linux/system.gyp -@@ -13,7 +13,7 @@ - 'pkg-config': 'pkg-config' - }, - }], -- [ 'OS=="linux"', { -+ [ 'OS=="linux" or OS=="freebsd"', { - 'variables': { - # We use our own copy of libssl, although we still need to link against - # the rest of NSS. +@@ -283,7 +283,6 @@ + }, { + 'link_settings': { + 'libraries': [ +- '-ldl', + ], + }, + }], diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc -index 3f54f04..351fafc 100644 +index 9e3feb8..b8013fc 100644 --- chrome/app/chrome_dll_main.cc +++ chrome/app/chrome_dll_main.cc -@@ -62,7 +62,7 @@ - #include "base/nss_util.h" +@@ -71,7 +71,7 @@ + #include "app/x11_util.h" #endif -#if defined(OS_LINUX) @@ -519,45 +589,47 @@ index 3f54f04..351fafc 100644 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" #include "chrome/browser/zygote_host_linux.h" #endif -@@ -253,6 +253,7 @@ static void SetUpGLibLogHandler() { - } - } - -+#if defined(OS_LINUX) - static void AdjustLinuxOOMScore(const std::string& process_type) { - const int kMiscScore = 7; - const int kPluginScore = 10; -@@ -285,6 +286,7 @@ static void AdjustLinuxOOMScore(const std::string& process_type) { - if (score > -1) - base::AdjustOOMScore(base::GetCurrentProcId(), score); - } -+#endif // defined(OS_LINUX) - #endif // defined(OS_POSIX) && !defined(OS_MACOSX) - - // Register the invalid param handler and pure call handler to be able to -@@ -771,7 +773,7 @@ int ChromeMain(int argc, char** argv) { - NOTIMPLEMENTED(); +@@ -580,7 +580,7 @@ int ChromeMain(int argc, char** argv) { + browser_pid = base::GetCurrentProcId(); + #elif defined(OS_POSIX) + // On linux, we're in the zygote here; so we need the parent process' id. +- browser_pid = base::GetParentProcessId(base::GetCurrentProcId()); ++ //browser_pid = base::GetParentProcessId(base::GetCurrentProcId()); #endif + + #if defined(OS_POSIX) +@@ -819,7 +819,7 @@ int ChromeMain(int argc, char** argv) { + } else if (process_type == switches::kServiceProcess) { + rv = ServiceProcessMain(main_params); } else if (process_type.empty()) { -#if defined(OS_LINUX) +#if defined(OS_NIX) const char* sandbox_binary = NULL; struct stat st; -@@ -809,7 +811,7 @@ int ChromeMain(int argc, char** argv) { - // gtk_init() can change |argc| and |argv|. - gtk_init(&argc, &argv); +@@ -863,7 +863,7 @@ int ChromeMain(int argc, char** argv) { SetUpGLibLogHandler(); + + x11_util::SetX11ErrorHandlers(); -#endif // defined(OS_LINUX) +#endif // defined(OS_NIX) rv = BrowserMain(main_params); } else { diff --git a/chrome/app/chrome_exe_main_gtk.cc b/chrome/app/chrome_exe_main_gtk.cc -index 0ed9e15..28d2870 100644 +index fb3c332..d651fc3 100644 --- chrome/app/chrome_exe_main_gtk.cc +++ chrome/app/chrome_exe_main_gtk.cc -@@ -17,11 +17,11 @@ +@@ -4,7 +4,7 @@ + + #include "base/at_exit.h" + #include "base/process_util.h" +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if defined(OS_NIX) && !defined(OS_CHROMEOS) + #include "chrome/browser/first_run.h" + #endif + +@@ -20,11 +20,11 @@ extern "C" { int ChromeMain(int argc, const char** argv); @@ -571,7 +643,7 @@ index 0ed9e15..28d2870 100644 } int main(int argc, const char** argv) { -@@ -34,7 +34,7 @@ int main(int argc, const char** argv) { +@@ -37,7 +37,7 @@ int main(int argc, const char** argv) { // dependency on TCMalloc. Really, we ought to have our allocator shim code // implement this EnableTerminationOnOutOfMemory() function. Whateverz. This // works for now. @@ -581,7 +653,7 @@ index 0ed9e15..28d2870 100644 tc_set_new_mode(1); #endif diff --git a/chrome/app/chrome_main_uitest.cc b/chrome/app/chrome_main_uitest.cc -index 5ddfcca..a5cddb2 100644 +index 8d13b89..88a4a99 100644 --- chrome/app/chrome_main_uitest.cc +++ chrome/app/chrome_main_uitest.cc @@ -18,7 +18,7 @@ TEST_F(ChromeMainTest, AppLaunch) { @@ -594,40 +666,18 @@ index 5ddfcca..a5cddb2 100644 // sandbox helper. EXPECT_EQ(4, UITest::GetBrowserProcessCount()); diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd -index 02f9eca..2653791 100644 +index 610d54d..90f4437 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -2291,7 +2291,7 @@ each locale. --> - <message name="IDS_CREATE_SHORTCUTS_QUICK_LAUNCH_BAR_CHKBOX" desc="Label of the checkbox to create an application shortcut in quick launch bar."> - Quick launch bar - </message> -- <if expr="os == 'linux2' or os == 'openbsd4' or os=='freebsd6'"> -+ <if expr="os == 'linux2' or os.find('bsd') != -1"> - <message name="IDS_CREATE_SHORTCUTS_ERROR_TITLE" desc="Title of the error dialog box when creating an application shortcut failed."> - Failed to Create Application Shortcut - </message> -@@ -5660,7 +5660,7 @@ Keep your key file in a safe place. You will need it to create new versions of y - <message name="IDS_THEMES_GROUP_NAME" desc="The title of the themes group"> - Themes: - </message> -- <if expr="os == 'linux2' or os == 'openbsd4' or os == 'freebsd6'"> -+ <if expr="os == 'linux2' or os.find('bsd') != -1"> - <message name="IDS_APPEARANCE_GROUP_NAME" desc="In Title Case and without trailing colon: The title of the themes group"> - Appearance - </message> -diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd -index c591457..9c571f5 100644 ---- chrome/app/resources/locale_settings.grd -+++ chrome/app/resources/locale_settings.grd -@@ -590,7 +590,7 @@ - </message> - - <!-- The width and height for the "create application shortcuts error" dialog. --> -- <if expr="os == 'linux2' or os == 'openbsd4' or os == 'freebsd6'"> -+ <if expr="os == 'linux2' or os.find('bsd') != -1"> - <message name="IDS_CREATE_SHORTCUTS_ERROR_DIALOG_WIDTH_CHARS" use_name_for_id="true"> - 60 - </message> +@@ -8758,7 +8758,7 @@ Keep your key file in a safe place. You will need it to create new versions of y + Import bookmarks now... + </message> + +- <if expr="os == 'linux2' or os == 'openbsd4' or os=='freebsd6'"> ++ <if expr="os == 'linux2' or os.find('bsd') != -1"> + <!-- Linux proxy configuration fallback help --> + <message name="IDS_ABOUT_LINUX_PROXY_CONFIG_TITLE" desc="Title of HTML page shown on systems where system proxy configuration is unsupported."> + Proxy Configuration Help diff --git a/chrome/browser/app_modal_dialog.cc b/chrome/browser/app_modal_dialog.cc index e8f306d..c40701a 100644 --- chrome/browser/app_modal_dialog.cc @@ -655,10 +705,10 @@ index 92ac494..092d428 100644 #endif diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc -index 09eee48..71fbc94 100644 +index 364c599..548d8f2 100644 --- chrome/browser/browser.cc +++ chrome/browser/browser.cc -@@ -202,7 +202,7 @@ Browser::~Browser() { +@@ -254,7 +254,7 @@ Browser::~Browser() { BrowserList::RemoveBrowser(this); @@ -667,7 +717,7 @@ index 09eee48..71fbc94 100644 if (!BrowserList::HasBrowserWithProfile(profile_)) { // We're the last browser window with this profile. We need to nuke the // TabRestoreService, which will start the shutdown of the -@@ -586,7 +586,7 @@ string16 Browser::GetWindowTitleForCurrentTab() const { +@@ -757,7 +757,7 @@ string16 Browser::GetWindowTitleForCurrentTab() const { // On Mac or ChromeOS, we don't want to suffix the page title with // the application name. return title; @@ -676,7 +726,7 @@ index 09eee48..71fbc94 100644 int string_id = IDS_BROWSER_WINDOW_TITLE_FORMAT; // Don't append the app name to window titles on app frames and app popups if (type_ & TYPE_APP) -@@ -1161,9 +1161,9 @@ void Browser::ToggleFullscreenMode() { +@@ -1417,9 +1417,9 @@ void Browser::ToggleFullscreenMode() { UserMetrics::RecordAction(UserMetricsAction("ToggleFullscreen"), profile_); window_->SetFullscreen(!window_->IsFullscreen()); @@ -688,7 +738,7 @@ index 09eee48..71fbc94 100644 UpdateCommandsForFullscreenMode(window_->IsFullscreen()); #endif } -@@ -1377,7 +1377,7 @@ void Browser::OpenFile() { +@@ -1644,7 +1644,7 @@ void Browser::OpenFile() { void Browser::OpenCreateShortcutsDialog() { UserMetrics::RecordAction(UserMetricsAction("CreateShortcut"), profile_); @@ -697,7 +747,7 @@ index 09eee48..71fbc94 100644 TabContents* current_tab = GetSelectedTabContents(); DCHECK(current_tab && web_app::IsValidUrl(current_tab->GetURL())) << "Menu item should be disabled."; -@@ -1993,7 +1993,7 @@ void Browser::DuplicateContentsAt(int index) { +@@ -2295,7 +2295,7 @@ void Browser::DuplicateContentsAt(int index) { } void Browser::CloseFrameAfterDragSession() { @@ -706,28 +756,73 @@ index 09eee48..71fbc94 100644 // This is scheduled to run after we return to the message loop because // otherwise the frame will think the drag session is still active and ignore // the request. -diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd -index 48d09f9..3d94009 100644 ---- chrome/browser/browser_resources.grd -+++ chrome/browser/browser_resources.grd -@@ -13,13 +13,13 @@ without changes to the corresponding grd file. fbt1 --> - <includes> - <include name="IDR_ABOUT_VERSION_HTML" file="resources\about_version.html" flattenhtml="true" type="BINDATA" /> - -- <if expr="os == 'linux2' or os == 'freebsd7' or os == 'openbsd4'"> -+ <if expr="os == 'linux2' or os.find('bsd') != -1"> - <include name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory_linux.html" flattenhtml="true" type="BINDATA" /> - </if> - <if expr="os == 'darwin'"> - <include name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory_mac.html" flattenhtml="true" type="BINDATA" /> - </if> -- <if expr="os != 'linux2' and os != 'darwin' and os != 'freebsd' and os != 'openbsd'"> -+ <if expr="os != 'linux2' and os != 'darwin' and os.find('bsd') == -1"> - <include name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory.html" flattenhtml="true" type="BINDATA" /> - </if> +diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc +index 9607cad..516a755 100644 +--- chrome/browser/browser_about_handler.cc ++++ chrome/browser/browser_about_handler.cc +@@ -64,7 +64,7 @@ + #include "chrome/browser/zygote_host_linux.h" + #elif defined(OS_MACOSX) + #include "chrome/browser/cocoa/about_ipc_dialog.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + #include "chrome/browser/zygote_host_linux.h" + #endif + +@@ -106,7 +106,7 @@ const char kAboutPath[] = "about"; + const char kNetInternalsPath[] = "net-internals"; + const char kPluginsPath[] = "plugins"; + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + const char kLinuxProxyConfigPath[] = "linux-proxy-config"; + const char kSandboxPath[] = "sandbox"; + #endif +@@ -134,7 +134,7 @@ const char *kAllAboutPaths[] = { + kTcmallocPath, + kTermsPath, + kVersionPath, +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + kLinuxProxyConfigPath, + kSandboxPath, + #endif +@@ -521,7 +521,7 @@ std::string AboutStats() { + return data; + } + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + std::string AboutLinuxProxyConfig() { + std::string data; + data.append("<!DOCTYPE HTML>\n"); +@@ -898,7 +898,7 @@ void AboutSource::StartDataRequest(const std::string& path_raw, + } else if (path == kTermsPath) { + response = ResourceBundle::GetSharedInstance().GetRawDataResource( + IDR_TERMS_HTML).as_string(); +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + } else if (path == kLinuxProxyConfigPath) { + response = AboutLinuxProxyConfig(); + } else if (path == kSandboxPath) { +diff --git a/chrome/browser/browser_child_process_host.cc b/chrome/browser/browser_child_process_host.cc +index d700475..fe219d8 100644 +--- chrome/browser/browser_child_process_host.cc ++++ chrome/browser/browser_child_process_host.cc +@@ -25,9 +25,9 @@ + #include "chrome/common/result_codes.h" + #include "chrome/installer/util/google_update_settings.h" + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + #include "base/linux_util.h" +-#endif // OS_LINUX ++#endif // OS_NIX + #if defined(OS_POSIX) + // This is defined in chrome/browser/google_update_settings_posix.cc. It's the diff --git a/chrome/browser/browser_theme_provider.h b/chrome/browser/browser_theme_provider.h -index 0af39cb..86552e7 100644 +index 0cb4b15..8c2b0c7 100644 --- chrome/browser/browser_theme_provider.h +++ chrome/browser/browser_theme_provider.h @@ -129,7 +129,7 @@ class BrowserThemeProvider : public NonThreadSafe, @@ -739,7 +834,7 @@ index 0af39cb..86552e7 100644 // GdkPixbufs returned by GetPixbufNamed and GetRTLEnabledPixbufNamed are // shared instances owned by the theme provider and should not be freed. virtual GdkPixbuf* GetPixbufNamed(int id) const; -@@ -237,12 +237,12 @@ class BrowserThemeProvider : public NonThreadSafe, +@@ -241,12 +241,12 @@ class BrowserThemeProvider : public NonThreadSafe, // Remove preference values for themes that are no longer in use. void RemoveUnusedThemes(); @@ -754,27 +849,11 @@ index 0af39cb..86552e7 100644 typedef std::map<int, GdkPixbuf*> GdkPixbufMap; mutable GdkPixbufMap gdk_pixbufs_; #elif defined(OS_MACOSX) -diff --git a/chrome/browser/child_process_host.cc b/chrome/browser/child_process_host.cc -index 539670b..10b2c90 100644 ---- chrome/browser/child_process_host.cc -+++ chrome/browser/child_process_host.cc -@@ -26,9 +26,9 @@ - #include "chrome/common/result_codes.h" - #include "chrome/installer/util/google_update_settings.h" - --#if defined(OS_LINUX) -+#if defined(OS_NIX) - #include "base/linux_util.h" --#endif // OS_LINUX -+#endif // OS_NIX - - #if defined(OS_POSIX) - // This is defined in chrome/browser/google_update_settings_posix.cc. It's the diff --git a/chrome/browser/child_process_launcher.cc b/chrome/browser/child_process_launcher.cc -index 534368b..e7532e5 100644 +index 60215d5..57fd9d2 100644 --- chrome/browser/child_process_launcher.cc +++ chrome/browser/child_process_launcher.cc -@@ -16,7 +16,7 @@ +@@ -18,7 +18,7 @@ #if defined(OS_WIN) #include "chrome/common/sandbox_policy.h" @@ -783,7 +862,7 @@ index 534368b..e7532e5 100644 #include "base/singleton.h" #include "chrome/browser/crash_handler_host_linux.h" #include "chrome/browser/zygote_host_linux.h" -@@ -65,7 +65,7 @@ class ChildProcessLauncher::Context +@@ -41,7 +41,7 @@ class ChildProcessLauncher::Context public: Context() : starting_(true) @@ -792,7 +871,7 @@ index 534368b..e7532e5 100644 , zygote_(false) #endif { -@@ -135,7 +135,7 @@ class ChildProcessLauncher::Context +@@ -106,7 +106,7 @@ class ChildProcessLauncher::Context handle = sandbox::StartProcessWithAccess(cmd_line, exposed_dir); #elif defined(OS_POSIX) @@ -801,7 +880,7 @@ index 534368b..e7532e5 100644 if (use_zygote) { base::GlobalDescriptors::Mapping mapping; mapping.push_back(std::pair<uint32_t, int>(kPrimaryIPCChannel, ipcfd)); -@@ -155,7 +155,7 @@ class ChildProcessLauncher::Context +@@ -126,7 +126,7 @@ class ChildProcessLauncher::Context ipcfd, kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor)); @@ -810,7 +889,7 @@ index 534368b..e7532e5 100644 // On Linux, we need to add some extra file descriptors for crash handling // and the sandbox. bool is_renderer = -@@ -187,7 +187,7 @@ class ChildProcessLauncher::Context +@@ -158,7 +158,7 @@ class ChildProcessLauncher::Context sandbox_fd, kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor)); } @@ -819,7 +898,7 @@ index 534368b..e7532e5 100644 // Actually launch the app. bool launched; -@@ -214,20 +214,20 @@ class ChildProcessLauncher::Context +@@ -185,20 +185,20 @@ class ChildProcessLauncher::Context NewRunnableMethod( this, &ChildProcessLauncher::Context::Notify, @@ -843,7 +922,7 @@ index 534368b..e7532e5 100644 zygote_ = zygote; #endif if (client_) { -@@ -247,7 +247,7 @@ class ChildProcessLauncher::Context +@@ -218,7 +218,7 @@ class ChildProcessLauncher::Context ChromeThread::PROCESS_LAUNCHER, FROM_HERE, NewRunnableFunction( &ChildProcessLauncher::Context::TerminateInternal, @@ -852,7 +931,7 @@ index 534368b..e7532e5 100644 zygote_, #endif process_.handle())); -@@ -255,7 +255,7 @@ class ChildProcessLauncher::Context +@@ -226,7 +226,7 @@ class ChildProcessLauncher::Context } static void TerminateInternal( @@ -861,7 +940,7 @@ index 534368b..e7532e5 100644 bool zygote, #endif base::ProcessHandle handle) { -@@ -265,13 +265,13 @@ class ChildProcessLauncher::Context +@@ -236,13 +236,13 @@ class ChildProcessLauncher::Context process.Terminate(ResultCodes::NORMAL_EXIT); // On POSIX, we must additionally reap the child. #if defined(OS_POSIX) @@ -877,7 +956,7 @@ index 534368b..e7532e5 100644 { ProcessWatcher::EnsureProcessTerminated(handle); } -@@ -284,7 +284,7 @@ class ChildProcessLauncher::Context +@@ -255,7 +255,7 @@ class ChildProcessLauncher::Context base::Process process_; bool starting_; @@ -886,7 +965,7 @@ index 534368b..e7532e5 100644 bool zygote_; #endif }; -@@ -329,7 +329,7 @@ base::ProcessHandle ChildProcessLauncher::GetHandle() { +@@ -300,7 +300,7 @@ base::ProcessHandle ChildProcessLauncher::GetHandle() { bool ChildProcessLauncher::DidProcessCrash() { bool did_crash, child_exited; base::ProcessHandle handle = context_->process_.handle(); @@ -896,11 +975,29 @@ index 534368b..e7532e5 100644 did_crash = Singleton<ZygoteHost>()->DidProcessCrash(handle, &child_exited); } else diff --git a/chrome/browser/cookie_modal_dialog.h b/chrome/browser/cookie_modal_dialog.h -index 8e1d5e4..0139812 100644 +index 5308186..d9576bd 100644 --- chrome/browser/cookie_modal_dialog.h +++ chrome/browser/cookie_modal_dialog.h -@@ -64,7 +64,7 @@ class CookiePromptModalDialog : public AppModalDialog { - static void RegisterPrefs(PrefService* prefs); +@@ -13,7 +13,7 @@ + #include "chrome/browser/cookie_prompt_modal_dialog_delegate.h" + #include "googleurl/src/gurl.h" + +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + #include "app/gtk_signal.h" + #endif + +@@ -28,7 +28,7 @@ class NSWindow; + class HostContentSettingsMap; + class PrefService; + +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + typedef struct _GtkWidget GtkWidget; + typedef struct _GParamSpec GParamSpec; + #endif +@@ -73,7 +73,7 @@ class CookiePromptModalDialog : public AppModalDialog { + static void RegisterUserPrefs(PrefService* prefs); // AppModalDialog overrides. -#if defined(OS_LINUX) || defined(OS_MACOSX) @@ -908,16 +1005,16 @@ index 8e1d5e4..0139812 100644 virtual void CreateAndShowDialog(); #endif virtual int GetDialogButtons(); -@@ -97,7 +97,7 @@ class CookiePromptModalDialog : public AppModalDialog { +@@ -103,7 +103,7 @@ class CookiePromptModalDialog : public AppModalDialog { protected: // AppModalDialog overrides. virtual NativeDialog CreateNativeDialog(); -#if defined(OS_LINUX) +#if defined(TOOLKIT_GTK) virtual void HandleDialogResponse(GtkDialog* dialog, gint response_id); - #endif - -@@ -130,7 +130,7 @@ class CookiePromptModalDialog : public AppModalDialog { + CHROMEGTK_CALLBACK_1(CookiePromptModalDialog, + void, +@@ -140,7 +140,7 @@ class CookiePromptModalDialog : public AppModalDialog { // delegate could be deleted CookiePromptModalDialogDelegate* delegate_; @@ -925,12 +1022,12 @@ index 8e1d5e4..0139812 100644 +#if defined(TOOLKIT_GTK) // The "remember this choice" radio button in the dialog. GtkWidget* remember_radio_; - #endif + diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc -index 720d203..e5c0d04 100644 +index a3e064f..400ae31 100644 --- chrome/browser/download/download_util.cc +++ chrome/browser/download/download_util.cc -@@ -42,14 +42,14 @@ +@@ -43,14 +43,14 @@ #include "views/drag_utils.h" #endif @@ -947,7 +1044,7 @@ index 720d203..e5c0d04 100644 #if defined(OS_WIN) #include "app/os_exchange_data_provider_win.h" -@@ -335,7 +335,7 @@ void DragDownload(const DownloadItem* download, +@@ -329,7 +329,7 @@ void DragDownload(const DownloadItem* download, DWORD effects; DoDragDrop(OSExchangeDataProviderWin::GetIDataObject(data), drag_source.get(), DROPEFFECT_COPY | DROPEFFECT_LINK, &effects); @@ -956,7 +1053,7 @@ index 720d203..e5c0d04 100644 GtkWidget* root = gtk_widget_get_toplevel(view); if (!root) return; -@@ -346,13 +346,13 @@ void DragDownload(const DownloadItem* download, +@@ -340,13 +340,13 @@ void DragDownload(const DownloadItem* download, widget->DoDrag(data, DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_LINK); #endif // OS_WIN } @@ -973,10 +1070,10 @@ index 720d203..e5c0d04 100644 DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id) { DictionaryValue* file_value = new DictionaryValue(); diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc -index 7432102..c6cec8d 100644 +index cd040f8..ed24185 100644 --- chrome/browser/extensions/extension_process_manager.cc +++ chrome/browser/extensions/extension_process_manager.cc -@@ -49,10 +49,10 @@ ExtensionProcessManager::ExtensionProcessManager(Profile* profile) +@@ -51,10 +51,10 @@ ExtensionProcessManager::ExtensionProcessManager(Profile* profile) NotificationService::AllSources()); registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED, NotificationService::AllSources()); @@ -989,7 +1086,7 @@ index 7432102..c6cec8d 100644 registrar_.Add(this, NotificationType::APP_TERMINATING, NotificationService::AllSources()); #endif -@@ -271,7 +271,7 @@ void ExtensionProcessManager::Observe(NotificationType type, +@@ -285,7 +285,7 @@ void ExtensionProcessManager::Observe(NotificationType type, UnregisterExtensionProcess(host->id()); break; } @@ -998,37 +1095,28 @@ index 7432102..c6cec8d 100644 case NotificationType::BROWSER_CLOSED: { // Close background hosts when the last browser is closed so that they // have time to shutdown various objects on different threads. Our -@@ -281,7 +281,7 @@ void ExtensionProcessManager::Observe(NotificationType type, +@@ -295,7 +295,7 @@ void ExtensionProcessManager::Observe(NotificationType type, CloseBackgroundHosts(); break; } -#elif defined(OS_MACOSX) +#else case NotificationType::APP_TERMINATING: { - // Don't follow the behavior of having the last browser window closed - // being an indication that the app should close. -diff --git a/chrome/browser/find_bar_host_browsertest.cc b/chrome/browser/find_bar_host_browsertest.cc -index 8ac5a6c..1438b11 100644 ---- chrome/browser/find_bar_host_browsertest.cc -+++ chrome/browser/find_bar_host_browsertest.cc -@@ -706,7 +706,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, - - #if defined(TOOLKIT_VIEWS) - // Make sure Find box grabs the Esc accelerator and restores it again. --#if defined(OS_LINUX) -+#if defined(USE_X11) - // TODO(oshima): On Gtk/Linux, a focus out event is asynchronous and - // hiding a find bar does not immediately update the target - // accelerator. The last condition fails in most cases due to this -@@ -730,7 +730,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, - // GetNativeView / GetNativewWindow methods on BrowserWindow. - // See http://crbug.com/26873. - gfx::NativeView browser_view = browser()->window()->GetNativeHandle(); + CloseBackgroundHosts(); + break; +diff --git a/chrome/browser/first_run.h b/chrome/browser/first_run.h +index 6615d93..e582628 100644 +--- chrome/browser/first_run.h ++++ chrome/browser/first_run.h +@@ -139,7 +139,7 @@ class FirstRun { + // Import browser items in this process. The browser and the items to + // import are encoded int the command line. + static int ImportFromBrowser(Profile* profile, const CommandLine& cmdline); -#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_GTK) - gfx::NativeView browser_view = - GTK_WIDGET(browser()->window()->GetNativeHandle()); - #else ++#elif defined(OS_NIX) + static bool ImportBookmarks(const std::wstring& import_bookmarks_path); + #endif + diff --git a/chrome/browser/geolocation/empty_device_data_provider.cc b/chrome/browser/geolocation/empty_device_data_provider.cc index 9e9fc27..371c281 100644 --- chrome/browser/geolocation/empty_device_data_provider.cc @@ -1042,11 +1130,55 @@ index 9e9fc27..371c281 100644 // static template<> WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() { +diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc +index 883f9be..0506ff5 100644 +--- chrome/browser/gpu_process_host.cc ++++ chrome/browser/gpu_process_host.cc +@@ -15,7 +15,7 @@ + #include "chrome/common/render_messages.h" + #include "ipc/ipc_switches.h" + +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + #include "gfx/gtk_native_view_id_manager.h" + #endif + +@@ -168,7 +168,7 @@ void GpuProcessHost::OnControlMessageReceived(const IPC::Message& message) { + IPC_BEGIN_MESSAGE_MAP(GpuProcessHost, message) + IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, OnChannelEstablished) + IPC_MESSAGE_HANDLER(GpuHostMsg_SynchronizeReply, OnSynchronizeReply) +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + IPC_MESSAGE_HANDLER(GpuHostMsg_GetViewXID, OnGetViewXID) + #endif + IPC_MESSAGE_UNHANDLED_ERROR() +@@ -191,7 +191,7 @@ void GpuProcessHost::OnSynchronizeReply() { + queued_synchronization_replies_.pop(); + } + +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + void GpuProcessHost::OnGetViewXID(gfx::NativeViewId id, unsigned long* xid) { + GtkNativeViewManager* manager = Singleton<GtkNativeViewManager>::get(); + if (!manager->GetXIDForId(xid, id)) { +diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h +index a331f69..3d105d0 100644 +--- chrome/browser/gpu_process_host.h ++++ chrome/browser/gpu_process_host.h +@@ -84,7 +84,7 @@ class GpuProcessHost : public BrowserChildProcessHost { + void OnChannelEstablished(const IPC::ChannelHandle& channel_handle, + const GPUInfo& gpu_info); + void OnSynchronizeReply(); +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + void OnGetViewXID(gfx::NativeViewId id, unsigned long* xid); + #endif + diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc -index 7c9a7d0..20dd6f4 100644 +index 5c38d97..29a73d7 100644 --- chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc -@@ -18,7 +18,7 @@ +@@ -19,7 +19,7 @@ #include "chrome/common/url_constants.h" #include "grit/chromium_strings.h" @@ -1055,7 +1187,7 @@ index 7c9a7d0..20dd6f4 100644 #include "chrome/browser/zygote_host_linux.h" #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" #endif -@@ -73,7 +73,7 @@ void MemoryDetails::CollectChildInfoOnIOThread() { +@@ -74,7 +74,7 @@ void MemoryDetails::CollectChildInfoOnIOThread() { void MemoryDetails::CollectChildInfoOnUIThread() { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); @@ -1064,7 +1196,7 @@ index 7c9a7d0..20dd6f4 100644 const pid_t zygote_pid = Singleton<ZygoteHost>()->pid(); const pid_t sandbox_helper_pid = Singleton<RenderSandboxHostLinux>()->pid(); #endif -@@ -152,7 +152,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { +@@ -153,7 +153,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { } } @@ -1074,7 +1206,7 @@ index 7c9a7d0..20dd6f4 100644 process.type = ChildProcessInfo::ZYGOTE_PROCESS; } else if (process.pid == sandbox_helper_pid) { diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc -index 60e4bbe..8ea3cca 100644 +index 9117811..09b8c71 100644 --- chrome/browser/memory_purger.cc +++ chrome/browser/memory_purger.cc @@ -137,7 +137,7 @@ void MemoryPurger::PurgeBrowser() { @@ -1086,8 +1218,34 @@ index 60e4bbe..8ea3cca 100644 // Tell tcmalloc to release any free pages it's still holding. // // TODO(pkasting): A lot of the above calls kick off actions on other threads. +diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc +index 162be2c..e96b18f 100644 +--- chrome/browser/net/connection_tester.cc ++++ chrome/browser/net/connection_tester.cc +@@ -161,7 +161,7 @@ class ExperimentURLRequestContext : public URLRequestContext { + // Otherwise returns a network error code. + int CreateSystemProxyConfigService( + scoped_ptr<net::ProxyConfigService>* config_service) { +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + // TODO(eroman): This is not supported on Linux yet, because of how + // construction needs ot happen on the UI thread. + return net::ERR_NOT_IMPLEMENTED; +diff --git a/chrome/browser/notifications/balloon_collection_impl.h b/chrome/browser/notifications/balloon_collection_impl.h +index cb06230..cc907f1 100644 +--- chrome/browser/notifications/balloon_collection_impl.h ++++ chrome/browser/notifications/balloon_collection_impl.h +@@ -54,7 +54,7 @@ class BalloonCollectionImpl : public BalloonCollection + virtual void WillProcessMessage(const MSG& event) {} + virtual void DidProcessMessage(const MSG& event); + #endif +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + virtual void WillProcessEvent(GdkEvent* event) {} + virtual void DidProcessEvent(GdkEvent* event); + #endif diff --git a/chrome/browser/options_util.cc b/chrome/browser/options_util.cc -index 99f6d1e..a1a9cac 100644 +index 8bcf063..7d710d4 100644 --- chrome/browser/options_util.cc +++ chrome/browser/options_util.cc @@ -28,7 +28,7 @@ void OptionsUtil::ResetToDefaults(Profile* profile) { @@ -1100,55 +1258,61 @@ index 99f6d1e..a1a9cac 100644 prefs::kSSL2Enabled, prefs::kSSL3Enabled, diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc -index a012aea..fae088a 100644 +index bfd6539..5ea70a3 100644 --- chrome/browser/process_singleton_linux.cc +++ chrome/browser/process_singleton_linux.cc -@@ -667,14 +667,14 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( - return PROFILE_IN_USE; - } +@@ -281,23 +281,24 @@ void DisplayProfileInUseError(const std::string& lock_path, + } -- FilePath other_chrome_path(base::GetProcessExecutablePath(pid)); -+ /* FilePath other_chrome_path(base::GetProcessExecutablePath(pid)); - if (other_chrome_path.empty() || - other_chrome_path.BaseName() != - FilePath::FromWStringHack(chrome::kBrowserProcessExecutableName)) { - // Orphaned lockfile (no process with pid, or non-chrome process.) - UnlinkPath(lock_path_.value()); - return PROCESS_NONE; -- } -+ }*/ - - if (retries == timeout_seconds) { - // Retries failed. Kill the unresponsive chrome process and continue. -diff --git a/chrome/browser/renderer_host/backing_store_x.cc b/chrome/browser/renderer_host/backing_store_x.cc -index d88dca7..11281b6 100644 ---- chrome/browser/renderer_host/backing_store_x.cc -+++ chrome/browser/renderer_host/backing_store_x.cc -@@ -48,6 +48,9 @@ static void DestroySharedImage(Display* display, - XShmDetach(display, shminfo); - XDestroyImage(image); - shmdt(shminfo->shmaddr); -+#if defined(OS_FREEBSD) -+ shmctl(shminfo->shmid, IPC_RMID, 0); -+#endif + bool IsChromeProcess(pid_t pid) { +- FilePath other_chrome_path(base::GetProcessExecutablePath(pid)); ++/* FilePath other_chrome_path(base::GetProcessExecutablePath(pid)); + return (!other_chrome_path.empty() && + other_chrome_path.BaseName() == +- FilePath::FromWStringHack(chrome::kBrowserProcessExecutableName)); ++ FilePath::FromWStringHack(chrome::kBrowserProcessExecutableName));*/ ++ return true; } - BackingStoreX::BackingStoreX(RenderWidgetHost* widget, -@@ -304,7 +307,9 @@ bool BackingStoreX::CopyFromBackingStore(const gfx::Rect& rect, - } + // Return true if the given pid is one of our child processes. + // Assumes that the current pid is the root of all pids of the current instance. + bool IsSameChromeInstance(pid_t pid) { + pid_t cur_pid = base::GetCurrentProcId(); +- while (pid != cur_pid) { ++/* while (pid != cur_pid) { + pid = base::GetParentProcessId(pid); + if (pid < 0) + return false; + if (!IsChromeProcess(pid)) + return false; +- } ++ }*/ + return true; + } - void* mapped_memory = shmat(shminfo.shmid, NULL, SHM_RDONLY); -+#if !defined(OS_FREEBSD) - shmctl(shminfo.shmid, IPC_RMID, 0); +diff --git a/chrome/browser/renderer_host/backing_store_proxy.cc b/chrome/browser/renderer_host/backing_store_proxy.cc +index ba3538b..4388eb0 100644 +--- chrome/browser/renderer_host/backing_store_proxy.cc ++++ chrome/browser/renderer_host/backing_store_proxy.cc +@@ -46,8 +46,12 @@ void BackingStoreProxy::PaintToBackingStore( + process_id = process->GetHandle(); + #endif + ++#if defined(OS_FREEBSD) ++ int render_process_id = process->id(); +#endif - if (mapped_memory == (void*)-1) { - XDestroyImage(image); - return false; ++ + if (process_shim_->Send(new GpuMsg_PaintToBackingStore( +- routing_id_, process_id, bitmap, bitmap_rect, copy_rects))) { ++ routing_id_, render_process_id, bitmap, bitmap_rect, copy_rects))) { + // Message sent successfully, so the caller can not destroy the + // TransportDIB. OnDonePaintingToBackingStore will free it later. + *painted_synchronously = false; diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc -index 8f2e90c..d5ca1ca 100644 +index d6509e8..2211ef4 100644 --- chrome/browser/renderer_host/browser_render_process_host.cc +++ chrome/browser/renderer_host/browser_render_process_host.cc -@@ -312,11 +312,11 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process, +@@ -313,11 +313,11 @@ bool BrowserRenderProcessHost::Init(bool is_extensions_process, in_process_renderer_.reset(new RendererMainThread(channel_id)); base::Thread::Options options; @@ -1162,7 +1326,7 @@ index 8f2e90c..d5ca1ca 100644 // in-process plugins. options.message_loop_type = MessageLoop::TYPE_DEFAULT; #endif -@@ -698,13 +698,13 @@ TransportDIB* BrowserRenderProcessHost::MapTransportDIB( +@@ -736,13 +736,13 @@ TransportDIB* BrowserRenderProcessHost::MapTransportDIB( HANDLE section = win_util::GetSectionFromProcess( dib_id.handle, GetHandle(), false /* read write */); return TransportDIB::Map(section); @@ -1192,10 +1356,10 @@ index 21fa34d..22e53ed 100644 // one from a dib_id. transport_dib_ = TransportDIB::Create(100 * 100 * 4, 0); diff --git a/chrome/browser/renderer_host/render_sandbox_host_linux.cc b/chrome/browser/renderer_host/render_sandbox_host_linux.cc -index 53c736c..36baf1d 100644 +index 5824fc9..59c6fa5 100644 --- chrome/browser/renderer_host/render_sandbox_host_linux.cc +++ chrome/browser/renderer_host/render_sandbox_host_linux.cc -@@ -397,7 +397,12 @@ void RenderSandboxHostLinux::Init(const std::string& sandbox_path) { +@@ -644,7 +644,12 @@ void RenderSandboxHostLinux::Init(const std::string& sandbox_path) { // inherit some sockets. With PF_UNIX+SOCK_DGRAM, it can call sendmsg to send // a datagram to any (abstract) socket on the same system. With // SOCK_SEQPACKET, this is prevented. @@ -1209,10 +1373,10 @@ index 53c736c..36baf1d 100644 renderer_socket_ = fds[0]; const int browser_socket = fds[1]; diff --git a/chrome/browser/renderer_host/render_view_host_delegate.cc b/chrome/browser/renderer_host/render_view_host_delegate.cc -index f6a1c66..e6adf68 100644 +index 11f6168..78122cc 100644 --- chrome/browser/renderer_host/render_view_host_delegate.cc +++ chrome/browser/renderer_host/render_view_host_delegate.cc -@@ -10,7 +10,7 @@ +@@ -11,7 +11,7 @@ #include "googleurl/src/gurl.h" #include "webkit/glue/webpreferences.h" @@ -1222,7 +1386,7 @@ index f6a1c66..e6adf68 100644 #endif diff --git a/chrome/browser/renderer_host/render_widget_helper.cc b/chrome/browser/renderer_host/render_widget_helper.cc -index 5c379e7..52a6f7e 100644 +index e2cd531..9e603f7 100644 --- chrome/browser/renderer_host/render_widget_helper.cc +++ chrome/browser/renderer_host/render_widget_helper.cc @@ -58,7 +58,7 @@ RenderWidgetHelper::~RenderWidgetHelper() { @@ -1234,7 +1398,7 @@ index 5c379e7..52a6f7e 100644 ClearAllocatedDIBs(); #endif } -@@ -249,7 +249,7 @@ void RenderWidgetHelper::OnCreateWidgetOnUI( +@@ -257,7 +257,7 @@ void RenderWidgetHelper::OnCreateWidgetOnUI( host->CreateNewWidget(route_id, popup_type); } @@ -1244,10 +1408,10 @@ index 5c379e7..52a6f7e 100644 AutoLock locked(allocated_dibs_lock_); diff --git a/chrome/browser/renderer_host/render_widget_helper.h b/chrome/browser/renderer_host/render_widget_helper.h -index 53b336c..427c0cc 100644 +index d31bf66..ab08823 100644 --- chrome/browser/renderer_host/render_widget_helper.h +++ chrome/browser/renderer_host/render_widget_helper.h -@@ -108,7 +108,7 @@ class RenderWidgetHelper +@@ -109,7 +109,7 @@ class RenderWidgetHelper const base::TimeDelta& max_delay, IPC::Message* msg); @@ -1256,7 +1420,7 @@ index 53b336c..427c0cc 100644 // Given the id of a transport DIB, return a mapping to it or NULL on error. TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); #endif -@@ -127,7 +127,7 @@ class RenderWidgetHelper +@@ -130,7 +130,7 @@ class RenderWidgetHelper WebKit::WebPopupType popup_type, int* route_id); @@ -1265,7 +1429,7 @@ index 53b336c..427c0cc 100644 // Called on the IO thread to handle the allocation of a TransportDIB. If // |cache_in_browser| is |true|, then a copy of the shmem is kept by the // browser, and it is the caller's repsonsibility to call -@@ -177,7 +177,7 @@ class RenderWidgetHelper +@@ -182,7 +182,7 @@ class RenderWidgetHelper // Called on the IO thread to resume a cross-site response. void OnCrossSiteClosePageACK(ViewMsg_ClosePage_Params params); @@ -1275,20 +1439,20 @@ index 53b336c..427c0cc 100644 void ClearAllocatedDIBs(); diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc -index 5dc9bad..2dfce72 100644 +index 1920101..00afa22 100644 --- chrome/browser/renderer_host/render_widget_host.cc +++ chrome/browser/renderer_host/render_widget_host.cc -@@ -137,7 +137,7 @@ void RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) { - IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnMsgFocusedNodeChanged) - IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor) - IPC_MESSAGE_HANDLER(ViewHostMsg_ImeUpdateStatus, OnMsgImeUpdateStatus) +@@ -154,7 +154,7 @@ void RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) { + OnMsgImeCancelComposition) + IPC_MESSAGE_HANDLER(ViewHostMsg_GpuRenderingActivated, + OnMsgGpuRenderingActivated) -#if defined(OS_LINUX) +#if defined(OS_NIX) IPC_MESSAGE_HANDLER(ViewHostMsg_CreatePluginContainer, OnMsgCreatePluginContainer) IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyPluginContainer, -@@ -865,7 +865,7 @@ void RenderWidgetHost::OnMsgImeUpdateStatus(int control, - } +@@ -909,7 +909,7 @@ void RenderWidgetHost::OnMsgGpuRenderingActivated(bool activated) { + is_gpu_rendering_active_ = activated; } -#if defined(OS_LINUX) @@ -1297,12 +1461,12 @@ index 5dc9bad..2dfce72 100644 void RenderWidgetHost::OnMsgCreatePluginContainer(gfx::PluginWindowHandle id) { // TODO(piman): view_ can only be NULL with delayed view creation in diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h -index f8b8218..5e2c2e3 100644 +index 0b0e114..3430042 100644 --- chrome/browser/renderer_host/render_widget_host.h +++ chrome/browser/renderer_host/render_widget_host.h -@@ -445,7 +445,7 @@ class RenderWidgetHost : public IPC::Channel::Listener, - // having to bring in render_messages.h in a header file. - void OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect); +@@ -490,7 +490,7 @@ class RenderWidgetHost : public IPC::Channel::Listener, + + void OnMsgGpuRenderingActivated(bool activated); -#if defined(OS_LINUX) +#if defined(OS_NIX) @@ -1310,10 +1474,10 @@ index f8b8218..5e2c2e3 100644 void OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id); #elif defined(OS_MACOSX) diff --git a/chrome/browser/renderer_host/render_widget_host_unittest.cc b/chrome/browser/renderer_host/render_widget_host_unittest.cc -index e0ffe1a..20e062e 100644 +index 4ea8193..a8298a6 100644 --- chrome/browser/renderer_host/render_widget_host_unittest.cc +++ chrome/browser/renderer_host/render_widget_host_unittest.cc -@@ -369,7 +369,7 @@ TEST_F(RenderWidgetHostTest, ResizeThenCrash) { +@@ -400,7 +400,7 @@ TEST_F(RenderWidgetHostTest, ResizeThenCrash) { // Tests setting custom background TEST_F(RenderWidgetHostTest, Background) { @@ -1323,10 +1487,10 @@ index e0ffe1a..20e062e 100644 RenderWidgetHostView::CreateViewForWidget(host_.get())); host_->set_view(view.get()); diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h -index 7b516ed..9d7ab57 100644 +index 9a20af0..4b695b4 100644 --- chrome/browser/renderer_host/render_widget_host_view.h +++ chrome/browser/renderer_host/render_widget_host_view.h -@@ -209,7 +209,7 @@ class RenderWidgetHostView { +@@ -215,7 +215,7 @@ class RenderWidgetHostView { virtual void DrawAcceleratedSurfaceInstances(CGLContextObj context) = 0; #endif @@ -1336,10 +1500,10 @@ index 7b516ed..9d7ab57 100644 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0; #endif diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc -index 6119c18..e2a74a9 100644 +index 0418487..3cad76b 100644 --- chrome/browser/renderer_host/resource_message_filter.cc +++ chrome/browser/renderer_host/resource_message_filter.cc -@@ -498,7 +498,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { +@@ -542,7 +542,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { #if defined(OS_WIN) IPC_MESSAGE_HANDLER(ViewHostMsg_DuplicateSection, OnDuplicateSection) #endif @@ -1348,7 +1512,7 @@ index 6119c18..e2a74a9 100644 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocatePDFTransport, OnAllocateSharedMemoryBuffer) #endif -@@ -522,7 +522,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { +@@ -566,7 +566,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_ScriptedPrint, OnScriptedPrint) #endif @@ -1357,7 +1521,7 @@ index 6119c18..e2a74a9 100644 IPC_MESSAGE_HANDLER(ViewHostMsg_AllocTransportDIB, OnAllocTransportDIB) IPC_MESSAGE_HANDLER(ViewHostMsg_FreeTransportDIB, -@@ -1257,7 +1257,7 @@ void ResourceMessageFilter::OnRendererHistograms( +@@ -1306,7 +1306,7 @@ void ResourceMessageFilter::OnRendererHistograms( HistogramSynchronizer::DeserializeHistogramList(sequence_number, histograms); } @@ -1367,10 +1531,10 @@ index 6119c18..e2a74a9 100644 size_t size, bool cache_in_browser, TransportDIB::Handle* handle) { render_widget_helper_->AllocTransportDIB(size, cache_in_browser, handle); diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h -index a43af51..66e64a3 100644 +index a2b1c99..90220d5 100644 --- chrome/browser/renderer_host/test/test_render_view_host.h +++ chrome/browser/renderer_host/test/test_render_view_host.h -@@ -98,7 +98,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostView { +@@ -109,7 +109,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostView { #endif virtual void SetVisuallyDeemphasized(bool deemphasized) { } @@ -1379,6 +1543,24 @@ index a43af51..66e64a3 100644 virtual void CreatePluginContainer(gfx::PluginWindowHandle id) { } virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) { } #endif +diff --git a/chrome/browser/renderer_host/video_layer_proxy.cc b/chrome/browser/renderer_host/video_layer_proxy.cc +index 3df1d25..9a4341a 100644 +--- chrome/browser/renderer_host/video_layer_proxy.cc ++++ chrome/browser/renderer_host/video_layer_proxy.cc +@@ -33,8 +33,12 @@ void VideoLayerProxy::CopyTransportDIB(RenderProcessHost* process, + process_id = process->GetHandle(); + #endif + ++#if defined(OS_FREEBSD) ++ int render_process_id = process->id(); ++#endif ++ + if (process_shim_->Send(new GpuMsg_PaintToVideoLayer( +- routing_id_, process_id, bitmap, bitmap_rect))) { ++ routing_id_, render_process_id, bitmap, bitmap_rect))) { + } else { + // TODO(scherkus): what to do ?!?! + } diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc index dd29afc..6fcafe7 100644 --- chrome/browser/renderer_preferences_util.cc @@ -1411,7 +1593,7 @@ index dd29afc..6fcafe7 100644 } // renderer_preferences_util diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc -index 9bc6632..3739f23 100644 +index 67a5342..7f7dd38 100644 --- chrome/browser/search_engines/template_url_prepopulate_data.cc +++ chrome/browser/search_engines/template_url_prepopulate_data.cc @@ -4,7 +4,7 @@ @@ -1424,7 +1606,7 @@ index 9bc6632..3739f23 100644 #endif diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc -index 19d1730..83c5036 100644 +index cf46e37..7fbe364 100644 --- chrome/browser/shell_integration_linux.cc +++ chrome/browser/shell_integration_linux.cc @@ -131,6 +131,8 @@ void CreateShortcutOnDesktop(const FilePath& shortcut_filename, @@ -1436,24 +1618,24 @@ index 19d1730..83c5036 100644 int desktop_fd = open(desktop_path.value().c_str(), O_RDONLY | O_DIRECTORY); if (desktop_fd < 0) return; -@@ -156,6 +158,7 @@ void CreateShortcutOnDesktop(const FilePath& shortcut_filename, - } +@@ -159,6 +161,7 @@ void CreateShortcutOnDesktop(const FilePath& shortcut_filename, - HANDLE_EINTR(close(desktop_fd)); + if (HANDLE_EINTR(close(desktop_fd)) < 0) + PLOG(ERROR) << "close"; +#endif // !defined(OS_FREEBSD) } void CreateShortcutInApplicationsMenu(const FilePath& shortcut_filename, diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc -index 4776d8d..25049a5 100644 +index 0514781..760a8c4 100644 --- chrome/browser/shell_integration_unittest.cc +++ chrome/browser/shell_integration_unittest.cc -@@ -18,13 +18,13 @@ - #include "googleurl/src/gurl.h" - #include "testing/gtest/include/gtest/gtest.h" +@@ -20,13 +20,13 @@ --#if defined(OS_LINUX) -+#if defined(OS_NIX) + #if defined(OS_WIN) + #include "chrome/installer/util/browser_distribution.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) #include "base/env_var.h" -#endif // defined(OS_LINUX) +#endif // defined(OS_NIX) @@ -1466,10 +1648,10 @@ index 4776d8d..25049a5 100644 // Provides mock environment variables values based on a stored map. diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc -index 20ba481..92ae148 100644 +index ffc7bcd..e0b94d7 100644 --- chrome/browser/sync/engine/syncer_thread.cc +++ chrome/browser/sync/engine/syncer_thread.cc -@@ -221,7 +221,7 @@ void SyncerThread::ThreadMainLoop() { +@@ -257,7 +257,7 @@ void SyncerThread::ThreadMainLoop() { bool initial_sync_for_thread = true; bool continue_sync_cycle = false; @@ -1478,7 +1660,7 @@ index 20ba481..92ae148 100644 idle_query_.reset(new IdleQueryLinux()); #endif -@@ -300,7 +300,7 @@ void SyncerThread::ThreadMainLoop() { +@@ -340,7 +340,7 @@ void SyncerThread::ThreadMainLoop() { static_cast<int>(vault_.current_wait_interval_.poll_delta.InSeconds()), &user_idle_milliseconds, &continue_sync_cycle, nudged); } @@ -1487,7 +1669,7 @@ index 20ba481..92ae148 100644 idle_query_.reset(); #endif } -@@ -704,7 +704,7 @@ int SyncerThread::UserIdleTime() { +@@ -755,7 +755,7 @@ int SyncerThread::UserIdleTime() { } else { return idle_time / 1000000; // nano to milli } @@ -1497,10 +1679,10 @@ index 20ba481..92ae148 100644 return idle_query_->IdleTime(); } else { diff --git a/chrome/browser/sync/engine/syncer_thread.h b/chrome/browser/sync/engine/syncer_thread.h -index dddcac8..b6db53a 100644 +index a54ff7f..ad4e63b 100644 --- chrome/browser/sync/engine/syncer_thread.h +++ chrome/browser/sync/engine/syncer_thread.h -@@ -21,7 +21,7 @@ +@@ -22,7 +22,7 @@ #include "base/time.h" #include "base/waitable_event.h" #include "chrome/browser/sync/engine/all_status.h" @@ -1509,115 +1691,41 @@ index dddcac8..b6db53a 100644 #include "chrome/browser/sync/engine/idle_query_linux.h" #endif #include "chrome/browser/sync/sessions/sync_session.h" -@@ -310,7 +310,7 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>, +@@ -324,7 +324,7 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>, scoped_ptr<EventListenerHookup> directory_manager_hookup_; - scoped_ptr<EventListenerHookup> syncer_events_; + scoped_ptr<ChannelHookup<SyncerEvent> > syncer_events_; -#if defined(OS_LINUX) +#if defined(OS_NIX) // On Linux, we need this information in order to query idle time. scoped_ptr<IdleQueryLinux> idle_query_; #endif -diff --git a/chrome/browser/sync/notifier/base/nethelpers.cc b/chrome/browser/sync/notifier/base/nethelpers.cc -index e342479..f92b388 100644 ---- chrome/browser/sync/notifier/base/nethelpers.cc -+++ chrome/browser/sync/notifier/base/nethelpers.cc -@@ -16,7 +16,7 @@ hostent* SafeGetHostByName(const char* hostname, hostent* host, - if (!result) { - *herrno = WSAGetLastError(); - } --#elif OS_LINUX -+#elif OS_NIX - gethostbyname_r(hostname, host, buffer, buffer_len, &result, herrno); - #elif OS_MACOSX - result = getipnodebyname(hostname, AF_INET, AI_DEFAULT, herrno); -@@ -31,7 +31,7 @@ hostent* SafeGetHostByName(const char* hostname, hostent* host, - void FreeHostEnt(hostent* host) { - #if WIN32 - // No need to free anything, struct returned is static memory. --#elif OS_LINUX -+#elif OS_NIX - // No need to free anything, we pass in a pointer to a struct. - #elif OS_MACOSX - freehostent(host); -diff --git a/chrome/browser/sync/notifier/base/network_status_detector_task_mt.cc b/chrome/browser/sync/notifier/base/network_status_detector_task_mt.cc -index e9f5971..da4a1c3 100644 ---- chrome/browser/sync/notifier/base/network_status_detector_task_mt.cc -+++ chrome/browser/sync/notifier/base/network_status_detector_task_mt.cc -@@ -25,6 +25,7 @@ void NetworkStatusDetectorTaskMT::OnNetworkAliveDone( - - void NetworkStatusDetectorTaskMT::StartAsyncDetection( - PlatformNetworkInfo* previous_info) { -+#if !defined(OS_FREEBSD) - // Use the AsyncNetworkAlive to determine the network state (and changes in - // the network state). - AsyncNetworkAlive* network_alive = AsyncNetworkAlive::Create(); -@@ -37,6 +38,7 @@ void NetworkStatusDetectorTaskMT::StartAsyncDetection( - task->SignalWorkDone.connect( - this, &NetworkStatusDetectorTaskMT::OnNetworkAliveDone); - task->Start(); -+#endif - } - - NetworkStatusDetectorTask* NetworkStatusDetectorTask::Create( -diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc -index 595b3a3..4262520 100644 ---- chrome/browser/sync/sync_setup_flow.cc -+++ chrome/browser/sync/sync_setup_flow.cc -@@ -59,7 +59,7 @@ void FlowHandler::RegisterMessages() { - NewCallback(this, &FlowHandler::HandleUserClickedCustomize)); - // On OS X, the customize dialog is modal to the HTML window so we - // don't need to hook up the two functions below. --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_NIX) - dom_ui_->RegisterMessageCallback("ClickCustomizeOk", - NewCallback(this, &FlowHandler::ClickCustomizeOk)); - dom_ui_->RegisterMessageCallback("ClickCustomizeCancel", -diff --git a/chrome/browser/sync/sync_setup_flow.h b/chrome/browser/sync/sync_setup_flow.h -index 35ac55e..f7b8ec7 100644 ---- chrome/browser/sync/sync_setup_flow.h -+++ chrome/browser/sync/sync_setup_flow.h -@@ -15,7 +15,7 @@ - #include "chrome/browser/sync/sync_setup_wizard.h" - #if defined(OS_WIN) - #include "chrome/browser/views/options/customize_sync_window_view.h" --#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_USES_GTK) - #include "chrome/browser/gtk/options/customize_sync_window_gtk.h" - #elif defined(OS_MACOSX) - #include "chrome/browser/cocoa/sync_customize_controller_cppsafe.h" -@@ -87,7 +87,7 @@ class SyncSetupFlow : public HtmlDialogUIDelegate { - void OnUserClickedCustomize() { - #if defined(OS_WIN) - CustomizeSyncWindowView::Show(NULL, service_->profile()); --#elif defined(OS_LINUX) -+#elif defined(OS_NIX) - ShowCustomizeSyncWindow(service_->profile()); - #elif defined(OS_MACOSX) - DCHECK(html_dialog_window_); -@@ -98,7 +98,7 @@ class SyncSetupFlow : public HtmlDialogUIDelegate { - bool ClickCustomizeOk() { - #if defined(OS_WIN) - return CustomizeSyncWindowView::ClickOk(); --#elif defined(OS_LINUX) -+#elif defined(OS_NIX) - return CustomizeSyncWindowOk(); +diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/chrome/br +owser/sync/syncable/directory_backing_store.cc +index 048f016..9516bab 100644 +--- chrome/browser/sync/syncable/directory_backing_store.cc ++++ chrome/browser/sync/syncable/directory_backing_store.cc +@@ -303,13 +303,13 @@ bool DirectoryBackingStore::BeginLoad() { #else - return true; -@@ -106,7 +106,7 @@ class SyncSetupFlow : public HtmlDialogUIDelegate { - void ClickCustomizeCancel() { - #if defined(OS_WIN) - CustomizeSyncWindowView::ClickCancel(); --#elif defined(OS_LINUX) -+#elif defined(OS_NIX) - CustomizeSyncWindowCancel(); - #endif - } + UMA_HISTOGRAM_COUNTS_100("Sync.DirectoryOpenFailedNotWinMac", bucket); + +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if defined(OS_NIX) && !defined(OS_CHROMEOS) + UMA_HISTOGRAM_COUNTS_100("Sync.DirectoryOpenFailedLinux", bucket); + #elif defined(OS_CHROMEOS) + UMA_HISTOGRAM_COUNTS_100("Sync.DirectoryOpenFailedCros", bucket); + #else + UMA_HISTOGRAM_COUNTS_100("Sync.DirectoryOpenFailedOther", bucket); +-#endif // OS_LINUX && !OS_CHROMEOS ++#endif // OS_NIX && !OS_CHROMEOS + #endif // OS_WIN + return !failed_again; + } diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc -index 920090c..592e5e5 100644 +index 7c6cc71..29eac9a 100644 --- chrome/browser/sync/syncable/syncable.cc +++ chrome/browser/sync/syncable/syncable.cc -@@ -80,7 +80,7 @@ int64 Now() { +@@ -82,7 +82,7 @@ int64 Now() { LARGE_INTEGER n; memcpy(&n, &filetime, sizeof(filetime)); return n.QuadPart; @@ -1627,10 +1735,10 @@ index 920090c..592e5e5 100644 gettimeofday(&tv, NULL); return static_cast<int64>(tv.tv_sec); diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc -index 14eb26b..b82da15 100644 +index 10c8d7c..742e648 100644 --- chrome/browser/tab_contents/interstitial_page.cc +++ chrome/browser/tab_contents/interstitial_page.cc -@@ -483,7 +483,7 @@ void InterstitialPage::CancelForNavigation() { +@@ -487,7 +487,7 @@ void InterstitialPage::CancelForNavigation() { } void InterstitialPage::SetSize(const gfx::Size& size) { @@ -1640,23 +1748,23 @@ index 14eb26b..b82da15 100644 // (typically if there was an info-bar). if (render_view_host_->view()) diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc -index 9a4f951..5d81c54 100644 +index 37e2e01..6567331 100644 --- chrome/browser/tab_contents/render_view_context_menu.cc +++ chrome/browser/tab_contents/render_view_context_menu.cc -@@ -793,7 +793,7 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const { - WebContextMenuData::CheckableMenuItemEnabled; +@@ -879,7 +879,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { + return true; #endif // OS_MACOSX -#if defined(OS_LINUX) +#if defined(OS_NIX) - // Enable the input methods context menu if the content is editable. - // TODO(suzhe): It should not be enabled in password boxes. Anyway, - // it's not a big issue. + // TODO(suzhe): this should not be enabled for password fields. + case IDC_INPUT_METHODS_MENU: + return true; diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc -index b783b2c..9220304 100644 +index b5395cc..88ec57a 100644 --- chrome/browser/tab_contents/tab_contents.cc +++ chrome/browser/tab_contents/tab_contents.cc -@@ -322,7 +322,7 @@ TabContents::TabContents(Profile* profile, +@@ -334,7 +334,7 @@ TabContents::TabContents(Profile* profile, NotificationService::AllSources()); registrar_.Add(this, NotificationType::RENDER_WIDGET_HOST_DESTROYED, NotificationService::AllSources()); @@ -1665,7 +1773,7 @@ index b783b2c..9220304 100644 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, NotificationService::AllSources()); #endif -@@ -2872,7 +2872,7 @@ void TabContents::Observe(NotificationType type, +@@ -3006,7 +3006,7 @@ void TabContents::Observe(NotificationType type, break; } @@ -1675,10 +1783,10 @@ index b783b2c..9220304 100644 renderer_preferences_util::UpdateFromSystemSettings( &renderer_preferences_, profile()); diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc -index e9219a3..fa98ffe 100644 +index 6dfbc0c..4551285 100644 --- chrome/browser/task_manager_resource_providers.cc +++ chrome/browser/task_manager_resource_providers.cc -@@ -847,7 +847,7 @@ TaskManagerBrowserProcessResource::TaskManagerBrowserProcessResource() +@@ -839,7 +839,7 @@ TaskManagerBrowserProcessResource::TaskManagerBrowserProcessResource() default_icon_ = IconUtil::CreateSkBitmapFromHICON(icon, icon_size); } } @@ -1687,64 +1795,46 @@ index e9219a3..fa98ffe 100644 if (!default_icon_) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); default_icon_ = rb.GetBitmapNamed(IDR_PRODUCT_LOGO_16); -diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc -index 62072f9..a0b8b7b 100644 ---- chrome/browser/unload_uitest.cc -+++ chrome/browser/unload_uitest.cc -@@ -166,7 +166,7 @@ class UnloadTest : public UITest { - } +diff --git a/chrome/browser/views/accessible_view_helper.cc b/chrome/browser/views/accessible_view_helper.cc +index f173761..89c639e 100644 +--- chrome/browser/views/accessible_view_helper.cc ++++ chrome/browser/views/accessible_view_helper.cc +@@ -20,7 +20,7 @@ AccessibleViewHelper::AccessibleViewHelper( + if (!accessibility_event_router_->AddViewTree(view_tree_, profile)) + view_tree_ = NULL; - void ClickModalDialogButton(MessageBoxFlags::DialogButton button) { --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_NIX) - bool modal_dialog_showing = false; - MessageBoxFlags::DialogButton available_buttons; - EXPECT_TRUE(automation()->WaitForAppModalDialog()); -diff --git a/chrome/browser/views/app_launcher.cc b/chrome/browser/views/app_launcher.cc -index fd55086..63dde51 100644 ---- chrome/browser/views/app_launcher.cc -+++ chrome/browser/views/app_launcher.cc -@@ -36,7 +36,7 @@ - #if defined(OS_WIN) - #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h" - #include "chrome/browser/renderer_host/render_widget_host_view_win.h" --#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_USES_GTK) - #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" - #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + GtkWidget* widget = view_tree->GetWidget()->GetNativeView(); + widget_helper_.reset(new AccessibleWidgetHelper(widget, profile)); #endif -@@ -264,7 +264,7 @@ class NavigationBar : public views::View, - views::NativeViewHost* location_entry_view_; - #if defined(OS_WIN) - scoped_ptr<AutocompleteEditViewWin> location_entry_; --#elif defined(OS_LINUX) && defined(TOOLKIT_VIEWS) -+#elif defined(TOOLKIT_USES_GTK) && defined(TOOLKIT_VIEWS) - scoped_ptr<AutocompleteEditViewGtk> location_entry_; - #else - NOTIMPLEMENTED(); -@@ -396,7 +396,7 @@ AppLauncher::AppLauncher(Browser* browser) +diff --git a/chrome/browser/views/accessible_view_helper.h b/chrome/browser/views/accessible_view_helper.h +index 2d01238..584b91f 100644 +--- chrome/browser/views/accessible_view_helper.h ++++ chrome/browser/views/accessible_view_helper.h +@@ -14,7 +14,7 @@ + #include "chrome/browser/accessibility_events.h" + #include "chrome/browser/views/accessibility_event_router_views.h" - // On Windows, we'll create the RWHV HWND once we are attached as we need - // to be parented for CreateWindow to work. -#if defined(OS_LINUX) +#if defined(TOOLKIT_USES_GTK) - RenderWidgetHostViewGtk* view_gtk = - static_cast<RenderWidgetHostViewGtk*>(rwhv_); - view_gtk->InitAsChild(); -@@ -449,7 +449,7 @@ void AppLauncher::InfoBubbleClosing(InfoBubble* info_bubble, - } + #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" + #endif + +@@ -68,7 +68,7 @@ class AccessibleViewHelper { + std::string window_title_; + std::vector<views::View*> managed_views_; - void AppLauncher::RequestMove(const gfx::Rect& new_bounds) { -#if defined(OS_LINUX) +#if defined(TOOLKIT_USES_GTK) - // Invoking PositionChild results in a gtk signal that triggers attempting to - // to resize the window. We need to set the size request so that it resizes - // correctly when this happens. + scoped_ptr<AccessibleWidgetHelper> widget_helper_; + #endif + diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc -index b5e5f2a..0b4339a 100644 +index 564b080..8ebbc7e 100644 --- chrome/browser/views/bug_report_view.cc +++ chrome/browser/views/bug_report_view.cc -@@ -30,7 +30,7 @@ +@@ -39,7 +39,7 @@ #include "views/window/client_view.h" #include "views/window/window.h" @@ -1753,7 +1843,7 @@ index b5e5f2a..0b4339a 100644 #include "app/x11_util.h" #else #include "app/win_util.h" -@@ -98,7 +98,7 @@ void ShowBugReportView(views::Window* parent, +@@ -209,7 +209,7 @@ void ShowBugReportView(views::Window* parent, // rendered--do not re-render, and include windowed plugins). std::vector<unsigned char> *screenshot_png = new std::vector<unsigned char>; @@ -1762,17 +1852,8 @@ index b5e5f2a..0b4339a 100644 x11_util::GrabWindowSnapshot(parent->GetNativeWindow(), screenshot_png); #else win_util::GrabWindowSnapshot(parent->GetNativeWindow(), screenshot_png); -@@ -169,7 +169,7 @@ void BugReportView::SetupControl() { - - description_label_ = new views::Label( - l10n_util::GetString(IDS_BUGREPORT_DESCRIPTION_LABEL)); --#if defined(OS_LINUX) -+#if defined(TOOLKIT_GTK) - // TODO(davemoore) Remove this when gtk textfields support multiline. - description_text_ = new views::Textfield; - #else diff --git a/chrome/browser/views/content_blocked_bubble_contents.cc b/chrome/browser/views/content_blocked_bubble_contents.cc -index 79c4bbe..79be833 100644 +index bef80be..1cf055e 100644 --- chrome/browser/views/content_blocked_bubble_contents.cc +++ chrome/browser/views/content_blocked_bubble_contents.cc @@ -4,7 +4,7 @@ @@ -1794,7 +1875,7 @@ index 79c4bbe..79be833 100644 #endif } diff --git a/chrome/browser/views/create_application_shortcut_view.cc b/chrome/browser/views/create_application_shortcut_view.cc -index 0d3f6e2..2610a41 100644 +index b0a66b3..68d0002 100644 --- chrome/browser/views/create_application_shortcut_view.cc +++ chrome/browser/views/create_application_shortcut_view.cc @@ -267,7 +267,7 @@ void CreateApplicationShortcutView::Init() { @@ -1807,10 +1888,10 @@ index 0d3f6e2..2610a41 100644 l10n_util::GetString(IDS_CREATE_SHORTCUTS_MENU_CHKBOX), profile->GetPrefs()->GetBoolean(prefs::kWebAppCreateInAppsMenu)); diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc -index 3127813..b499837 100644 +index 348c86d..9318b17 100644 --- chrome/browser/views/download_item_view.cc +++ chrome/browser/views/download_item_view.cc -@@ -258,7 +258,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download, +@@ -261,7 +261,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download, // Extract the file extension (if any). FilePath filepath(download->original_name()); @@ -1819,7 +1900,7 @@ index 3127813..b499837 100644 std::wstring extension = base::SysNativeMBToWide(filepath.Extension()); #else std::wstring extension = filepath.Extension(); -@@ -267,7 +267,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download, +@@ -270,7 +270,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download, // Remove leading '.' if (extension.length() > 0) extension = extension.substr(1); @@ -1829,7 +1910,7 @@ index 3127813..b499837 100644 base::SysNativeMBToWide(filepath.BaseName().RemoveExtension().value()); #else diff --git a/chrome/browser/views/dropdown_bar_host.cc b/chrome/browser/views/dropdown_bar_host.cc -index 963a81e..40d95dc 100644 +index 4878e15..f396de6 100644 --- chrome/browser/views/dropdown_bar_host.cc +++ chrome/browser/views/dropdown_bar_host.cc @@ -20,7 +20,7 @@ @@ -1842,10 +1923,10 @@ index 963a81e..40d95dc 100644 #endif diff --git a/chrome/browser/views/extensions/extension_popup.cc b/chrome/browser/views/extensions/extension_popup.cc -index ab0032a..529d15b 100644 +index a669d69..81ab297 100644 --- chrome/browser/views/extensions/extension_popup.cc +++ chrome/browser/views/extensions/extension_popup.cc -@@ -22,7 +22,7 @@ +@@ -23,7 +23,7 @@ #include "views/widget/root_view.h" #include "views/window/window.h" @@ -1854,7 +1935,7 @@ index ab0032a..529d15b 100644 #include "views/widget/widget_gtk.h" #endif -@@ -97,7 +97,7 @@ ExtensionPopup::ExtensionPopup(ExtensionHost* host, +@@ -104,7 +104,7 @@ ExtensionPopup::ExtensionPopup(ExtensionHost* host, // The bubble chrome requires a separate window, so construct it here. if (BUBBLE_CHROME == popup_chrome_) { gfx::NativeView native_window = frame->GetNativeView(); @@ -1886,7 +1967,7 @@ index 0090bda..6d2ab07 100644 static_cast<RenderWidgetHostViewGtk*>(view); view_gtk->InitAsChild(); diff --git a/chrome/browser/views/find_bar_host_interactive_uitest.cc b/chrome/browser/views/find_bar_host_interactive_uitest.cc -index e0819e6..af68c0e 100644 +index 51080bf..25a661f 100644 --- chrome/browser/views/find_bar_host_interactive_uitest.cc +++ chrome/browser/views/find_bar_host_interactive_uitest.cc @@ -38,7 +38,7 @@ class FindInPageTest : public InProcessBrowserTest { @@ -1898,8 +1979,57 @@ index e0819e6..af68c0e 100644 gfx::NativeWindow window = browser_window->GetNativeHandle(); ASSERT_TRUE(window); GtkWidget* view = ViewIDUtil::GetWidget(GTK_WIDGET(window), view_id); +diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc +index ae78c3c..e1d8820 100644 +--- chrome/browser/views/find_bar_view.cc ++++ chrome/browser/views/find_bar_view.cc +@@ -80,7 +80,7 @@ static const int kDefaultCharWidth = 43; + + FindBarView::FindBarView(FindBarHost* host) + : DropdownBarView(host), +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + ignore_contents_changed_(false), + #endif + find_text_(NULL), +@@ -170,11 +170,11 @@ FindBarView::~FindBarView() { + } + + void FindBarView::SetFindText(const string16& find_text) { +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + ignore_contents_changed_ = true; + #endif + find_text_->SetText(find_text); +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + ignore_contents_changed_ = false; + #endif + } +@@ -441,7 +441,7 @@ void FindBarView::ButtonPressed( + + void FindBarView::ContentsChanged(views::Textfield* sender, + const string16& new_contents) { +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + // On gtk setting the text in the find view causes a notification. + if (ignore_contents_changed_) + return; +diff --git a/chrome/browser/views/find_bar_view.h b/chrome/browser/views/find_bar_view.h +index efedc94..8709304 100644 +--- chrome/browser/views/find_bar_view.h ++++ chrome/browser/views/find_bar_view.h +@@ -102,7 +102,7 @@ class FindBarView : public DropdownBarView, + // between us and the TabContentsView. + FindBarHost* find_bar_host() const; + +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + // In gtk we get changed signals if we programatically set the text. If we + // don't ignore them we run into problems. For example, switching tabs back + // to one with the find bar visible will cause a search to the next found diff --git a/chrome/browser/views/frame/app_panel_browser_frame_view.cc b/chrome/browser/views/frame/app_panel_browser_frame_view.cc -index 1437c50..bd21ef4 100644 +index 16ebec3..804ebde 100644 --- chrome/browser/views/frame/app_panel_browser_frame_view.cc +++ chrome/browser/views/frame/app_panel_browser_frame_view.cc @@ -21,7 +21,7 @@ @@ -1912,7 +2042,7 @@ index 1437c50..bd21ef4 100644 #endif diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc -index dba7844..1913b9c 100644 +index a34ab3a..e8d40e9 100644 --- chrome/browser/views/frame/browser_view.cc +++ chrome/browser/views/frame/browser_view.cc @@ -4,7 +4,7 @@ @@ -1924,25 +2054,16 @@ index dba7844..1913b9c 100644 #include <gtk/gtk.h> #endif -@@ -64,7 +64,7 @@ +@@ -67,7 +67,7 @@ #include "app/win_util.h" #include "chrome/browser/aeropeek_manager.h" - #include "chrome/browser/jumplist.h" + #include "chrome/browser/jumplist_win.h" -#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_GTK) - #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" ++#elif defined(TOOLKIT_USES_GTK) #include "chrome/browser/views/accelerator_table_gtk.h" #include "views/window/hit_test.h" -@@ -640,7 +640,7 @@ bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { - // BrowserView, BrowserWindow implementation: - - void BrowserView::Show() { -- #if defined(OS_LINUX) -+ #if defined(TOOLKIT_USES_GTK) - if (!accessible_widget_helper_.get()) { - accessible_widget_helper_.reset(new AccessibleWidgetHelper( - GTK_WIDGET(GetWindow()->GetNativeWindow()), browser_->profile())); -@@ -1027,7 +1027,7 @@ void BrowserView::ShowProfileErrorDialog(int message_id) { + #endif +@@ -1095,7 +1095,7 @@ void BrowserView::ShowProfileErrorDialog(int message_id) { std::wstring message = l10n_util::GetString(message_id); win_util::MessageBox(GetNativeHandle(), message, title, MB_OK | MB_ICONWARNING | MB_TOPMOST); @@ -1951,7 +2072,7 @@ index dba7844..1913b9c 100644 std::string title = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); std::string message = l10n_util::GetStringUTF8(message_id); GtkWidget* dialog = gtk_message_dialog_new(GetNativeHandle(), -@@ -1910,7 +1910,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen) { +@@ -2066,7 +2066,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen) { #endif // No need to invoke SetFullscreen for linux as this code is executed // once we're already fullscreen on linux. @@ -1960,33 +2081,11 @@ index dba7844..1913b9c 100644 // Updating of commands for fullscreen mode is called from SetFullScreen on // Wndows (see just above), but for ChromeOS, this method (ProcessFullScreen) // is called after full screen has happened successfully (via GTK's -diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h -index 8b6c120..05a8434 100644 ---- chrome/browser/views/frame/browser_view.h -+++ chrome/browser/views/frame/browser_view.h -@@ -56,7 +56,7 @@ class ZoomMenuModel; - #if defined(OS_WIN) - class AeroPeekManager; - class JumpList; --#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_USES_GTK) - class AccessibleWidgetHelper; - #endif - -@@ -573,7 +573,7 @@ class BrowserView : public BrowserBubbleHost, - - UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; - -- #if defined(OS_LINUX) -+ #if defined(TOOLKIT_USES_GTK) - scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; - #endif - diff --git a/chrome/browser/views/frame/browser_view_layout.cc b/chrome/browser/views/frame/browser_view_layout.cc -index 2b0f2e0..3d8e13a 100644 +index a332beb..df7cbfd 100644 --- chrome/browser/views/frame/browser_view_layout.cc +++ chrome/browser/views/frame/browser_view_layout.cc -@@ -19,7 +19,7 @@ +@@ -18,7 +18,7 @@ #include "gfx/scrollbar_size.h" #include "views/window/window.h" @@ -1996,7 +2095,7 @@ index 2b0f2e0..3d8e13a 100644 #endif diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc -index c91cb51..77397cf 100644 +index fc6f4de..25bc28f 100644 --- chrome/browser/views/frame/opaque_browser_frame_view.cc +++ chrome/browser/views/frame/opaque_browser_frame_view.cc @@ -32,7 +32,7 @@ @@ -2009,7 +2108,7 @@ index c91cb51..77397cf 100644 #endif diff --git a/chrome/browser/views/fullscreen_exit_bubble.cc b/chrome/browser/views/fullscreen_exit_bubble.cc -index c12326a..f7d9afb 100644 +index e216bd2..c889fae 100644 --- chrome/browser/views/fullscreen_exit_bubble.cc +++ chrome/browser/views/fullscreen_exit_bubble.cc @@ -17,7 +17,7 @@ @@ -2071,37 +2170,37 @@ index c9db5bb..3e0ca96 100644 #endif diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc -index e5c4858..5d3d833 100644 +index 34645a0..a0369fb 100644 --- chrome/browser/views/info_bubble.cc +++ chrome/browser/views/info_bubble.cc -@@ -216,7 +216,7 @@ void InfoBubble::Close() { +@@ -307,7 +307,7 @@ void InfoBubble::AnimationProgressed(const Animation* animation) { InfoBubble::InfoBubble() : -#if defined(OS_LINUX) +#if defined(TOOLKIT_GTK) WidgetGtk(TYPE_WINDOW), - #endif - delegate_(NULL), -@@ -237,7 +237,7 @@ void InfoBubble::Init(views::Window* parent, - set_window_style(WS_POPUP | WS_CLIPCHILDREN); - set_window_ex_style(WS_EX_TOOLWINDOW); - WidgetWin::Init(parent->GetNativeWindow(), gfx::Rect()); + border_contents_(NULL), + #elif defined(OS_WIN) +@@ -367,7 +367,7 @@ void InfoBubble::Init(views::Widget* parent, + WidgetWin::Init(border_->GetNativeView(), gfx::Rect()); + + SetWindowText(GetNativeView(), delegate_->accessible_name().c_str()); -#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_GTK) ++#elif defined(TOOLKIT_USES_GTK) MakeTransparent(); make_transient_to_parent(); - WidgetGtk::Init(GTK_WIDGET(parent->GetNativeWindow()), gfx::Rect()); -@@ -310,7 +310,7 @@ void InfoBubble::Init(views::Window* parent, - #if defined(OS_WIN) - border_->ShowWindow(SW_SHOW); + WidgetGtk::InitWithWidget(parent, gfx::Rect()); +@@ -439,7 +439,7 @@ void InfoBubble::Init(views::Widget* parent, ShowWindow(SW_SHOW); + if (fade_in) + FadeIn(); -#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_GTK) ++#elif defined(TOOLKIT_USES_GTK) views::WidgetGtk::Show(); #endif } -@@ -325,7 +325,7 @@ void InfoBubble::OnActivate(UINT action, BOOL minimized, HWND window) { +@@ -479,7 +479,7 @@ void InfoBubble::OnActivate(UINT action, BOOL minimized, HWND window) { GetRootView()->GetChildViewAt(0)->RequestFocus(); } } @@ -2110,7 +2209,7 @@ index e5c4858..5d3d833 100644 void InfoBubble::IsActiveChanged() { if (!IsActive()) Close(); -@@ -342,7 +342,7 @@ void InfoBubble::Close(bool closed_by_escape) { +@@ -498,7 +498,7 @@ void InfoBubble::DoClose(bool closed_by_escape) { #if defined(OS_WIN) border_->Close(); WidgetWin::Close(); @@ -2120,11 +2219,11 @@ index e5c4858..5d3d833 100644 #endif } diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h -index 90911b5..c6fd3b0 100644 +index 30b3719..a2d09dc 100644 --- chrome/browser/views/info_bubble.h +++ chrome/browser/views/info_bubble.h -@@ -9,7 +9,7 @@ - #include "views/accelerator.h" +@@ -12,7 +12,7 @@ + #include "chrome/browser/views/bubble_border.h" #if defined(OS_WIN) #include "views/widget/widget_win.h" -#elif defined(OS_LINUX) @@ -2132,7 +2231,7 @@ index 90911b5..c6fd3b0 100644 #include "views/widget/widget_gtk.h" #endif -@@ -88,7 +88,7 @@ class InfoBubbleDelegate { +@@ -174,7 +174,7 @@ class InfoBubbleDelegate { class InfoBubble #if defined(OS_WIN) : public views::WidgetWin, @@ -2140,8 +2239,8 @@ index 90911b5..c6fd3b0 100644 +#elif defined(TOOLKIT_GTK) : public views::WidgetGtk, #endif - public views::AcceleratorTarget { -@@ -128,7 +128,7 @@ class InfoBubble + public views::AcceleratorTarget, +@@ -248,7 +248,7 @@ class InfoBubble #if defined(OS_WIN) // Overridden from WidgetWin: virtual void OnActivate(UINT action, BOOL minimized, HWND window); @@ -2150,24 +2249,46 @@ index 90911b5..c6fd3b0 100644 // Overridden from WidgetGtk: virtual void IsActiveChanged(); #endif -diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc -index 324731f..1a67eb1 100644 ---- chrome/browser/views/location_bar_view.cc -+++ chrome/browser/views/location_bar_view.cc +@@ -256,7 +256,7 @@ class InfoBubble + #if defined(OS_WIN) + // The window used to render the padding, border and arrow. + BorderWidget* border_; +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + // The view displaying the border. + BorderContents* border_contents_; + #endif +diff --git a/chrome/browser/views/location_bar/location_bar_view.cc b/chrome/browser/views/location_bar/location_bar_view.cc +index 4dffa4e..0402591 100644 +--- chrome/browser/views/location_bar/location_bar_view.cc ++++ chrome/browser/views/location_bar/location_bar_view.cc @@ -4,7 +4,7 @@ - #include "chrome/browser/views/location_bar_view.h" + #include "chrome/browser/views/location_bar/location_bar_view.h" -#if defined(OS_LINUX) -+#if defined(TOOLKIT_GTK) ++#if defined(TOOLKIT_USES_GTK) #include <gtk/gtk.h> #endif +diff --git a/chrome/browser/views/location_bar/location_bar_view.h b/chrome/browser/views/location_bar/location_bar_view.h +index 84270dd..389d121 100644 +--- chrome/browser/views/location_bar/location_bar_view.h ++++ chrome/browser/views/location_bar/location_bar_view.h +@@ -357,7 +357,7 @@ class LocationBarView : public LocationBar, + // focused. Used when the toolbar is in full keyboard accessibility mode. + bool show_focus_rect_; + +-#if defined(OS_LINUX) ++#if defined(TOOLKIT_USES_GTK) + scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; + #endif + diff --git a/chrome/browser/views/notifications/balloon_view.cc b/chrome/browser/views/notifications/balloon_view.cc -index 3919d5e..a72e92e 100644 +index c89280b..7047f8f 100644 --- chrome/browser/views/notifications/balloon_view.cc +++ chrome/browser/views/notifications/balloon_view.cc -@@ -35,7 +35,7 @@ +@@ -37,7 +37,7 @@ #if defined(OS_WIN) #include "views/widget/widget_win.h" #endif @@ -2177,7 +2298,7 @@ index 3919d5e..a72e92e 100644 #endif diff --git a/chrome/browser/views/notifications/balloon_view_host.cc b/chrome/browser/views/notifications/balloon_view_host.cc -index bfb02fa..23f0e2b 100644 +index b2c2a5c..7c305da 100644 --- chrome/browser/views/notifications/balloon_view_host.cc +++ chrome/browser/views/notifications/balloon_view_host.cc @@ -10,14 +10,14 @@ @@ -2206,34 +2327,12 @@ index bfb02fa..23f0e2b 100644 RenderWidgetHostViewGtk* view_gtk = static_cast<RenderWidgetHostViewGtk*>(render_widget_host_view_); view_gtk->InitAsChild(); -diff --git a/chrome/browser/views/page_info_window_view.cc b/chrome/browser/views/page_info_window_view.cc -index 80d0db1..677a462 100644 ---- chrome/browser/views/page_info_window_view.cc -+++ chrome/browser/views/page_info_window_view.cc -@@ -35,7 +35,7 @@ - - #if defined(OS_WIN) - #include "app/win_util.h" --#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_GTK) - #include "chrome/browser/gtk/certificate_viewer.h" - #endif - -@@ -359,7 +359,7 @@ void PageInfoWindowView::ShowCertDialog(int cert_id) { - // This next call blocks but keeps processing windows messages, making it - // modal to the browser window. - BOOL rv = ::CryptUIDlgViewCertificate(&view_info, &properties_changed); --#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_GTK) - ShowCertificateViewer(window()->GetNativeWindow(), cert_id); - #else - NOTIMPLEMENTED(); diff --git a/chrome/browser/views/tabs/dragged_tab_view.cc b/chrome/browser/views/tabs/dragged_tab_view.cc -index 6b9306e..c973e01 100644 +index 5ee2626..cca2b27 100644 --- chrome/browser/views/tabs/dragged_tab_view.cc +++ chrome/browser/views/tabs/dragged_tab_view.cc -@@ -14,7 +14,7 @@ - #include "views/widget/widget.h" +@@ -11,7 +11,7 @@ + #if defined(OS_WIN) #include "views/widget/widget_win.h" -#elif defined(OS_LINUX) @@ -2242,10 +2341,10 @@ index 6b9306e..c973e01 100644 #endif diff --git a/chrome/browser/views/tabs/dragged_tab_view.h b/chrome/browser/views/tabs/dragged_tab_view.h -index 8e770e2..901662d 100644 +index f2ded5a..653ccd7 100644 --- chrome/browser/views/tabs/dragged_tab_view.h +++ chrome/browser/views/tabs/dragged_tab_view.h -@@ -17,7 +17,7 @@ +@@ -13,7 +13,7 @@ namespace views { #if defined(OS_WIN) class WidgetWin; @@ -2254,7 +2353,7 @@ index 8e770e2..901662d 100644 class WidgetGtk; #endif } -@@ -96,7 +96,7 @@ class DraggedTabView : public views::View, +@@ -70,7 +70,7 @@ class DraggedTabView : public views::View { // The window that contains the DraggedTabView. #if defined(OS_WIN) scoped_ptr<views::WidgetWin> container_; @@ -2264,10 +2363,10 @@ index 8e770e2..901662d 100644 #endif diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc -index 56bf512..4839daf 100644 +index 03cc42f..925d96b 100644 --- chrome/browser/views/tabs/tab_strip.cc +++ chrome/browser/views/tabs/tab_strip.cc -@@ -42,7 +42,7 @@ +@@ -31,7 +31,7 @@ #if defined(OS_WIN) #include "app/win_util.h" #include "views/widget/widget_win.h" @@ -2276,20 +2375,20 @@ index 56bf512..4839daf 100644 #include "views/widget/widget_gtk.h" #endif -@@ -1194,7 +1194,7 @@ bool TabStrip::IsCursorInTabStripZone() const { +@@ -769,7 +769,7 @@ bool TabStrip::IsCursorInTabStripZone() const { #if defined(OS_WIN) DWORD pos = GetMessagePos(); gfx::Point cursor_point(pos); -#elif defined(OS_LINUX) -+#elif defined(TOOLKIT_GTK) - // TODO: make sure this is right with multiple monitors. ++#elif defined(TOOLKIT_USES_GTK) + // TODO(sky): make sure this is right with multiple monitors. GdkScreen* screen = gdk_screen_get_default(); GdkDisplay* display = gdk_screen_get_display(screen); diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h -index e1cbfda..f29d81a 100644 +index 92ba7f9..8a1d646 100644 --- chrome/browser/views/tabs/tab_strip.h +++ chrome/browser/views/tabs/tab_strip.h -@@ -23,7 +23,7 @@ class TabStripModel; +@@ -18,7 +18,7 @@ class Tab; namespace views { class ImageView; @@ -2298,21 +2397,8 @@ index e1cbfda..f29d81a 100644 class WidgetGtk; #elif defined(OS_WIN) class WidgetWin; -diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc -index 97224d1..77ddaa8 100644 ---- chrome/browser/views/toolbar_view.cc -+++ chrome/browser/views/toolbar_view.cc -@@ -791,7 +791,7 @@ void ToolbarView::SwitchToOtherMenuIfNeeded( - } - - void ToolbarView::ActivateMenuButton(views::MenuButton* menu_button) { --#if defined(OS_LINUX) -+#if defined(TOOLKIT_USES_GTK) - // Under GTK, opening a pop-up menu causes the main window to lose focus. - // Focus is automatically returned when the menu closes. - // diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc -index 0674c0d..576dda2 100644 +index 97a2329..741743f 100644 --- chrome/browser/web_applications/web_app.cc +++ chrome/browser/web_applications/web_app.cc @@ -32,9 +32,9 @@ @@ -2327,7 +2413,7 @@ index 0674c0d..576dda2 100644 #if defined(OS_WIN) #include "base/win_util.h" -@@ -260,7 +260,7 @@ void CreateShortcutTask::Run() { +@@ -258,7 +258,7 @@ void CreateShortcutTask::Run() { bool CreateShortcutTask::CreateShortcut() { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE)); @@ -2336,11 +2422,46 @@ index 0674c0d..576dda2 100644 scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create()); std::string shortcut_template; +diff --git a/chrome/browser/wrench_menu_model.cc b/chrome/browser/wrench_menu_model.cc +index 637ab57..bf6ab61 100644 +--- chrome/browser/wrench_menu_model.cc ++++ chrome/browser/wrench_menu_model.cc +@@ -200,7 +200,7 @@ void WrenchMenuModel::Build() { + AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); + + AddSeparator(); +-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)) ++#if defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) + // WARNING: Mac does not use the ButtonMenuItemModel, but instead defines the + // layout for this menu item in Toolbar.xib. It does, however, use the + // command_id value from AddButtonItem() to identify this special item. +@@ -215,7 +215,7 @@ void WrenchMenuModel::Build() { + #endif + + AddSeparator(); +-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)) ++#if defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) + // WARNING: See above comment. + zoom_menu_item_model_.reset( + new menus::ButtonMenuItemModel(IDS_ZOOM_MENU, this)); diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc -index cdeda42..7c5daaf 100644 +index 9423598..b8e035d 100644 --- chrome/browser/zygote_host_linux.cc +++ chrome/browser/zygote_host_linux.cc -@@ -70,7 +75,12 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) { +@@ -55,7 +55,12 @@ ZygoteHost::ZygoteHost() + } + + ZygoteHost::~ZygoteHost() { ++ Pickle pickle; + if (init_) ++#if defined(OS_FREEBSD) ++ pickle.WriteInt(kCmdEnd); ++ HANDLE_EINTR(write(control_fd_, pickle.data(), pickle.size())); ++#endif + close(control_fd_); + } + +@@ -71,7 +76,12 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) { switches::kZygoteProcess); int fds[2]; @@ -2353,24 +2474,54 @@ index cdeda42..7c5daaf 100644 base::file_handle_mapping_vector fds_to_map; fds_to_map.push_back(std::make_pair(fds[1], 3)); -@@ -218,6 +228,7 @@ pid_t ZygoteHost::ForkRenderer( - if (HANDLE_EINTR(read(control_fd_, &pid, sizeof(pid))) != sizeof(pid)) - return base::kNullProcessHandle; +@@ -153,6 +163,7 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) { + // We need to look for it. + // But first, wait for the zygote to tell us it's running. + // The sending code is in chrome/browser/zygote_main_linux.cc. ++#if defined(OS_LINUX) + std::vector<int> fds_vec; + const int kExpectedLength = sizeof(kZygoteMagic); + char buf[kExpectedLength]; +@@ -182,6 +193,7 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) { + // Reap the sandbox. + ProcessWatcher::EnsureProcessGetsReaped(process); + } ++#endif // defined(OS_LINUX) + } else { + // Not using the SUID sandbox. + pid_ = process; +@@ -277,6 +289,7 @@ pid_t ZygoteHost::ForkRenderer( + selinux_valid = true; + } +#if defined(OS_LINUX) const int kRendererScore = 5; - if (using_suid_sandbox_) { + if (using_suid_sandbox_ && !selinux) { base::ProcessHandle sandbox_helper_process; -@@ -236,6 +247,7 @@ pid_t ZygoteHost::ForkRenderer( - } else { - base::AdjustOOMScore(pid, kRendererScore); +@@ -296,6 +309,7 @@ pid_t ZygoteHost::ForkRenderer( + if (!base::AdjustOOMScore(pid, kRendererScore)) + LOG(ERROR) << "Failed to adjust OOM score of renderer"; } +#endif // defined(OS_LINUX) return pid; } +diff --git a/chrome/browser/zygote_host_linux.h b/chrome/browser/zygote_host_linux.h +index 545df8d..749996e 100644 +--- chrome/browser/zygote_host_linux.h ++++ chrome/browser/zygote_host_linux.h +@@ -45,6 +45,9 @@ class ZygoteHost { + kCmdReap = 1, // Reap a renderer child. + kCmdDidProcessCrash = 2, // Check if child process crashed. + kCmdGetSandboxStatus = 3, // Read a bitmask of kSandbox* ++#if defined(OS_FREEBSD) ++ kCmdEnd = 5, // Kill zygote for SOCK_DGRAM. ++#endif + }; + + // These form a bitmask which describes the conditions of the sandbox that diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc -index 793c855..a77aedf 100644 +index 51a658e..1d1e99d 100644 --- chrome/browser/zygote_main_linux.cc +++ chrome/browser/zygote_main_linux.cc @@ -2,11 +2,17 @@ @@ -2400,7 +2551,19 @@ index 793c855..a77aedf 100644 // The seccomp sandbox is enabled on all ia32 and x86-64 processor as long as // we aren't using SELinux. #define SECCOMP_SANDBOX -@@ -207,7 +218,11 @@ class Zygote { +@@ -169,6 +175,11 @@ class Zygote { + case ZygoteHost::kCmdGetSandboxStatus: + HandleGetSandboxStatus(fd, pickle, iter); + return false; ++#if defined(OS_FREEBSD) ++ case ZygoteHost::kCmdEnd: ++ _exit(0); ++ return false; ++#endif + default: + NOTREACHED(); + break; +@@ -237,7 +248,11 @@ class Zygote { int argc, numfds; base::GlobalDescriptors::Mapping mapping; base::ProcessId child; @@ -2412,7 +2575,23 @@ index 793c855..a77aedf 100644 int dummy_fd = -1; if (!pickle.ReadInt(&iter, &argc)) -@@ -250,10 +265,13 @@ class Zygote { +@@ -265,6 +280,7 @@ class Zygote { + mapping.push_back(std::make_pair( + static_cast<uint32_t>(kSandboxIPCChannel), kMagicSandboxIPCDescriptor)); + ++#if defined(OS_LINUX) + if (g_suid_sandbox_active) { + dummy_fd = socket(PF_UNIX, SOCK_DGRAM, 0); + if (dummy_fd < 0) +@@ -273,6 +289,7 @@ class Zygote { + if (!base::FileDescriptorGetInode(&dummy_inode, dummy_fd)) + goto error; + } ++#endif // defined(OS_LINUX) + + child = fork(); + +@@ -280,10 +297,13 @@ class Zygote { #if defined(SECCOMP_SANDBOX) // Try to open /proc/self/maps as the seccomp sandbox needs access to it if (g_proc_fd >= 0) { @@ -2426,7 +2605,7 @@ index 793c855..a77aedf 100644 close(g_proc_fd); g_proc_fd = -1; } -@@ -547,6 +565,8 @@ static bool EnterSandbox() { +@@ -593,6 +613,8 @@ static bool EnterSandbox() { SkiaFontConfigUseIPCImplementation(kMagicSandboxIPCDescriptor); @@ -2435,7 +2614,7 @@ index 793c855..a77aedf 100644 // Previously, we required that the binary be non-readable. This causes the // kernel to mark the process as non-dumpable at startup. The thinking was // that, although we were putting the renderers into a PID namespace (with -@@ -572,6 +592,7 @@ static bool EnterSandbox() { +@@ -618,6 +640,7 @@ static bool EnterSandbox() { return false; } } @@ -2444,12 +2623,12 @@ index 793c855..a77aedf 100644 SkiaFontConfigUseDirectImplementation(); } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp -index fef2da9..f88a373 100644 +index ebd8304..1e833f3 100644 --- chrome/chrome.gyp +++ chrome/chrome.gyp -@@ -78,6 +78,10 @@ - 'platform_locale_settings_grd': - 'app/resources/locale_settings_linux.grd', +@@ -95,6 +95,10 @@ + }], + ], },], + ['OS=="freebsd" or OS=="openbsd"', { + 'platform_locale_settings_grd': @@ -2458,7 +2637,7 @@ index fef2da9..f88a373 100644 ['OS=="mac"', { 'tweak_info_plist_path': 'tools/build/mac/tweak_info_plist', 'nacl_defines': [ -@@ -558,7 +562,7 @@ +@@ -658,7 +662,7 @@ '..', ], 'conditions': [ @@ -2467,43 +2646,40 @@ index fef2da9..f88a373 100644 'dependencies': [ '../build/linux/system.gyp:gtk', ], -@@ -754,7 +758,6 @@ - 'browser/sync/notifier/base/async_dns_lookup.h', - 'browser/sync/notifier/base/async_network_alive.h', - 'browser/sync/notifier/base/fastalloc.h', -- 'browser/sync/notifier/base/linux/async_network_alive_linux.cc', - 'browser/sync/notifier/base/mac/network_status_detector_task_mac.h', - 'browser/sync/notifier/base/mac/network_status_detector_task_mac.cc', - 'browser/sync/notifier/base/nethelpers.cc', -@@ -1004,6 +1007,12 @@ - ], - }, +@@ -716,7 +720,7 @@ + '<(DEPTH)/third_party/wtl/include', + ], }], -+ [ 'OS == "freebsd"', { -+ 'dependencies': [ -+ '../build/linux/system.gyp:gtk' -+ ], -+ 'sources/': [['exclude', '^browser/sync/util/path_helpers_linux.cc$']], -+ }], - ['OS=="mac"', { - 'link_settings': { - 'libraries': [ +- ['OS=="linux" and target_arch!="arm"', { ++ ['(OS=="linux" or OS=="freebsd") and target_arch!="arm"', { + 'sources': [ + 'gpu/gpu_backing_store_glx.cc', + 'gpu/gpu_backing_store_glx.h', +@@ -1078,7 +1082,7 @@ + 'service/cloud_print/print_system_win.cc', + ], + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi -index 8e01b6f..d2ff48b 100644 +index 05a38da..b64be85 100644 --- chrome/chrome_browser.gypi +++ chrome/chrome_browser.gypi -@@ -2467,7 +2467,7 @@ - ['exclude', '^browser/chromeos'], +@@ -2862,7 +2862,7 @@ + # Nothing yet. ], }], - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { 'dependencies': [ '../build/linux/system.gyp:dbus-glib', - # Temporarily disabled while we figure some stuff out. -@@ -2478,12 +2478,6 @@ + '../build/linux/system.gyp:gconf', +@@ -2870,12 +2870,6 @@ + '../build/linux/system.gyp:gtkprint', '../build/linux/system.gyp:nss', - '../base/base.gyp:linux_versioninfo', ], - 'link_settings': { - 'libraries': [ @@ -2514,7 +2690,7 @@ index 8e01b6f..d2ff48b 100644 'sources!': [ # Exclude extension shelf for toolstrips. 'browser/views/extensions/extension_shelf.cc', -@@ -2539,6 +2533,9 @@ +@@ -2935,6 +2929,9 @@ 'sources': [ 'browser/file_watcher_stub.cc', ], @@ -2524,20 +2700,20 @@ index 8e01b6f..d2ff48b 100644 }], ['OS=="mac"', { 'sources!': [ -@@ -3047,7 +3044,7 @@ +@@ -3481,7 +3478,7 @@ ], }], # GTK build only -- ['OS=="linux" and chromeos==0 and toolkit_views==0', { -+ ['(OS=="linux" or OS=="freebsd") and chromeos==0 and toolkit_views==0', { +- ['OS=="linux" and toolkit_views==0', { ++ ['(OS=="linux" or OS=="freebsd") and toolkit_views==0', { 'sources/': [ ['include', '^browser/printing/print_dialog_gtk.cc'], ['include', '^browser/printing/print_dialog_gtk.h'], diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi -index 774af6d..e0a2534 100755 +index b0b2532..901204a 100644 --- chrome/chrome_renderer.gypi +++ chrome/chrome_renderer.gypi -@@ -201,6 +201,14 @@ +@@ -226,6 +226,14 @@ }], # BSD-specific rules. ['OS=="openbsd" or OS=="freebsd"', { @@ -2553,10 +2729,10 @@ index 774af6d..e0a2534 100755 '../build/linux/system.gyp:gtk', ], diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi -index 1d74d00..908d17a 100644 +index 28cd15b..adfae38 100644 --- chrome/chrome_tests.gypi +++ chrome/chrome_tests.gypi -@@ -125,7 +125,7 @@ +@@ -126,7 +126,7 @@ 'test/ui_test_utils_win.cc', ], 'conditions': [ @@ -2564,8 +2740,8 @@ index 1d74d00..908d17a 100644 + ['OS=="linux" or OS=="freebsd"', { 'dependencies': [ '../build/linux/system.gyp:gtk', - ], -@@ -170,7 +170,7 @@ + '../build/linux/system.gyp:nss', +@@ -172,7 +172,7 @@ 'test/ui/ui_test_suite.h', ], 'conditions': [ @@ -2574,7 +2750,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', ], -@@ -194,7 +194,7 @@ +@@ -196,7 +196,7 @@ 'test/unit/run_all_unittests.cc', ], 'conditions': [ @@ -2583,7 +2759,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ # Needed for the following #include chain: # test/unit/run_all_unittests.cc -@@ -229,7 +229,7 @@ +@@ -231,7 +231,7 @@ 'test/automated_ui_tests/automated_ui_tests.h', ], 'conditions': [ @@ -2592,7 +2768,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', ], -@@ -333,7 +333,7 @@ +@@ -345,7 +345,7 @@ '../webkit/webkit.gyp:npapi_pepper_test_plugin', ], }], @@ -2601,34 +2777,25 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', -@@ -1003,7 +1003,7 @@ - '../sandbox/sandbox.gyp:*', +@@ -1232,7 +1232,7 @@ + ['exclude', '^browser/chromeos/'], ], }], - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { 'conditions': [ - [ 'gcc_version==44', { + ['gcc_version==44', { # Avoid gcc 4.4 strict aliasing issues in stl_tree.h when -@@ -1331,7 +1331,7 @@ - }, - } +@@ -1662,7 +1662,7 @@ + 'browser/renderer_host/test/render_view_host_manager_browsertest.cc', + ], }], - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { 'dependencies': [ '../build/linux/system.gyp:gtk', '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', -@@ -1363,7 +1363,7 @@ - 'browser/chromeos/status/power_menu_button_browsertest.cc', - ], - }], -- ['OS=="linux" and toolkit_views==0 and chromeos==0', { -+ ['(OS=="linux" or OS=="freebsd") and toolkit_views==0 and chromeos==0', { - 'sources': [ - 'browser/extensions/browser_action_test_util_gtk.cc', - 'browser/gtk/view_id_util_browsertest.cc', -@@ -1420,7 +1420,7 @@ +@@ -1735,7 +1735,7 @@ 'test/startup/startup_test.cc', ], 'conditions': [ @@ -2637,7 +2804,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', -@@ -1490,7 +1490,7 @@ +@@ -1816,7 +1816,7 @@ '<(allocator_target)', ], },], @@ -2646,7 +2813,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', ], -@@ -1516,7 +1516,7 @@ +@@ -1842,7 +1842,7 @@ 'test/page_cycler/page_cycler_test.cc', ], 'conditions': [ @@ -2655,7 +2822,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', -@@ -1553,7 +1553,7 @@ +@@ -1879,7 +1879,7 @@ 'test/tab_switching/tab_switching_test.cc', ], 'conditions': [ @@ -2664,7 +2831,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', -@@ -1587,7 +1587,7 @@ +@@ -1913,7 +1913,7 @@ 'test/memory_test/memory_test.cc', ], 'conditions': [ @@ -2673,7 +2840,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', -@@ -1726,7 +1726,7 @@ +@@ -2057,7 +2057,7 @@ 'browser/sync/util/data_encryption_unittest.cc', ], }], @@ -2682,7 +2849,7 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', '../build/linux/system.gyp:nss', -@@ -1795,7 +1795,7 @@ +@@ -2157,7 +2157,7 @@ ], 'conditions': [ # Plugin code. @@ -2691,16 +2858,16 @@ index 1d74d00..908d17a 100644 'dependencies': [ 'plugin', ], -@@ -1804,7 +1804,7 @@ +@@ -2165,7 +2165,7 @@ + 'plugin', ], }], - # Linux-specific rules. - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { 'dependencies': [ '../build/linux/system.gyp:gtk', - ], -@@ -1874,7 +1874,7 @@ + '../build/linux/system.gyp:nss', +@@ -2294,7 +2294,7 @@ 'test/perf/url_parse_perftest.cc', ], 'conditions': [ @@ -2709,17 +2876,18 @@ index 1d74d00..908d17a 100644 'dependencies': [ '../build/linux/system.gyp:gtk', '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', -@@ -2013,7 +2013,7 @@ +@@ -2422,7 +2422,7 @@ ]}, # 'targets' ], # OS=="win" # Build on linux x86_64 only if linux_fpic==1 -- ['OS=="mac" or OS=="win" or (OS=="linux" and target_arch==python_arch ' -+ ['OS=="mac" or OS=="win" or ((OS=="linux" or OS=="freebsd") and target_arch==python_arch ' + ['OS=="mac" or (OS=="win" and component=="static_library") ' +- 'or (OS=="linux" and target_arch==python_arch ' ++ 'or ((OS=="linux" or OS=="freebsd") and target_arch==python_arch ' 'and (target_arch!="x64" or linux_fpic==1))', { 'targets': [ { diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc -index 47745f4..bf21ea3 100644 +index 47f0d52..48779e7 100644 --- chrome/common/chrome_constants.cc +++ chrome/common/chrome_constants.cc @@ -27,7 +27,7 @@ namespace chrome { @@ -2741,11 +2909,11 @@ index 47745f4..bf21ea3 100644 const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome"); #elif defined(OS_MACOSX) diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc -index 8796843..abb8c42 100644 +index 6f77510..f4d4183 100644 --- chrome/common/chrome_paths.cc +++ chrome/common/chrome_paths.cc -@@ -167,7 +167,7 @@ bool PathProvider(int key, FilePath* result) { - cur = cur.Append(FILE_PATH_LITERAL("net_internals")); +@@ -164,7 +164,7 @@ bool PathProvider(int key, FilePath* result) { + cur = cur.Append(FILE_PATH_LITERAL("inspector")); break; case chrome::DIR_APP_DICTIONARIES: -#if defined(OS_LINUX) || defined(OS_MACOSX) @@ -2753,6 +2921,45 @@ index 8796843..abb8c42 100644 // We can't write into the EXE dir on Linux, so keep dictionaries // alongside the safe browsing database in the user data dir. // And we don't want to write into the bundle on the Mac, so push +diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc +index b78c3e7..da0c8ce 100644 +--- chrome/common/chrome_switches.cc ++++ chrome/common/chrome_switches.cc +@@ -1029,7 +1029,7 @@ const char kServicesManifest[] = "services-manifest"; + + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + // Specify the amount the trackpad should scroll by. + const char kScrollPixels[] = "scroll-pixels"; + #endif +diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h +index 7262bde..caf128f 100644 +--- chrome/common/chrome_switches.h ++++ chrome/common/chrome_switches.h +@@ -302,7 +302,7 @@ extern const char kStartupManifest[]; + extern const char kServicesManifest[]; + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + extern const char kScrollPixels[]; + #endif + +diff --git a/chrome/common/gpu_messages_internal.h b/chrome/common/gpu_messages_internal.h +index fa9a83f..8a3e65b 100644 +--- chrome/common/gpu_messages_internal.h ++++ chrome/common/gpu_messages_internal.h +@@ -98,7 +98,7 @@ IPC_BEGIN_MESSAGES(GpuHost) + // Response to a GpuMsg_Synchronize message. + IPC_MESSAGE_CONTROL0(GpuHostMsg_SynchronizeReply) + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + // Get the XID for a view ID. + IPC_SYNC_MESSAGE_CONTROL1_1(GpuHostMsg_GetViewXID, + gfx::NativeViewId, /* view */ diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h index 381ad31..d5675ae 100644 --- chrome/common/native_web_keyboard_event.h @@ -2776,10 +2983,10 @@ index 381ad31..d5675ae 100644 #endif diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h -index a1028b2..5efba03 100644 +index 3704777..abbb050 100644 --- chrome/common/render_messages_internal.h +++ chrome/common/render_messages_internal.h -@@ -1710,7 +1710,7 @@ IPC_BEGIN_MESSAGES(ViewHost) +@@ -1778,7 +1778,7 @@ IPC_BEGIN_MESSAGES(ViewHost) int /* fd in browser */) #endif @@ -2788,7 +2995,7 @@ index a1028b2..5efba03 100644 // Asks the browser to create a block of shared memory for the renderer to // pass NativeMetafile data to the browser. IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_AllocatePDFTransport, -@@ -1875,7 +1875,7 @@ IPC_BEGIN_MESSAGES(ViewHost) +@@ -1957,7 +1957,7 @@ IPC_BEGIN_MESSAGES(ViewHost) IPC_MESSAGE_CONTROL1(ViewHostMsg_ExtensionRemoveListener, std::string /* name */) @@ -2797,24 +3004,71 @@ index a1028b2..5efba03 100644 // On OSX, we cannot allocated shared memory from within the sandbox, so // this call exists for the renderer to ask the browser to allocate memory // on its behalf. We return a file descriptor to the POSIX shared memory. -diff --git a/chrome/common_constants.gypi b/chrome/common_constants.gypi -index e9a47c5..d17b05c 100644 ---- chrome/common_constants.gypi -+++ chrome/common_constants.gypi -@@ -63,7 +63,7 @@ - '../base/base.gyp:base', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['OS=="linux" or OS=="freebsd"', { - 'dependencies': ['../build/linux/system.gyp:gtk'], - }], - ], +diff --git a/chrome/default_plugin/default_plugin.gyp b/chrome/default_plugin/default_plugin.gyp +index a0d8a6d..2093868 100644 +--- chrome/default_plugin/default_plugin.gyp ++++ chrome/default_plugin/default_plugin.gyp +@@ -53,7 +53,7 @@ + 'plugin_install_job_monitor.h', + ], + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'dependencies': [ + '<(DEPTH)/build/linux/system.gyp:gtk', + ], +diff --git a/chrome/gpu/gpu_backing_store_glx.cc b/chrome/gpu/gpu_backing_store_glx.cc +index 37076cc..821611e 100644 +--- chrome/gpu/gpu_backing_store_glx.cc ++++ chrome/gpu/gpu_backing_store_glx.cc +@@ -7,6 +7,7 @@ + #include "app/gfx/gl/gl_bindings.h" + #include "app/surface/transport_dib.h" + #include "base/scoped_ptr.h" ++#include "chrome/browser/renderer_host/render_process_host.h" + #include "chrome/common/gpu_messages.h" + #include "chrome/gpu/gpu_backing_store_glx_context.h" + #include "chrome/gpu/gpu_thread.h" +@@ -63,7 +64,7 @@ void GpuBackingStoreGLX::OnPaintToBackingStore( + TransportDIB::Id id, + const gfx::Rect& bitmap_rect, + const std::vector<gfx::Rect>& copy_rects) { +- scoped_ptr<TransportDIB> dib(TransportDIB::Map(id)); ++ scoped_ptr<TransportDIB> dib(RenderProcessHost::FromID(source_process_id)->GetTransportDIB(id)); + view_->BindContext(); + + scoped_ptr<skia::PlatformCanvas> canvas( +diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc +index 091410c..d2fdb49 100644 +--- chrome/gpu/gpu_channel.cc ++++ chrome/gpu/gpu_channel.cc +@@ -116,7 +116,7 @@ void GpuChannel::OnCreateViewCommandBuffer(gfx::NativeViewId view_id, + if (view_renderer_id != renderer_id_) + return; + handle = view; +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + ChildThread* gpu_thread = ChildThread::current(); + // Ask the browser for the view's XID. + // TODO(piman): This assumes that it doesn't change. It can change however +diff --git a/chrome/gpu/gpu_config.h b/chrome/gpu/gpu_config.h +index 41ca6a3..288bf3c 100644 +--- chrome/gpu/gpu_config.h ++++ chrome/gpu/gpu_config.h +@@ -9,7 +9,7 @@ + + #include "build/build_config.h" + +-#if defined(OS_LINUX) && !defined(ARCH_CPU_ARMEL) ++#if defined(OS_NIX) && !defined(ARCH_CPU_ARMEL) + + // Only define GLX support for Intel CPUs for now until we can get the + // proper dependencies and build setup for ARM. diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc -index dcb16e9..579c570 100644 +index c5ac79f..257ed34 100644 --- chrome/gpu/gpu_thread.cc +++ chrome/gpu/gpu_thread.cc -@@ -20,7 +20,7 @@ +@@ -24,7 +24,7 @@ #include <X11/Xutil.h> // Must be last. #endif @@ -2823,7 +3077,7 @@ index dcb16e9..579c570 100644 #include <gtk/gtk.h> #endif -@@ -28,7 +28,7 @@ GpuThread::GpuThread() { +@@ -32,7 +32,7 @@ GpuThread::GpuThread() { #if defined(GPU_USE_GLX) display_ = ::XOpenDisplay(NULL); #endif @@ -2832,6 +3086,27 @@ index dcb16e9..579c570 100644 { // The X11 port of the command buffer code assumes it can access the X // display via the macro GDK_DISPLAY(), which implies that Gtk has been +diff --git a/chrome/gpu/gpu_video_layer_glx.cc b/chrome/gpu/gpu_video_layer_glx.cc +index d0578ad..985dc1a 100644 +--- chrome/gpu/gpu_video_layer_glx.cc ++++ chrome/gpu/gpu_video_layer_glx.cc +@@ -5,6 +5,7 @@ + #include "chrome/gpu/gpu_video_layer_glx.h" + + #include "app/gfx/gl/gl_bindings.h" ++#include "chrome/browser/renderer_host/render_process_host.h" + #include "chrome/common/gpu_messages.h" + #include "chrome/gpu/gpu_thread.h" + #include "chrome/gpu/gpu_view_x.h" +@@ -264,7 +265,7 @@ void GpuVideoLayerGLX::OnPaintToVideoLayer(base::ProcessId source_process_id, + height <= 0 || height > kMaxVideoLayerSize) + return; + +- TransportDIB* dib = TransportDIB::Map(id); ++ TransportDIB* dib = RenderProcessHost::FromID(source_process_id)->GetTransportDIB(id); + if (!dib) + return; + diff --git a/chrome/gpu/x_util.h b/chrome/gpu/x_util.h index 512b232..c201e07 100644 --- chrome/gpu/x_util.h @@ -2853,19 +3128,6 @@ index 512b232..c201e07 100644 +#endif // USE_X11 #endif // CHROME_GPU_X_UTIL_H_ -diff --git a/chrome/installer/installer_util.gypi b/chrome/installer/installer_util.gypi -index 528a5bf..3601bef 100644 ---- chrome/installer/installer_util.gypi -+++ chrome/installer/installer_util.gypi -@@ -128,7 +128,7 @@ - }, - ], - }], -- ['OS=="linux"', { -+ ['OS=="linux" or OS=="freebsd"', { - 'targets': [ - { - 'target_name': 'installer_util', diff --git a/chrome/plugin/plugin_main_linux.cc b/chrome/plugin/plugin_main_linux.cc index 6bb9da7..27f7996 100644 --- chrome/plugin/plugin_main_linux.cc @@ -2880,19 +3142,19 @@ index 6bb9da7..27f7996 100644 namespace { diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc -index 688fe91..dc6707d 100644 +index 1ae410e..84375a6 100644 --- chrome/plugin/plugin_thread.cc +++ chrome/plugin/plugin_thread.cc @@ -6,7 +6,7 @@ #include "build/build_config.h" --#if defined(OS_LINUX) -+#if defined(TOOLKIT_GTK) +-#if defined(USE_X11) ++#if defined(TOOLKIT_USES_GTK) #include <gtk/gtk.h> - #endif - -@@ -46,7 +46,7 @@ PluginThread::PluginThread() + #elif defined(OS_MACOSX) + #include <CoreFoundation/CoreFoundation.h> +@@ -52,7 +52,7 @@ PluginThread::PluginThread() switches::kPluginPath); lazy_tls.Pointer()->Set(this); @@ -2901,60 +3163,59 @@ index 688fe91..dc6707d 100644 { // XEmbed plugins assume they are hosted in a Gtk application, so we need // to initialize Gtk in the plugin process. -@@ -222,7 +222,7 @@ bool GetPluginFinderURL(std::string* plugin_finder_url) { - bool IsDefaultPluginEnabled() { - #if defined(OS_WIN) - return true; --#elif defined(OS_LINUX) -+#elif defined(OS_NIX) - // http://code.google.com/p/chromium/issues/detail?id=10952 - return false; - #elif defined(OS_MACOSX) -diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc -index 85c374e..25dd4f1 100644 ---- chrome/renderer/render_process.cc -+++ chrome/renderer/render_process.cc -@@ -128,7 +128,7 @@ RenderProcess::~RenderProcess() { +diff --git a/chrome/renderer/mock_render_thread.cc b/chrome/renderer/mock_render_thread.cc +index 57e9d80..e1e3b22 100644 +--- chrome/renderer/mock_render_thread.cc ++++ chrome/renderer/mock_render_thread.cc +@@ -105,7 +105,7 @@ void MockRenderThread::OnMessageReceived(const IPC::Message& msg) { + IPC_MESSAGE_HANDLER(ViewHostMsg_AllocatePDFTransport, + OnAllocatePDFTransport) + #endif +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + IPC_MESSAGE_HANDLER(ViewHostMsg_AllocateTempFileForPrinting, + OnAllocateTempFileForPrinting) + IPC_MESSAGE_HANDLER(ViewHostMsg_TempFileForPrintingWritten, +@@ -154,7 +154,7 @@ void MockRenderThread::OnAllocatePDFTransport( + } + #endif - bool RenderProcess::InProcessPlugins() { - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); -#if defined(OS_LINUX) +#if defined(OS_NIX) - // Plugin processes require a UI message loop, and the Linux message loop - // implementation only allows one UI loop per process. - if (command_line.HasSwitch(switches::kInProcessPlugins)) -@@ -169,7 +169,7 @@ TransportDIB* RenderProcess::CreateTransportDIB(size_t size) { - #if defined(OS_WIN) || defined(OS_LINUX) - // Windows and Linux create transport DIBs inside the renderer - return TransportDIB::Create(size, sequence_number_++); --#elif defined(OS_MACOSX) // defined(OS_WIN) || defined(OS_LINUX) -+#elif defined(OS_MACOSX) || defined(OS_FREEBSD) // defined(OS_WIN) || defined(OS_NIX) - // Mac creates transport DIBs in the browser, so we need to do a sync IPC to - // get one. The TransportDIB is cached in the browser. - TransportDIB::Handle handle; -@@ -186,7 +186,7 @@ void RenderProcess::FreeTransportDIB(TransportDIB* dib) { - if (!dib) - return; + void MockRenderThread::OnAllocateTempFileForPrinting( + base::FileDescriptor* renderer_fd, + int* browser_fd) { +diff --git a/chrome/renderer/mock_render_thread.h b/chrome/renderer/mock_render_thread.h +index c297cb8..b69a369 100644 +--- chrome/renderer/mock_render_thread.h ++++ chrome/renderer/mock_render_thread.h +@@ -101,7 +101,7 @@ class MockRenderThread : public RenderThreadBase { + base::SharedMemoryHandle* handle); + #endif --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_FREEBSD) - // On Mac we need to tell the browser that it can drop a reference to the - // shared memory. - IPC::Message* msg = new ViewHostMsg_FreeTransportDIB(dib->id()); -@@ -204,7 +204,7 @@ skia::PlatformCanvas* RenderProcess::GetDrawingCanvas( - int width = rect.width(); - int height = rect.height(); - const size_t stride = skia::PlatformCanvas::StrideForWidth(rect.width()); -#if defined(OS_LINUX) +#if defined(OS_NIX) - const size_t max_size = base::SysInfo::MaxSharedMemorySize(); - #else - const size_t max_size = 0; + void OnAllocateTempFileForPrinting(base::FileDescriptor* renderer_fd, + int* browser_fd); + void OnTempFileForPrintingWritten(int browser_fd); +diff --git a/chrome/renderer/pepper_scrollbar_widget.h b/chrome/renderer/pepper_scrollbar_widget.h +index ac36f5e..3d9be56 100644 +--- chrome/renderer/pepper_scrollbar_widget.h ++++ chrome/renderer/pepper_scrollbar_widget.h +@@ -37,7 +37,7 @@ class PepperScrollbarWidget : public PepperWidget, + virtual void getTickmarks(WebKit::WebScrollbar*, + WebKit::WebVector<WebKit::WebRect>*) const; + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + static void SetScrollbarColors(unsigned inactive_color, + unsigned active_color, + unsigned track_color); diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc -index e82fed9..c82eb1d 100644 +index e610df9..c4155d0 100644 --- chrome/renderer/render_process_impl.cc +++ chrome/renderer/render_process_impl.cc -@@ -190,7 +190,7 @@ TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) { +@@ -225,7 +225,7 @@ TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) { #if defined(OS_WIN) || defined(OS_LINUX) // Windows and Linux create transport DIBs inside the renderer return TransportDIB::Create(size, transport_dib_next_sequence_number_++); @@ -2963,7 +3224,7 @@ index e82fed9..c82eb1d 100644 // Mac creates transport DIBs in the browser, so we need to do a sync IPC to // get one. The TransportDIB is cached in the browser. TransportDIB::Handle handle; -@@ -207,7 +207,7 @@ void RenderProcessImpl::FreeTransportDIB(TransportDIB* dib) { +@@ -242,7 +242,7 @@ void RenderProcessImpl::FreeTransportDIB(TransportDIB* dib) { if (!dib) return; @@ -2972,7 +3233,7 @@ index e82fed9..c82eb1d 100644 // On Mac we need to tell the browser that it can drop a reference to the // shared memory. IPC::Message* msg = new ViewHostMsg_FreeTransportDIB(dib->id()); -@@ -225,7 +225,7 @@ skia::PlatformCanvas* RenderProcessImpl::GetDrawingCanvas( +@@ -260,7 +260,7 @@ skia::PlatformCanvas* RenderProcessImpl::GetDrawingCanvas( int width = rect.width(); int height = rect.height(); const size_t stride = skia::PlatformCanvas::StrideForWidth(rect.width()); @@ -2982,10 +3243,10 @@ index e82fed9..c82eb1d 100644 #else const size_t max_size = 0; diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc -index 3a0385a..b9da639 100644 +index 3573488..e662023 100644 --- chrome/renderer/render_thread.cc +++ chrome/renderer/render_thread.cc -@@ -878,7 +878,7 @@ void RenderThread::EnsureWebKitInitialized() { +@@ -901,7 +901,7 @@ void RenderThread::EnsureWebKitInitialized() { } void RenderThread::IdleHandler() { @@ -2994,7 +3255,7 @@ index 3a0385a..b9da639 100644 MallocExtension::instance()->ReleaseFreeMemory(); #endif -@@ -953,7 +953,7 @@ void RenderThread::OnPurgeMemory() { +@@ -977,7 +977,7 @@ void RenderThread::OnPurgeMemory() { while (!v8::V8::IdleNotification()) { } @@ -3004,24 +3265,46 @@ index 3a0385a..b9da639 100644 MallocExtension::instance()->ReleaseFreeMemory(); #endif diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h -index c3a0190..c7a63bb 100644 +index 25ef1e6..fe8feba 100644 --- chrome/renderer/render_view.h +++ chrome/renderer/render_view.h -@@ -873,7 +873,7 @@ class RenderView : public RenderWidget, - - void Print(WebKit::WebFrame* frame, bool script_initiated); +@@ -961,7 +961,7 @@ class RenderView : public RenderWidget, + // periodic timer so we don't send too many messages. + void SyncNavigationState(); -#if defined(OS_LINUX) +#if defined(OS_NIX) void UpdateFontRenderingFromRendererPrefs(); #else - void UpdateFontRenderingFromRendererPrefs() { } + void UpdateFontRenderingFromRendererPrefs() {} +diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc +index 849565a..8930fc2 100644 +--- chrome/renderer/renderer_glue.cc ++++ chrome/renderer/renderer_glue.cc +@@ -39,7 +39,7 @@ + + #if defined(OS_WIN) + #include <strsafe.h> // note: per msdn docs, this must *follow* other includes +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + #include "chrome/renderer/renderer_sandbox_support_linux.h" + #endif + +@@ -313,7 +313,7 @@ bool IsSingleProcess() { + return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); + } + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + int MatchFontWithFallback(const std::string& face, bool bold, + bool italic, int charset) { + return renderer_sandbox_support::MatchFontWithFallback( diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc -index 90a25ea..d9c782b 100644 +index f521e11..95982a7 100644 --- chrome/renderer/renderer_main.cc +++ chrome/renderer/renderer_main.cc -@@ -264,7 +264,7 @@ int RendererMain(const MainFunctionParams& parameters) { - } +@@ -267,7 +267,7 @@ int RendererMain(const MainFunctionParams& parameters) { + PepperPluginRegistry::GetInstance(); { -#if !defined(OS_LINUX) @@ -3029,7 +3312,7 @@ index 90a25ea..d9c782b 100644 // TODO(markus): Check if it is OK to unconditionally move this // instruction down. RenderProcessImpl render_process; -@@ -274,7 +274,7 @@ int RendererMain(const MainFunctionParams& parameters) { +@@ -277,7 +277,7 @@ int RendererMain(const MainFunctionParams& parameters) { if (!no_sandbox) { run_loop = platform.EnableSandbox(); } @@ -3052,29 +3335,20 @@ index 98b0aca..ca7df2e 100644 // called it earlier in the zygote. Thus, it is OK for us to not pass in // a file descriptor for "/proc". diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc -index c5b042a..10cf59a 100644 +index 27329ee..0bdbcdf 100644 --- chrome/renderer/renderer_webkitclient_impl.cc +++ chrome/renderer/renderer_webkitclient_impl.cc -@@ -33,7 +33,7 @@ - #include "third_party/WebKit/WebKit/chromium/public/WebVector.h" - #include "webkit/glue/webkit_glue.h" +@@ -42,7 +42,7 @@ + #include "chrome/common/font_loader_mac.h" + #endif -#if defined(OS_LINUX) +#if defined(OS_NIX) #include "chrome/renderer/renderer_sandbox_support_linux.h" #endif -@@ -61,7 +61,7 @@ WebKit::WebMimeRegistry* RendererWebKitClientImpl::mimeRegistry() { - } - - WebKit::WebSandboxSupport* RendererWebKitClientImpl::sandboxSupport() { --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_NIX) - return &sandbox_support_; - #else - return NULL; -@@ -233,7 +233,7 @@ bool RendererWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) { - return RenderThread::current()->Send(new ViewHostMsg_LoadFont(logfont)); +@@ -311,7 +311,7 @@ bool RendererWebKitClientImpl::SandboxSupport::ensureFontLoaded(HFONT font) { + return RenderThread::current()->Send(new ViewHostMsg_PreCacheFont(logfont)); } -#elif defined(OS_LINUX) @@ -3083,10 +3357,10 @@ index c5b042a..10cf59a 100644 WebString RendererWebKitClientImpl::SandboxSupport::getFontFamilyForCharacters( const WebKit::WebUChar* characters, size_t num_characters) { diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h -index 3606eaa..163332f 100644 +index 86fdf1f..8c1e874 100644 --- chrome/renderer/renderer_webkitclient_impl.h +++ chrome/renderer/renderer_webkitclient_impl.h -@@ -13,7 +13,7 @@ +@@ -15,7 +15,7 @@ #if defined(OS_WIN) #include "third_party/WebKit/WebKit/chromium/public/win/WebSandboxSupport.h" @@ -3095,7 +3369,7 @@ index 3606eaa..163332f 100644 #include <string> #include <map> #include "base/lock.h" -@@ -81,7 +81,7 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { +@@ -99,7 +99,7 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { public: virtual bool ensureFontLoaded(HFONT); }; @@ -3104,46 +3378,173 @@ index 3606eaa..163332f 100644 class SandboxSupport : public WebKit::WebSandboxSupport { public: virtual WebKit::WebString getFontFamilyForCharacters( -@@ -102,7 +102,7 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { - webkit_glue::WebClipboardImpl clipboard_; - - MimeRegistry mime_registry_; --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_NIX) - SandboxSupport sandbox_support_; - #endif - diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc -index 9d8d651..c8be9f1 100644 +index 58f1a23..64bfaa4 100644 --- chrome/renderer/webplugin_delegate_pepper.cc +++ chrome/renderer/webplugin_delegate_pepper.cc -@@ -997,7 +997,7 @@ int WebPluginDelegatePepper::PrintBegin(const gfx::Rect& printable_area, +@@ -9,7 +9,7 @@ + #include <string> + #include <vector> - bool WebPluginDelegatePepper::PrintPage(int page_number, - WebKit::WebCanvas* canvas) { --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_NIX) - NPPPrintExtensions* print_extensions = GetPrintExtensions(); - if (!print_extensions) +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + #include <unistd.h> + #endif + +@@ -33,7 +33,7 @@ + #include "chrome/common/render_messages.h" + #include "chrome/renderer/pepper_widget.h" + #include "chrome/renderer/render_thread.h" +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + #include "chrome/renderer/renderer_sandbox_support_linux.h" + #endif + #include "chrome/renderer/webplugin_delegate_proxy.h" +@@ -455,7 +455,7 @@ bool WebPluginDelegatePepper::SetCursor(NPCursorType type) { + NPError NPMatchFontWithFallback(NPP instance, + const NPFontDescription* description, + NPFontID* id) { +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + int fd = renderer_sandbox_support::MatchFontWithFallback( + description->face, description->weight >= 700, description->italic, + description->charset); +@@ -474,7 +474,7 @@ NPError GetFontTable(NPP instance, + uint32_t table, + void* output, + size_t* output_length) { +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + bool rv = renderer_sandbox_support::GetFontTable( + id, table, static_cast<uint8_t*>(output), output_length); + return rv ? NPERR_NO_ERROR : NPERR_GENERIC_ERROR; +@@ -485,7 +485,7 @@ NPError GetFontTable(NPP instance, + } + + NPError NPDestroyFont(NPP instance, NPFontID id) { +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + close(id); + return NPERR_NO_ERROR; + #else +@@ -1158,10 +1158,10 @@ int WebPluginDelegatePepper::PrintBegin(const gfx::Rect& printable_area, + current_printer_dpi_ = printer_dpi; + } + } +-#if defined (OS_LINUX) ++#if defined (OS_NIX) + num_pages_ = num_pages; + pdf_output_done_ = false; +-#endif // (OS_LINUX) ++#endif // (OS_NIX) + return num_pages; + } + +@@ -1187,7 +1187,7 @@ bool WebPluginDelegatePepper::VectorPrintPage(int page_number, + unsigned char* pdf_output = NULL; + int32 output_size = 0; + NPPrintPageNumberRange page_range; +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + // On Linux we will try and output all pages as PDF in the first call to + // PrintPage. This is a temporary hack. + // TODO(sanjeevr): Remove this hack and fix this by changing the print +@@ -1196,9 +1196,9 @@ bool WebPluginDelegatePepper::VectorPrintPage(int page_number, + return pdf_output_done_; + page_range.firstPageNumber = 0; + page_range.lastPageNumber = num_pages_ - 1; +-#else // defined(OS_LINUX) ++#else // defined(OS_NIX) + page_range.firstPageNumber = page_range.lastPageNumber = page_number; +-#endif // defined(OS_LINUX) ++#endif // defined(OS_NIX) + NPError err = print_extensions->printPagesAsPDF(instance()->npp(), + &page_range, 1, + &pdf_output, &output_size); +@@ -1206,7 +1206,7 @@ bool WebPluginDelegatePepper::VectorPrintPage(int page_number, return false; -@@ -1072,10 +1072,10 @@ bool WebPluginDelegatePepper::PrintPage(int page_number, - canvas->drawBitmapRect(committed, &src_rect, dest_rect); - return true; --#else // defined(OS_WIN) || defined(OS_LINUX) -+#else // defined(OS_WIN) || defined(OS_NIX) - NOTIMPLEMENTED(); - return false; --#endif // defined(OS_WIN) || defined(OS_LINUX) -+#endif // defined(OS_WIN) || defined(OS_NIX) + bool ret = false; +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + // On Linux we need to get the backing PdfPsMetafile and write the bits + // directly. + cairo_t* context = canvas->beginPlatformPaint(); +@@ -1359,10 +1359,10 @@ void WebPluginDelegatePepper::PrintEnd() { + current_printer_dpi_ = -1; + #if defined(OS_MACOSX) + last_printed_page_ = SkBitmap(); +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + num_pages_ = 0; + pdf_output_done_ = false; +-#endif // defined(OS_LINUX) ++#endif // defined(OS_NIX) } - void WebPluginDelegatePepper::PrintEnd() { + WebPluginDelegatePepper::WebPluginDelegatePepper( +@@ -1373,10 +1373,10 @@ WebPluginDelegatePepper::WebPluginDelegatePepper( + instance_(instance), + nested_delegate_(NULL), + current_printer_dpi_(-1), +-#if defined (OS_LINUX) ++#if defined (OS_NIX) + num_pages_(0), + pdf_output_done_(false), +-#endif // (OS_LINUX) ++#endif // (OS_NIX) + #if defined(ENABLE_GPU) + command_buffer_(NULL), + #endif +diff --git a/chrome/renderer/webplugin_delegate_pepper.h b/chrome/renderer/webplugin_delegate_pepper.h +index be9c1ce..e38a3d7 100644 +--- chrome/renderer/webplugin_delegate_pepper.h ++++ chrome/renderer/webplugin_delegate_pepper.h +@@ -305,7 +305,7 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate, + // variable to hold on to the pixels. + SkBitmap last_printed_page_; + #endif // defined(OS_MACOSX) +-#if defined (OS_LINUX) ++#if defined (OS_NIX) + // On Linux, we always send all pages from the renderer to the browser. + // So, if the plugin supports printPagesAsPDF we print the entire output + // in one shot in the first call to PrintPage. +@@ -316,7 +316,7 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate, + // Specifies whether we have already output all pages. This is used to ignore + // subsequent PrintPage requests. + bool pdf_output_done_; +-#endif // defined(OS_LINUX) ++#endif // defined(OS_NIX) + + #if defined(ENABLE_GPU) + // The command buffer used to issue commands to the nested GPU plugin. +diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc +index 408be65..973ccf8 100644 +--- chrome/service/service_process.cc ++++ chrome/service/service_process.cc +@@ -17,7 +17,7 @@ + #if defined(OS_WIN) + #include "remoting/host/capturer_gdi.h" + #include "remoting/host/event_executor_win.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + #include "remoting/host/capturer_linux.h" + #include "remoting/host/event_executor_linux.h" + #elif defined(OS_MACOSX) +@@ -78,7 +78,7 @@ remoting::ChromotingHost* ServiceProcess::CreateChromotingHost( + #if defined(OS_WIN) + capturer.reset(new remoting::CapturerGdi()); + executor.reset(new remoting::EventExecutorWin()); +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + capturer.reset(new remoting::CapturerLinux()); + executor.reset(new remoting::EventExecutorLinux()); + #elif defined(OS_MACOSX) diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc -index b3dce0f..1a1864e 100644 +index bace790..88b40bf 100644 --- chrome/test/automation/automation_proxy_uitest.cc +++ chrome/test/automation/automation_proxy_uitest.cc -@@ -1271,7 +1271,7 @@ TEST_F(ExternalTabUITestPopupEnabled, UserGestureTargetBlank) { +@@ -1306,7 +1306,7 @@ TEST_F(ExternalTabUITestPopupEnabled, UserGestureTargetBlank) { #endif // defined(OS_WIN) // TODO(port): Need to port autocomplete_edit_proxy.* first. @@ -3152,7 +3553,7 @@ index b3dce0f..1a1864e 100644 TEST_F(AutomationProxyTest, AutocompleteGetSetText) { scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); ASSERT_TRUE(browser.get()); -@@ -1315,7 +1315,7 @@ TEST_F(AutomationProxyTest, AutocompleteParallelProxy) { +@@ -1350,7 +1350,7 @@ TEST_F(AutomationProxyTest, AutocompleteParallelProxy) { EXPECT_EQ(text_to_set2, actual_text2); } @@ -3162,11 +3563,11 @@ index b3dce0f..1a1864e 100644 #if defined(OS_MACOSX) // TODO(port): Implement AutocompleteEditProxy on Mac. diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc -index 5f47df0..ca983e1 100644 +index a3c4d6f..d76886e 100644 --- chrome/test/chrome_process_util.cc +++ chrome/test/chrome_process_util.cc -@@ -83,7 +83,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { - #endif +@@ -79,7 +79,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { + result.push_back(process_entry->pid()); } -#if defined(OS_LINUX) @@ -3174,9 +3575,9 @@ index 5f47df0..ca983e1 100644 // On Linux we might be running with a zygote process for the renderers. // Because of that we sweep the list of processes again and pick those which // are children of one of the processes that we've already seen. -@@ -94,9 +94,9 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { +@@ -90,9 +90,9 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { while (const base::ProcessEntry* process_entry = it.NextProcessEntry()) - result.push_back(process_entry->pid); + result.push_back(process_entry->pid()); } -#endif // defined(OS_LINUX) +#endif // defined(OS_NIX) @@ -3187,10 +3588,10 @@ index 5f47df0..ca983e1 100644 // on Linux via /proc/self/exe, so they end up with a different // name. We must collect them in a second pass. diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc -index 78ba891..54be333 100644 +index 438a34c..5eb3588 100644 --- chrome/test/in_process_browser_test.cc +++ chrome/test/in_process_browser_test.cc -@@ -37,7 +37,7 @@ +@@ -38,7 +38,7 @@ #include "net/base/mock_host_resolver.h" #include "sandbox/src/dep.h" @@ -3199,7 +3600,7 @@ index 78ba891..54be333 100644 #include "base/singleton.h" #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" #include "chrome/browser/zygote_host_linux.h" -@@ -196,7 +196,7 @@ void InProcessBrowserTest::SetUp() { +@@ -213,7 +213,7 @@ void InProcessBrowserTest::SetUp() { #endif CHECK(PathService::Override(base::FILE_EXE, chrome_path)); @@ -3209,23 +3610,23 @@ index 78ba891..54be333 100644 // for InProcessBrowserTest, and this is not the normal browser startup path. Singleton<LinuxHostInit>::get(); diff --git a/chrome/test/interactive_ui/interactive_ui_tests.gypi b/chrome/test/interactive_ui/interactive_ui_tests.gypi -index 603b7fa..920204a 100644 +index 2da3179..7ad785e 100644 --- chrome/test/interactive_ui/interactive_ui_tests.gypi +++ chrome/test/interactive_ui/interactive_ui_tests.gypi -@@ -48,7 +48,7 @@ +@@ -52,7 +52,7 @@ '<(DEPTH)/chrome/test/unit/chrome_test_suite.h', ], 'conditions': [ -- ['OS=="linux" and toolkit_views==0 and chromeos==0', { -+ ['(OS=="linux" or OS=="freebsd") and toolkit_views==0 and chromeos==0', { +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { 'dependencies': [ '<(DEPTH)/build/linux/system.gyp:gtk', - '<(DEPTH)/tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', + '<(DEPTH)/build/linux/system.gyp:nss', diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc -index 96f678e..e3282fe 100644 +index 1f5b49a..6aac289 100644 --- chrome/test/page_cycler/page_cycler_test.cc +++ chrome/test/page_cycler/page_cycler_test.cc -@@ -292,7 +292,7 @@ class PageCyclerReferenceTest : public PageCyclerTest { +@@ -286,7 +286,7 @@ class PageCyclerReferenceTest : public PageCyclerTest { dir = dir.AppendASCII("reference_build"); #if defined(OS_WIN) dir = dir.AppendASCII("chrome"); @@ -3235,18 +3636,18 @@ index 96f678e..e3282fe 100644 #elif defined(OS_MACOSX) dir = dir.AppendASCII("chrome_mac"); diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc -index 8d63696..5da2c7e 100644 +index e39d342..ce3bcf5 100644 --- chrome/test/reliability/page_load_test.cc +++ chrome/test/reliability/page_load_test.cc -@@ -159,7 +159,7 @@ class PageLoadTest : public UITest { +@@ -162,7 +162,7 @@ class PageLoadTest : public UITest { scoped_ptr<FileVersionInfo> file_info; #if defined(OS_WIN) file_info.reset(FileVersionInfo::CreateFileVersionInfo(kChromeDll)); -#elif defined(OS_LINUX) || defined(OS_MACOSX) +#elif defined(OS_POSIX) - // TODO(fmeawad): the version retrieved here belongs to the test module and - // not the chrome binary, need to be changed to chrome binary instead. - file_info.reset(FileVersionInfo::CreateFileVersionInfoForCurrentModule()); + // TODO(fmeawad): On Mac, the version retrieved here belongs to the test + // module and not the chrome binary, need to be changed to chrome binary + // instead. diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc index df68386..f39143e 100644 --- chrome/test/startup/feature_startup_test.cc @@ -3261,23 +3662,23 @@ index df68386..f39143e 100644 RunStartupTest("tab_gtk_theme_cold", false /* cold */, false /* not important */, diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc -index ff9ec7e..adc3a4d 100644 +index 7f6f47f..73055ee 100644 --- chrome/test/startup/startup_test.cc +++ chrome/test/startup/startup_test.cc -@@ -198,7 +198,7 @@ TEST_F(StartupTest, PerfColdComplexTheme) { - false /* not important */, UITest::COMPLEX_THEME); +@@ -389,7 +389,7 @@ TEST_F(StartupTest, PerfComplexTheme) { + UITest::COMPLEX_THEME, 0, 0); } -#if defined(OS_LINUX) -+#if defined(TOOLKIT_GTK) - TEST_F(StartupTest, PerfColdGtkTheme) { - RunStartupTest("warm", "gtk-theme", false /* warm */, - false /* not important */, UITest::NATIVE_THEME); ++#if defined(TOOLKIT_USES_GTK) + TEST_F(StartupTest, PerfGtkTheme) { + RunStartupTest("warm", "gtk-theme", WARM, NOT_IMPORTANT, + UITest::NATIVE_THEME, 0, 0); diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h -index b95b3a8..a035e1f 100644 +index c69af1c..974cb0a 100644 --- chrome/test/testing_browser_process.h +++ chrome/test/testing_browser_process.h -@@ -47,7 +47,7 @@ class TestingBrowserProcess : public BrowserProcess { +@@ -48,7 +48,7 @@ class TestingBrowserProcess : public BrowserProcess { return NULL; } @@ -3287,10 +3688,10 @@ index b95b3a8..a035e1f 100644 return NULL; } diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc -index a69e2e2..bd63440 100644 +index 60e423a..2805b7b 100644 --- chrome/test/testing_profile.cc +++ chrome/test/testing_profile.cc -@@ -20,7 +20,7 @@ +@@ -22,7 +22,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "webkit/database/database_tracker.h" @@ -3299,7 +3700,7 @@ index a69e2e2..bd63440 100644 #include "chrome/browser/gtk/gtk_theme_provider.h" #endif -@@ -286,7 +286,7 @@ webkit_database::DatabaseTracker* TestingProfile::GetDatabaseTracker() { +@@ -295,7 +295,7 @@ webkit_database::DatabaseTracker* TestingProfile::GetDatabaseTracker() { void TestingProfile::InitThemes() { if (!created_theme_provider_) { @@ -3309,40 +3710,18 @@ index a69e2e2..bd63440 100644 #else theme_provider_.reset(new BrowserThemeProvider); diff --git a/chrome/test/ui/history_uitest.cc b/chrome/test/ui/history_uitest.cc -index 47f18a2..20b6986 100644 +index 45e0983..9310407 100644 --- chrome/test/ui/history_uitest.cc +++ chrome/test/ui/history_uitest.cc -@@ -76,7 +76,7 @@ TEST_F(HistoryTester, DISABLED_VerifyHistoryLength3) { - kTestCompleteSuccess, action_max_timeout_ms()); - } - --#if defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_NIX) - // Flaky, http://crbug.com/39785. - TEST_F(HistoryTester, FLAKY_ConsiderRedirectAfterGestureAsUserInitiated) { - // Test the history length for the following page transition. -@@ -110,7 +110,7 @@ TEST_F(HistoryTester, FLAKY_ConsiderRedirectAfterGestureAsUserInitiated) { +@@ -116,7 +116,7 @@ TEST_F(HistoryTester, ConsiderRedirectAfterGestureAsUserInitiated) { WaitForFinish("History_Length_Test_12", "1", url, kTestCompleteCookie, kTestCompleteSuccess, action_max_timeout_ms()); } -#endif // defined(OS_WIN) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_NIX) - // Flaky, http://crbug.com/39785. - TEST_F(HistoryTester, FLAKY_ConsiderSlowRedirectAsUserInitiated) { -diff --git a/chrome/test/ui/npapi_test_helper.cc b/chrome/test/ui/npapi_test_helper.cc -index d5e24ad..8e80880 100644 ---- chrome/test/ui/npapi_test_helper.cc -+++ chrome/test/ui/npapi_test_helper.cc -@@ -20,7 +20,7 @@ static const char kNpapiTestPluginName[] = "npapi_test_plugin.dll"; - #elif defined(OS_MACOSX) - static const char kNpapiTestPluginName[] = "npapi_test_plugin.plugin"; - static const char kLayoutPluginName[] = "TestNetscapePlugIn.plugin"; --#elif defined(OS_LINUX) -+#elif defined(OS_NIX) - static const char kNpapiTestPluginName[] = "libnpapi_test_plugin.so"; - #endif - + TEST_F(HistoryTester, ConsiderSlowRedirectAsUserInitiated) { + // Test the history length for the following page transition. diff --git a/chrome/test/ui/sunspider_uitest.cc b/chrome/test/ui/sunspider_uitest.cc index 1c4f484..b544407 100644 --- chrome/test/ui/sunspider_uitest.cc @@ -3357,7 +3736,7 @@ index 1c4f484..b544407 100644 #elif defined(OS_MACOSX) dir = dir.AppendASCII("chrome_mac"); diff --git a/chrome/test/ui/ui_layout_test.cc b/chrome/test/ui/ui_layout_test.cc -index f5be28d..61e8d79 100644 +index 6c5415f..2472bda 100644 --- chrome/test/ui/ui_layout_test.cc +++ chrome/test/ui/ui_layout_test.cc @@ -18,7 +18,7 @@ @@ -3370,10 +3749,10 @@ index f5be28d..61e8d79 100644 #else #error No known OS defined diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc -index f9c5151..fce148a 100644 +index 90e1550..efc3f00 100644 --- chrome/test/ui/ui_test.cc +++ chrome/test/ui/ui_test.cc -@@ -64,7 +64,7 @@ const wchar_t UITestBase::kFailedNoCrashService[] = +@@ -66,7 +66,7 @@ const wchar_t UITestBase::kFailedNoCrashService[] = L"NOTE: This test is expected to fail if crash_service.exe is not " L"running. Start it manually before running this test (see the build " L"output directory)."; @@ -3382,7 +3761,7 @@ index f9c5151..fce148a 100644 L"NOTE: This test is expected to fail if breakpad is not built in " L"or if chromium is not running headless (try CHROME_HEADLESS=1)."; #else -@@ -1478,7 +1478,7 @@ void UITestBase::PrintMemoryUsageInfo(const char* test_name) { +@@ -1460,7 +1460,7 @@ void UITestBase::PrintMemoryUsageInfo(const char* test_name) { PrintResult("ws_final_t", "", "ws_f_t" + trace_name, total_working_set_size, "bytes", false /* not important */); @@ -3405,10 +3784,10 @@ index b020af1..ba8c221 100644 #elif defined(OS_MACOSX) dir = dir.AppendASCII("chrome_mac"); diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc -index 612d921..439ffc1 100644 +index c464229..214652e 100644 --- chrome/test/ui_test_utils.cc +++ chrome/test/ui_test_utils.cc -@@ -331,7 +331,7 @@ void RunMessageLoop() { +@@ -307,7 +307,7 @@ void RunMessageLoop() { #if defined(TOOLKIT_VIEWS) views::AcceleratorHandler handler; loop->Run(&handler); @@ -3418,7 +3797,7 @@ index 612d921..439ffc1 100644 #else loop->Run(); diff --git a/chrome/test/url_fetch_test/url_fetch_test.cc b/chrome/test/url_fetch_test/url_fetch_test.cc -index d4d3287..24e2a97 100644 +index ec87c76..3246efd 100644 --- chrome/test/url_fetch_test/url_fetch_test.cc +++ chrome/test/url_fetch_test/url_fetch_test.cc @@ -34,7 +34,7 @@ class UrlFetchTest : public UITest { @@ -3441,10 +3820,10 @@ index 22615cb..bc59956 100755 # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/chrome/worker/worker_uitest.cc b/chrome/worker/worker_uitest.cc -index d300a5e..61d8f6e 100644 +index 061c3f2..84a04a1 100644 --- chrome/worker/worker_uitest.cc +++ chrome/worker/worker_uitest.cc -@@ -83,7 +83,7 @@ class WorkerTest : public UILayoutTest { +@@ -84,7 +84,7 @@ class WorkerTest : public UILayoutTest { // The 1 is for the browser process. int number_of_processes = 1 + workers + (UITest::in_process_renderer() ? 0 : tabs); @@ -3453,139 +3832,142 @@ index d300a5e..61d8f6e 100644 // On Linux, we also have a zygote process and a sandbox host process. number_of_processes += 2; #endif -diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp -index da7172b..3921a52 100644 ---- gpu/gpu.gyp -+++ gpu/gpu.gyp -@@ -88,7 +88,7 @@ - '../third_party/glew/src/glew.c', - ], - 'conditions': [ -- [ 'OS=="linux"', -+ [ 'OS=="linux" or OS=="freebsd"', - { - 'all_dependent_settings': { - 'defines': [ -@@ -286,7 +286,7 @@ - '<@(gpu_service_source_files)', +diff --git a/gpu/demos/demos.gyp b/gpu/demos/demos.gyp +index a7ba2b9..2598548 100644 +--- gpu/demos/demos.gyp ++++ gpu/demos/demos.gyp +@@ -11,7 +11,7 @@ + # also be compiled with -fPIC flag. Setting GYP_DEFINES="linux_fpic=1" + # compiles everything with -fPIC. Disable pepper demos on linux/x64 + # unless linux_fpic is 1. +- ['OS=="linux" and (target_arch=="x64" or target_arch=="arm") and linux_fpic!=1', { ++ ['(OS=="linux" or OS=="freebsd") and (target_arch=="x64" or target_arch=="arm") and linux_fpic!=1', { + 'enable_pepper_demos%': 0, + }, { + 'enable_pepper_demos%': 1, +@@ -48,7 +48,7 @@ + 'framework/window.h', ], 'conditions': [ -- ['OS == "linux"', -+ ['OS == "linux" or OS=="freebsd"', - { - 'dependencies': [ - '../build/linux/system.gyp:gtk', -diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp -index 07141fe..a0fb0e5 100644 ---- ipc/ipc.gyp -+++ ipc/ipc.gyp -@@ -63,7 +63,7 @@ - '../views/views.gyp:views', - ], - }], - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { - 'conditions': [ - ['linux_use_tcmalloc==1', { - 'dependencies': [ -diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc -index f6b19f7..c4f99f4 100644 ---- ipc/ipc_channel_posix.cc -+++ ipc/ipc_channel_posix.cc -@@ -273,7 +273,7 @@ Channel::ChannelImpl::ChannelImpl(const std::string& channel_id, Mode mode, - server_listen_pipe_(-1), - pipe_(-1), - client_pipe_(-1), --#if defined(OS_LINUX) -+#if defined(OS_NIX) - fd_pipe_(-1), - remote_fd_pipe_(-1), - #endif -@@ -384,7 +384,7 @@ bool Channel::ChannelImpl::CreatePipe(const std::string& channel_id, - scoped_ptr<Message> msg(new Message(MSG_ROUTING_NONE, - HELLO_MESSAGE_TYPE, - IPC::Message::PRIORITY_NORMAL)); -- #if defined(OS_LINUX) -+ #if defined(OS_NIX) - if (!uses_fifo_) { - // On Linux, the seccomp sandbox makes it very expensive to call - // recvmsg() and sendmsg(). Often, we are perfectly OK with resorting to -@@ -460,7 +460,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() { - // Read from pipe. - // recvmsg() returns 0 if the connection has closed or EAGAIN if no data - // is waiting on the pipe. + 'dependencies': ['../../build/linux/system.gyp:gtk'], + }], + ], +@@ -103,7 +103,7 @@ + 'framework/plugin.rc', + ], + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + # -gstabs, used in the official builds, causes an ICE. Remove it. + 'cflags!': ['-gstabs'], + }], +diff --git a/gpu/demos/framework/main_exe.cc b/gpu/demos/framework/main_exe.cc +index bc42e6c..d1e1916 100644 +--- gpu/demos/framework/main_exe.cc ++++ gpu/demos/framework/main_exe.cc +@@ -6,9 +6,9 @@ + #include "base/logging.h" + #include "gpu/demos/framework/window.h" + -#if defined(OS_LINUX) -+#if defined(OS_NIX) - if (fd_pipe_ >= 0) { - bytes_read = HANDLE_EINTR(read(pipe_, input_buf_, - Channel::kReadBufferSize)); -@@ -592,7 +592,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() { - if (m.header()->num_fds > num_fds - fds_i) { - // the message has been completely received, but we didn't get - // enough file descriptors. ++#if defined(TOOLKIT_USES_GTK) + #include <gtk/gtk.h> +-#endif // OS_LINUX ++#endif // TOOLKIT_USES_GTK + + namespace { + static const int kWindowWidth = 512; +@@ -16,9 +16,9 @@ static const int kWindowHeight = 512; + } // namespace. + + int main(int argc, char *argv[]) { -#if defined(OS_LINUX) -+#if defined(OS_NIX) - if (!uses_fifo_) { - char dummy; - struct iovec fd_pipe_iov = { &dummy, 1 }; -@@ -677,7 +677,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() { - if (!m.ReadInt(&iter, &pid)) { - NOTREACHED(); - } ++#if defined(TOOLKIT_USES_GTK) + gtk_init(&argc, &argv); +-#endif // OS_LINUX ++#endif // TOOLKIT_USES_GTK + + // AtExitManager is used by singleton classes to delete themselves when + // the program terminates. +diff --git a/gpu/demos/framework/main_pepper.cc b/gpu/demos/framework/main_pepper.cc +index 887c853..108e645 100644 +--- gpu/demos/framework/main_pepper.cc ++++ gpu/demos/framework/main_pepper.cc +@@ -106,7 +106,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void* value) { + NPError err = NPERR_NO_ERROR; + + switch (variable) { -#if defined(OS_LINUX) +#if defined(OS_NIX) - if (mode_ == MODE_SERVER && !uses_fifo_) { - // On Linux, the Hello message from the client to the server - // also contains the fd_pipe_, which will be used for all -@@ -740,7 +740,7 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() { - while (!output_queue_.empty()) { - Message* msg = output_queue_.front(); + case NPPVpluginNameString: + *(static_cast<const char**>(value)) = "Pepper GPU Demo"; + break; +@@ -163,17 +163,17 @@ EXPORT NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* plugin_funcs) { + } + EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* browser_funcs -#if defined(OS_LINUX) +#if defined(OS_NIX) - scoped_ptr<Message> hello; - if (remote_fd_pipe_ != -1 && - msg->routing_id() == MSG_ROUTING_NONE && -@@ -801,7 +801,7 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() { - // num_fds < MAX_DESCRIPTORS_PER_MESSAGE so no danger of overflow. - msg->header()->num_fds = static_cast<uint16>(num_fds); + , NPPluginFuncs* plugin_funcs +-#endif // OS_LINUX ++#endif // OS_NIX + ) { + g_at_exit_manager = new base::AtExitManager(); + gpu::demos::g_browser = browser_funcs; + pglInitialize(); -#if defined(OS_LINUX) +#if defined(OS_NIX) - if (!uses_fifo_ && - (msg->routing_id() != MSG_ROUTING_NONE || - msg->type() != HELLO_MESSAGE_TYPE)) { -@@ -823,7 +823,7 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() { + NP_GetEntryPoints(plugin_funcs); +-#endif // OS_LINUX ++#endif // OS_NIX + return NPERR_NO_ERROR; + } - if (bytes_written == 1) { - fd_written = pipe_; --#if defined(OS_LINUX) -+#if defined(OS_NIX) - if (mode_ != MODE_SERVER && !uses_fifo_ && - msg->routing_id() == MSG_ROUTING_NONE && - msg->type() == HELLO_MESSAGE_TYPE) { -@@ -994,7 +994,7 @@ void Channel::ChannelImpl::Close() { - Singleton<PipeMap>()->RemoveAndClose(pipe_name_); - client_pipe_ = -1; - } --#if defined(OS_LINUX) -+#if defined(OS_NIX) - if (fd_pipe_ != -1) { - HANDLE_EINTR(close(fd_pipe_)); - fd_pipe_ = -1; -diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h -index dd45345..7cb4238 100644 ---- ipc/ipc_channel_posix.h -+++ ipc/ipc_channel_posix.h -@@ -86,7 +86,7 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher { - // pipe_ that is passed to the client. - int client_pipe_; +@@ -182,7 +182,7 @@ EXPORT void API_CALL NP_Shutdown() { + delete g_at_exit_manager; + } -#if defined(OS_LINUX) +#if defined(OS_NIX) - // Linux uses a dedicated socketpair() for passing file descriptors. - int fd_pipe_; - int remote_fd_pipe_; + EXPORT NPError API_CALL NP_GetValue(NPP instance, NPPVariable variable, + void* value) { + return gpu::demos::NPP_GetValue(instance, variable, value); +@@ -191,5 +191,5 @@ EXPORT NPError API_CALL NP_GetValue(NPP instance, NPPVariable variable, + EXPORT const char* API_CALL NP_GetMIMEDescription() { + return "pepper-application/x-gpu-demo::Pepper GPU Demo"; + } +-#endif // OS_LINUX ++#endif // OS_NIX + } // extern "C" +diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp +index 6c9a525..efc5751 100644 +--- gpu/gpu.gyp ++++ gpu/gpu.gyp +@@ -179,7 +179,7 @@ + 'command_buffer/service/texture_manager.cc', + ], + 'conditions': [ +- ['OS == "linux"', { ++ ['OS == "linux" or OS=="freebsd"', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], +diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp +index 5560abe..c393ba8 100644 +--- ipc/ipc.gyp ++++ ipc/ipc.gyp +@@ -58,7 +58,7 @@ + '../build/linux/system.gyp:gtk', + ], + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ diff --git a/ipc/sync_socket_unittest.cc b/ipc/sync_socket_unittest.cc index e07fdf9..b6e3372 100644 --- ipc/sync_socket_unittest.cc @@ -3603,7 +3985,7 @@ index e07fdf9..b6e3372 100644 #include "base/process_util.h" #include "base/sync_socket.h" diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc -index 7fa286e..633d36b 100644 +index 3b684ce..cd64c80 100644 --- media/base/media_switches.cc +++ media/base/media_switches.cc @@ -6,7 +6,7 @@ @@ -3616,7 +3998,7 @@ index 7fa286e..633d36b 100644 const char kAlsaDevice[] = "alsa-device"; #endif diff --git a/media/base/media_switches.h b/media/base/media_switches.h -index 28e3bb6..d0d9e1d 100644 +index 6e0e0d3..69b264f 100644 --- media/base/media_switches.h +++ media/base/media_switches.h @@ -11,7 +11,7 @@ @@ -3629,10 +4011,10 @@ index 28e3bb6..d0d9e1d 100644 #endif diff --git a/media/media.gyp b/media/media.gyp -index c12aabf..f509df6 100644 +index 7ef2bae..9d92635 100644 --- media/media.gyp +++ media/media.gyp -@@ -389,7 +389,6 @@ +@@ -435,7 +435,6 @@ ], 'link_settings': { 'libraries': [ @@ -3640,8 +4022,44 @@ index c12aabf..f509df6 100644 '-lX11', '-lXrender', '-lXext', +diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc +index ffba57f..f567569 100644 +--- net/base/host_resolver_impl.cc ++++ net/base/host_resolver_impl.cc +@@ -133,13 +133,11 @@ class HostResolveFailedParams : public NetLog::EventParameters { + std::vector<int> GetAllGetAddrinfoOSErrors() { + int os_errors[] = { + #if defined(OS_POSIX) +- EAI_ADDRFAMILY, + EAI_AGAIN, + EAI_BADFLAGS, + EAI_FAIL, + EAI_FAMILY, + EAI_MEMORY, +- EAI_NODATA, + EAI_NONAME, + EAI_SERVICE, + EAI_SOCKTYPE, +@@ -726,7 +724,7 @@ HostResolverImpl::HostResolverImpl( + #if defined(OS_WIN) + EnsureWinsockInit(); + #endif +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + if (HaveOnlyLoopbackAddresses()) + additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY; + #endif +@@ -1059,7 +1057,7 @@ void HostResolverImpl::OnIPAddressChanged() { + ipv6_probe_job_ = new IPv6ProbeJob(this); + ipv6_probe_job_->Start(); + } +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + if (HaveOnlyLoopbackAddresses()) { + additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY; + } else { diff --git a/net/base/host_resolver_proc.cc b/net/base/host_resolver_proc.cc -index 84daae0..b22430d 100644 +index 804135c..08669e9 100644 --- net/base/host_resolver_proc.cc +++ net/base/host_resolver_proc.cc @@ -6,10 +6,6 @@ @@ -3663,20 +4081,8 @@ index 84daae0..b22430d 100644 #include "base/singleton.h" #include "base/thread_local_storage.h" #endif -diff --git a/net/base/listen_socket.cc b/net/base/listen_socket.cc -index 88e9592..c2eb003 100644 ---- net/base/listen_socket.cc -+++ net/base/listen_socket.cc -@@ -10,6 +10,7 @@ - #include <winsock2.h> - #elif defined(OS_POSIX) - #include <errno.h> -+#include <netinet/in.h> - #include <sys/socket.h> - #include <arpa/inet.h> - #include "net/base/net_errors.h" diff --git a/net/base/listen_socket_unittest.cc b/net/base/listen_socket_unittest.cc -index eb224c3..24c915a 100644 +index b38019d..38c0812 100644 --- net/base/listen_socket_unittest.cc +++ net/base/listen_socket_unittest.cc @@ -5,6 +5,7 @@ @@ -3687,61 +4093,26 @@ index eb224c3..24c915a 100644 #include "base/eintr_wrapper.h" #include "net/base/net_util.h" -diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc -index aa3934b..6feef0e 100644 ---- net/base/mime_util.cc -+++ net/base/mime_util.cc -@@ -189,7 +189,7 @@ static const char* const supported_media_types[] = { - "audio/ogg", - "application/ogg", - --#if defined(GOOGLE_CHROME_BUILD) -+//#if defined(GOOGLE_CHROME_BUILD) - // MPEG-4. - "video/mp4", - "video/x-m4v", -@@ -200,7 +200,7 @@ static const char* const supported_media_types[] = { - "audio/mp3", - "audio/x-mp3", - "audio/mpeg", --#endif -+//#endif - }; - - // List of supported codecs when passed in with <source type="...">. -@@ -208,10 +208,10 @@ static const char* const supported_media_types[] = { - // Refer to http://wiki.whatwg.org/wiki/Video_type_parameters#Browser_Support - // for more information. - static const char* const supported_media_codecs[] = { --#if defined(GOOGLE_CHROME_BUILD) -+//#if defined(GOOGLE_CHROME_BUILD) - "avc1", - "mp4a", --#endif -+//#endif - "theora", - "vorbis", - }; diff --git a/net/base/net_util.cc b/net/base/net_util.cc -index 099746b..7b3e6ed 100644 +index c7b6a6f..166bcf7 100644 --- net/base/net_util.cc +++ net/base/net_util.cc -@@ -24,8 +24,9 @@ +@@ -24,9 +24,9 @@ #include <fcntl.h> #include <ifaddrs.h> #include <netdb.h> --#include <net/if.h> - #include <sys/socket.h> -+#include <net/if.h> -+#include <netinet/in.h> ++#include <sys/socket.h> + #include <net/if.h> + #include <netinet/in.h> +-#include <sys/socket.h> #endif #include "base/base64.h" diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc -index aeca2ab..7ffc296 100644 +index a0bc6b5..7db2396 100644 --- net/base/network_change_notifier.cc +++ net/base/network_change_notifier.cc -@@ -24,7 +24,6 @@ NetworkChangeNotifier::CreateDefaultNetworkChangeNotifier() { +@@ -37,7 +37,6 @@ NetworkChangeNotifier* NetworkChangeNotifier::Create() { #elif defined(OS_MACOSX) return new NetworkChangeNotifierMac(); #else @@ -3749,36 +4120,11 @@ index aeca2ab..7ffc296 100644 return NULL; #endif } -diff --git a/net/base/sys_addrinfo.h b/net/base/sys_addrinfo.h -index cfdd424..3f8c859 100644 ---- net/base/sys_addrinfo.h -+++ net/base/sys_addrinfo.h -@@ -22,3 +22,7 @@ - #include <netdb.h> - #endif - -+#if defined(OS_FREEBSD) -+#include <netinet/in.h> -+#include <sys/socket.h> -+#endif -diff --git a/net/base/x509_certificate_unittest.cc b/net/base/x509_certificate_unittest.cc -index fb550ad..63ddd92 100644 ---- net/base/x509_certificate_unittest.cc -+++ net/base/x509_certificate_unittest.cc -@@ -294,7 +294,7 @@ TEST(X509CertificateTest, PaypalNullCertParsing) { - // Either the system crypto library should correctly report a certificate - // name mismatch, or our certificate blacklist should cause us to report an - // invalid certificate. --#if defined(OS_LINUX) || defined(OS_WIN) -+#if !defined(OS_MACOSX) - EXPECT_NE(0, verify_result.cert_status & - (CERT_STATUS_COMMON_NAME_INVALID | CERT_STATUS_INVALID)); - #endif diff --git a/net/net.gyp b/net/net.gyp -index a0602e1..75e52f3 100644 +index 98dc526..7fdddc9 100644 --- net/net.gyp +++ net/net.gyp -@@ -110,11 +110,9 @@ +@@ -115,11 +115,9 @@ 'base/net_util_win.cc', 'base/network_change_notifier.cc', 'base/network_change_notifier.h', @@ -3790,32 +4136,23 @@ index a0602e1..75e52f3 100644 'base/network_change_notifier_netlink_linux.h', 'base/network_change_notifier_win.cc', 'base/network_change_notifier_win.h', -@@ -543,6 +541,7 @@ - '../build/linux/system.gyp:gdk', - '../build/linux/system.gyp:nss', +@@ -579,6 +577,7 @@ ], -+ 'sources!': [ 'proxy/proxy_config_service_linux.cc', ], }], - [ 'OS == "win"', { - 'sources!': [ -@@ -570,7 +569,7 @@ - ], [ 'OS == "linux" or OS == "freebsd" or OS == "openbsd"', { - }, -- { # else: OS != "linux" -+ { # else: OS != "linux" and OS != "freebsd" - 'sources!': [ - 'ocsp/nss_ocsp.cc', - 'ocsp/nss_ocsp.h', -@@ -689,7 +688,6 @@ - 'proxy/init_proxy_resolver_unittest.cc', ++ 'sources!': [ 'proxy/proxy_config_service_linux.cc', ], + 'dependencies': [ + '../build/linux/system.gyp:gconf', + '../build/linux/system.gyp:gdk', +@@ -742,7 +741,6 @@ 'proxy/mock_proxy_resolver.h', + 'proxy/multi_threaded_proxy_resolver_unittest.cc', 'proxy/proxy_bypass_rules_unittest.cc', - 'proxy/proxy_config_service_linux_unittest.cc', 'proxy/proxy_config_service_win_unittest.cc', 'proxy/proxy_config_unittest.cc', 'proxy/proxy_list_unittest.cc', -@@ -732,7 +730,7 @@ +@@ -795,7 +793,7 @@ ], }, ], @@ -3824,7 +4161,7 @@ index a0602e1..75e52f3 100644 'conditions': [ ['linux_use_tcmalloc==1', { 'dependencies': [ -@@ -844,7 +842,7 @@ +@@ -930,7 +928,7 @@ '../build/linux/system.gyp:nss', ], }], @@ -3833,60 +4170,20 @@ index a0602e1..75e52f3 100644 'conditions': [ ['linux_use_tcmalloc==1', { 'dependencies': [ -diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc -index db00c55..dc1ad71 100644 ---- net/socket/tcp_client_socket_libevent.cc -+++ net/socket/tcp_client_socket_libevent.cc -@@ -9,6 +9,9 @@ - #include <netdb.h> - #include <sys/socket.h> - #include <netinet/tcp.h> -+#if defined(OS_FREEBSD) -+#include <netinet/in.h> -+#endif - - #include "base/eintr_wrapper.h" - #include "base/message_loop.h" -diff --git a/net/third_party/nss/nss.gyp b/net/third_party/nss/nss.gyp -index 1e7ef49..3ec44c0 100644 ---- net/third_party/nss/nss.gyp -+++ net/third_party/nss/nss.gyp -@@ -4,7 +4,7 @@ - - { - 'conditions': [ -- [ 'OS == "linux"', { -+ [ 'OS == "linux" or OS == "freebsd"', { - 'conditions': [ - ['sysroot!=""', { - 'variables': { -@@ -77,7 +77,7 @@ - 'NO_NSPR_10_SUPPORT', - ], - 'conditions': [ -- [ 'OS == "linux"', { -+ [ 'OS == "linux" or OS == "freebsd"', { - 'sources!': [ - 'ssl/os2_err.c', - 'ssl/os2_err.h', -diff --git a/net/tools/hresolv/hresolv.cc b/net/tools/hresolv/hresolv.cc -index f092703..4c7a0b8 100644 ---- net/tools/hresolv/hresolv.cc -+++ net/tools/hresolv/hresolv.cc -@@ -50,7 +50,7 @@ static const FlagName kAddrinfoFlagNames[] = { - {AI_V4MAPPED, "AI_V4MAPPED"}, - {AI_ALL, "AI_ALL"}, - {AI_ADDRCONFIG, "AI_ADDRCONFIG"}, --#if defined(OS_LINUX) || defined(OS_WIN) -+#if !defined(OS_MACOSX) - {AI_NUMERICSERV, "AI_NUMERICSERV"}, - #endif - }; diff --git a/printing/printing.gyp b/printing/printing.gyp -index 2e255a0..d4cbf49 100644 +index ec1872a..649e500 100644 --- printing/printing.gyp +++ printing/printing.gyp -@@ -113,14 +113,12 @@ +@@ -103,7 +103,7 @@ + 'units_unittest.cc', + ], + 'conditions': [ +- ['OS!="linux"', {'sources/': [['exclude', '_cairo_unittest\\.cc$']]}], ++ ['OS!="linux" and OS!="freebsd"', {'sources/': [['exclude', '_cairo_unittest\\.cc$']]}], + ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}], + ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']] + }, { # else: OS=="win" +@@ -114,14 +114,12 @@ 'dependencies': [ '../build/linux/system.gyp:gtk', ], @@ -3905,273 +4202,64 @@ index 2e255a0..d4cbf49 100644 ], }], ], -diff --git a/sandbox/sandbox.gyp b/sandbox/sandbox.gyp -index a835089..19a5714 100644 ---- sandbox/sandbox.gyp -+++ sandbox/sandbox.gyp -@@ -126,6 +126,15 @@ - ], +diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc +index 035fa32..8efbd2b 100644 +--- remoting/host/simple_host_process.cc ++++ remoting/host/simple_host_process.cc +@@ -34,7 +34,7 @@ + #if defined(OS_WIN) + #include "remoting/host/capturer_gdi.h" + #include "remoting/host/event_executor_win.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + #include "remoting/host/capturer_linux.h" + #include "remoting/host/event_executor_linux.h" + #elif defined(OS_MACOSX) +@@ -77,7 +77,7 @@ int main(int argc, char** argv) { + #if defined(OS_WIN) + capturer.reset(new remoting::CapturerGdi()); + executor.reset(new remoting::EventExecutorWin()); +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + capturer.reset(new remoting::CapturerLinux()); + executor.reset(new remoting::EventExecutorLinux()); + #elif defined(OS_MACOSX) +diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp +index bda9e60..cf19115 100644 +--- remoting/remoting.gyp ++++ remoting/remoting.gyp +@@ -16,7 +16,7 @@ }, - 'conditions': [ -+ [ 'OS=="freebsd"', { -+ # GYP requires that each file have at least one target defined. -+ 'targets': [ -+ { -+ 'target_name': 'sandbox', -+ 'type': 'settings', -+ }, -+ ], -+ }], - [ 'OS=="linux" and selinux==0', { - 'targets': [ - { -diff --git a/skia/ext/image_operations.cc b/skia/ext/image_operations.cc -index f6ee4ca..818846c 100644 ---- skia/ext/image_operations.cc -+++ skia/ext/image_operations.cc -@@ -271,7 +271,7 @@ SkBitmap ImageOperations::ResizeSubpixel(const SkBitmap& source, - const SkIRect& dest_subset) { - // Currently only works on Linux because this is the only platform where - // SkFontHost::GetSubpixelOrder is defined. --#if defined(OS_LINUX) -+#if defined(OS_NIX) - // Understand the display. - const SkFontHost::LCDOrder order = SkFontHost::GetSubpixelOrder(); - const SkFontHost::LCDOrientation orientation = -@@ -361,7 +361,7 @@ SkBitmap ImageOperations::ResizeSubpixel(const SkBitmap& source, - return result; - #else - return SkBitmap(); --#endif // OS_LINUX -+#endif // OS_NIX - } - // static -diff --git a/skia/skia.gyp b/skia/skia.gyp -index d9fb72e..ca01718 100644 ---- skia/skia.gyp -+++ skia/skia.gyp -@@ -692,7 +692,7 @@ - '../third_party/skia/src/core', - ], - 'conditions': [ -- [ 'OS == "linux" and target_arch != "arm"', { -+ [ '(OS == "linux" or OS == "freebsd") and target_arch != "arm"', { - 'cflags': [ - '-msse2', - ], -diff --git a/third_party/bzip2/bzip2.gyp b/third_party/bzip2/bzip2.gyp -index c0f36e0..aa612bb 100644 ---- third_party/bzip2/bzip2.gyp -+++ third_party/bzip2/bzip2.gyp -@@ -5,7 +5,7 @@ - { - 'variables': { - 'conditions': [ -- [ 'OS=="linux"', { -+ [ 'OS=="linux" or OS=="freebsd"', { - # Link to system .so since we already use it due to GTK. - 'use_system_bzip2%': 1, - }, { # OS!="linux" -diff --git a/third_party/expat/expat.gyp b/third_party/expat/expat.gyp -index ab017f6..f8ff168 100644 ---- third_party/expat/expat.gyp -+++ third_party/expat/expat.gyp -@@ -15,7 +15,7 @@ - ] - }, 'conditions': [ -- ['OS=="linux"', { -+ ['OS=="linux" or OS=="freebsd"', { - # On Linux, we implicitly already depend on expat via fontconfig; - # let's not pull it in twice. +- ['OS=="linux" or OS=="mac"', { ++ ['OS=="linux" or OS=="freebsd" or OS=="mac"', { 'targets': [ -@@ -59,7 +59,7 @@ - 'COMPILED_FROM_DSP', - ], - }], -- ['OS=="mac"', { -+ ['OS=="mac" or OS=="freebsd"', { - 'defines': [ - 'HAVE_EXPAT_CONFIG_H', - ], -diff --git a/third_party/ffmpeg/ffmpeg.gyp b/third_party/ffmpeg/ffmpeg.gyp -index 2b577cb..c6efe20 100644 ---- third_party/ffmpeg/ffmpeg.gyp -+++ third_party/ffmpeg/ffmpeg.gyp -@@ -62,7 +62,7 @@ - 'ffmpeg_variant%': '<(target_arch)', - - 'use_system_ffmpeg%': 0, -- 'use_system_yasm%': 0, -+ 'use_system_yasm%': 1, - 'build_ffmpegsumo%': 1, - - # Locations for generated artifacts. -@@ -127,11 +127,11 @@ - 'source/patched-ffmpeg-mt/libavutil/pixdesc.c', - 'source/patched-ffmpeg-mt/libavutil/rational.c', - # Config file for the OS and architecture. -- 'source/config/<(ffmpeg_branding)/<(OS)/<(ffmpeg_config)/config.h', -+ 'source/config/<(ffmpeg_branding)/linux/<(ffmpeg_config)/config.h', - 'source/config/libavutil/avconfig.h', + # Simple webserver for testing chromoting client plugin. + { +@@ -187,7 +187,7 @@ + 'host/event_executor_win.h', ], - 'include_dirs': [ -- 'source/config/<(ffmpeg_branding)/<(OS)/<(ffmpeg_config)', -+ 'source/config/<(ffmpeg_branding)/linux/<(ffmpeg_config)', - 'source/patched-ffmpeg-mt', - 'source/config', + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'sources': [ + 'host/capturer_linux.cc', + 'host/capturer_linux.h', +@@ -374,7 +374,7 @@ + 'host/capturer_gdi_unittest.cc', ], -@@ -757,7 +757,7 @@ - - 'conditions': [ - # Non-Mac platforms need libdl for dlopen() and friends. -- ['OS!="mac"', { -+ ['OS!="mac" and OS!="freebsd"', { - 'link_settings': { - 'libraries': [ - '-ldl', -diff --git a/third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h b/third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h -index d53b272..efeb2b5 100644 ---- third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h -+++ third_party/ffmpeg/source/config/Chrome/linux/ia32/config.h -@@ -45,7 +45,7 @@ - #define HAVE_NEON 0 - #define HAVE_PPC4XX 0 - #define HAVE_SSE 1 --#define HAVE_SSSE3 1 -+#define HAVE_SSSE3 0 - #define HAVE_VIS 0 - #define HAVE_BIGENDIAN 0 - #define HAVE_BEOSTHREADS 0 -@@ -94,16 +94,16 @@ - #define HAVE_LLRINT 1 - #define HAVE_LOCAL_ALIGNED_16 1 - #define HAVE_LOCAL_ALIGNED_8 1 --#define HAVE_LOG2 1 --#define HAVE_LOG2F 1 -+#define HAVE_LOG2 0 -+#define HAVE_LOG2F 0 - #define HAVE_LOONGSON 0 - #define HAVE_LRINT 1 - #define HAVE_LRINTF 1 - #define HAVE_LZO1X_999_COMPRESS 0 - #define HAVE_MACHINE_IOCTL_BT848_H 0 - #define HAVE_MACHINE_IOCTL_METEOR_H 0 --#define HAVE_MALLOC_H 1 --#define HAVE_MEMALIGN 1 -+#define HAVE_MALLOC_H 0 -+#define HAVE_MEMALIGN 0 - #define HAVE_MKSTEMP 1 - #define HAVE_PLD 0 - #define HAVE_POSIX_MEMALIGN 1 -diff --git a/third_party/ffmpeg/source/config/Chrome/linux/x64/config.h b/third_party/ffmpeg/source/config/Chrome/linux/x64/config.h -index 2d528b4..053ea45 100644 ---- third_party/ffmpeg/source/config/Chrome/linux/x64/config.h -+++ third_party/ffmpeg/source/config/Chrome/linux/x64/config.h -@@ -45,7 +45,7 @@ - #define HAVE_NEON 0 - #define HAVE_PPC4XX 0 - #define HAVE_SSE 1 --#define HAVE_SSSE3 1 -+#define HAVE_SSSE3 0 - #define HAVE_VIS 0 - #define HAVE_BIGENDIAN 0 - #define HAVE_BEOSTHREADS 0 -@@ -94,16 +94,16 @@ - #define HAVE_LLRINT 1 - #define HAVE_LOCAL_ALIGNED_16 1 - #define HAVE_LOCAL_ALIGNED_8 1 --#define HAVE_LOG2 1 --#define HAVE_LOG2F 1 -+#define HAVE_LOG2 0 -+#define HAVE_LOG2F 0 - #define HAVE_LOONGSON 0 - #define HAVE_LRINT 1 - #define HAVE_LRINTF 1 - #define HAVE_LZO1X_999_COMPRESS 0 - #define HAVE_MACHINE_IOCTL_BT848_H 0 - #define HAVE_MACHINE_IOCTL_METEOR_H 0 --#define HAVE_MALLOC_H 1 --#define HAVE_MEMALIGN 1 -+#define HAVE_MALLOC_H 0 -+#define HAVE_MEMALIGN 0 - #define HAVE_MKSTEMP 1 - #define HAVE_PLD 0 - #define HAVE_POSIX_MEMALIGN 1 -diff --git a/third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h b/third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h -index c11882d..1f77aab 100644 ---- third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h -+++ third_party/ffmpeg/source/config/Chromium/linux/ia32/config.h -@@ -45,7 +45,7 @@ - #define HAVE_NEON 0 - #define HAVE_PPC4XX 0 - #define HAVE_SSE 1 --#define HAVE_SSSE3 1 -+#define HAVE_SSSE3 0 - #define HAVE_VIS 0 - #define HAVE_BIGENDIAN 0 - #define HAVE_BEOSTHREADS 0 -@@ -94,16 +94,16 @@ - #define HAVE_LLRINT 1 - #define HAVE_LOCAL_ALIGNED_16 1 - #define HAVE_LOCAL_ALIGNED_8 1 --#define HAVE_LOG2 1 --#define HAVE_LOG2F 1 -+#define HAVE_LOG2 0 -+#define HAVE_LOG2F 0 - #define HAVE_LOONGSON 0 - #define HAVE_LRINT 1 - #define HAVE_LRINTF 1 - #define HAVE_LZO1X_999_COMPRESS 0 - #define HAVE_MACHINE_IOCTL_BT848_H 0 - #define HAVE_MACHINE_IOCTL_METEOR_H 0 --#define HAVE_MALLOC_H 1 --#define HAVE_MEMALIGN 1 -+#define HAVE_MALLOC_H 0 -+#define HAVE_MEMALIGN 0 - #define HAVE_MKSTEMP 1 - #define HAVE_PLD 0 - #define HAVE_POSIX_MEMALIGN 1 -diff --git a/third_party/ffmpeg/source/config/Chromium/linux/x64/config.h b/third_party/ffmpeg/source/config/Chromium/linux/x64/config.h -index e834a9d..e4aef46 100644 ---- third_party/ffmpeg/source/config/Chromium/linux/x64/config.h -+++ third_party/ffmpeg/source/config/Chromium/linux/x64/config.h -@@ -45,7 +45,7 @@ - #define HAVE_NEON 0 - #define HAVE_PPC4XX 0 - #define HAVE_SSE 1 --#define HAVE_SSSE3 1 -+#define HAVE_SSSE3 0 - #define HAVE_VIS 0 - #define HAVE_BIGENDIAN 0 - #define HAVE_BEOSTHREADS 0 -@@ -94,16 +94,16 @@ - #define HAVE_LLRINT 1 - #define HAVE_LOCAL_ALIGNED_16 1 - #define HAVE_LOCAL_ALIGNED_8 1 --#define HAVE_LOG2 1 --#define HAVE_LOG2F 1 -+#define HAVE_LOG2 0 -+#define HAVE_LOG2F 0 - #define HAVE_LOONGSON 0 - #define HAVE_LRINT 1 - #define HAVE_LRINTF 1 - #define HAVE_LZO1X_999_COMPRESS 0 - #define HAVE_MACHINE_IOCTL_BT848_H 0 - #define HAVE_MACHINE_IOCTL_METEOR_H 0 --#define HAVE_MALLOC_H 1 --#define HAVE_MEMALIGN 1 -+#define HAVE_MALLOC_H 0 -+#define HAVE_MEMALIGN 0 - #define HAVE_MKSTEMP 1 - #define HAVE_PLD 0 - #define HAVE_POSIX_MEMALIGN 1 + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'dependencies': [ + # Needed for the following #include chain: + # base/run_all_unittests.cc diff --git a/third_party/glew/src/glew.c b/third_party/glew/src/glew.c -index d987695..ed2ac29 100644 +index 8d89d8a..00b011a 100644 --- third_party/glew/src/glew.c +++ third_party/glew/src/glew.c -@@ -107,7 +107,7 @@ void* NSGLGetProcAddress (const GLubyte *name) +@@ -162,7 +162,7 @@ void* NSGLGetProcAddress (const GLubyte *name) } #endif /* __APPLE__ */ @@ -4180,7 +4268,7 @@ index d987695..ed2ac29 100644 #include <dlfcn.h> #include <stdio.h> #include <stdlib.h> -@@ -143,7 +143,7 @@ void* dlGetProcAddress (const GLubyte* name) +@@ -198,7 +198,7 @@ void* dlGetProcAddress (const GLubyte* name) # if defined(__APPLE__) # define glewGetProcAddress(name) NSGLGetProcAddress(name) # else @@ -4470,117 +4558,32 @@ index 0000000..1e0ae89 +/* Define to unsigned int if you dont have it */ +/* #undef _EVENT_socklen_t */ +#endif -diff --git a/third_party/libjingle/files/talk/base/httpcommon.cc b/third_party/libjingle/files/talk/base/httpcommon.cc -index 0358121..1eec46b 100644 ---- third_party/libjingle/files/talk/base/httpcommon.cc -+++ third_party/libjingle/files/talk/base/httpcommon.cc -@@ -369,7 +369,7 @@ bool HttpDateToSeconds(const std::string& date, unsigned long* seconds) { - } - gmt = non_gmt + kTimeZoneOffsets[zindex] * 60 * 60; - } --#ifdef OSX -+#if defined(OSX) || defined(BSD) - tm *tm_for_timezone = localtime((time_t *)&gmt); - *seconds = gmt + tm_for_timezone->tm_gmtoff; - #else -diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp -index f501c6c..8380c9e 100644 ---- third_party/libjingle/libjingle.gyp -+++ third_party/libjingle/libjingle.gyp -@@ -46,6 +46,11 @@ - 'POSIX', - ], - }], -+ ['OS=="freebsd"', { -+ 'defines': [ -+ 'BSD', -+ ], -+ }], - ], - }, - 'targets': [ -diff --git a/third_party/libjpeg/libjpeg.gyp b/third_party/libjpeg/libjpeg.gyp -index 1b0798b..020c5f4 100644 ---- third_party/libjpeg/libjpeg.gyp -+++ third_party/libjpeg/libjpeg.gyp -@@ -5,10 +5,10 @@ - { - 'variables': { - 'conditions': [ -- [ 'OS=="linux"', { -+ [ 'OS=="linux" or OS=="freebsd"', { - # Link to system .so since we already use it due to GTK. - 'use_system_libjpeg%': 1, -- }, { # OS!="linux" -+ }, { # OS!="linux" and OS!="freebsd" - 'use_system_libjpeg%': 0, - }], - ], -diff --git a/third_party/libpng/libpng.gyp b/third_party/libpng/libpng.gyp -index d29d8c1..09a9805 100644 ---- third_party/libpng/libpng.gyp -+++ third_party/libpng/libpng.gyp -@@ -5,10 +5,10 @@ - { - 'variables': { - 'conditions': [ -- [ 'OS=="linux"', { -+ [ 'OS=="linux" or OS=="freebsd"', { - # Link to system .so since we already use it due to GTK. - 'use_system_libpng%': 1, -- }, { # OS!="linux" -+ }, { # OS!="linux" and OS!="freebsd" - 'use_system_libpng%': 0, - }], - ], diff --git a/third_party/libxslt/libxslt.gyp b/third_party/libxslt/libxslt.gyp -index 7dda868..7a749d9 100644 +index cc6a377..632749b 100644 --- third_party/libxslt/libxslt.gyp +++ third_party/libxslt/libxslt.gyp -@@ -17,7 +17,7 @@ +@@ -21,7 +21,7 @@ { 'target_name': 'libxslt', 'conditions': [ -- ['OS=="linux" and use_system_libxslt', { -+ ['(OS=="linux" or OS=="freebsd") and use_system_libxslt', { - 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ -diff --git a/third_party/npapi/npapi.gyp b/third_party/npapi/npapi.gyp -index 3e761de..1c46f46 100644 ---- third_party/npapi/npapi.gyp -+++ third_party/npapi/npapi.gyp -@@ -24,7 +24,7 @@ - 'bindings/npruntime.h', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['OS=="linux" or OS=="freebsd"', { - 'sources': [ - 'bindings/npapi_x11.h', - ], -diff --git a/third_party/sqlite/sqlite.gyp b/third_party/sqlite/sqlite.gyp -index d0cc7ec..4fa10b3 100644 ---- third_party/sqlite/sqlite.gyp -+++ third_party/sqlite/sqlite.gyp -@@ -29,7 +29,7 @@ - ], - }, - }], -- ['OS=="linux" and use_system_sqlite', { -+ ['(OS=="linux" or OS=="freebsd") and use_system_sqlite', { +- ['OS=="linux" and use_system_libxml', { ++ ['(OS=="linux" or OS=="freebsd") and use_system_libxml', { 'type': 'settings', 'direct_dependent_settings': { 'cflags': [ -@@ -226,7 +226,7 @@ - }, - ], - 'conditions': [ -- ['OS=="linux" and not use_system_sqlite', { -+ ['(OS=="linux" or OS=="freebsd") and not use_system_sqlite', { - 'targets': [ - { - 'target_name': 'sqlite_shell', +diff --git a/third_party/mesa/mesa.gyp b/third_party/mesa/mesa.gyp +index 277add5..23185e5 100644 +--- third_party/mesa/mesa.gyp ++++ third_party/mesa/mesa.gyp +@@ -7,7 +7,7 @@ + }, + 'target_defaults': { + 'conditions': [ +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'cflags': [ + '-fPIC', + ], diff --git a/third_party/tcmalloc/chromium/src/config.h b/third_party/tcmalloc/chromium/src/config.h index 812c67c..047b878 100644 --- third_party/tcmalloc/chromium/src/config.h @@ -4834,54 +4837,158 @@ index 0000000..d286c35 +#ifdef __MINGW32__ +#include "windows/mingw.h" +#endif -diff --git a/third_party/tcmalloc/tcmalloc.gyp b/third_party/tcmalloc/tcmalloc.gyp -index 8c86b3d..8d4849d 100644 ---- third_party/tcmalloc/tcmalloc.gyp -+++ third_party/tcmalloc/tcmalloc.gyp -@@ -205,7 +205,7 @@ - 'tcmalloc/src/profiler.cc', - ], - }], -- ['OS=="linux"', { -+ ['OS=="linux" or OS=="freebsd"', { - 'sources!': [ - 'page_heap.cc', - 'port.cc', -diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp -index 36613a7..6cf0efa 100644 ---- third_party/zlib/zlib.gyp -+++ third_party/zlib/zlib.gyp -@@ -5,10 +5,10 @@ - { - 'variables': { - 'conditions': [ -- [ 'OS=="linux"', { -+ [ 'OS=="linux" or OS=="freebsd"', { - # Link to system .so since we already use it due to GTK. - 'use_system_zlib%': 1, -- }, { # OS!="linux" -+ }, { # OS!="linux" and OS!="freebsd" - 'use_system_zlib%': 0, - }], - ], -diff --git a/webkit/glue/webkit_resources.grd b/webkit/glue/webkit_resources.grd -index 2d2df0f..4b3ff7a 100644 ---- webkit/glue/webkit_resources.grd -+++ webkit/glue/webkit_resources.grd -@@ -27,7 +27,7 @@ - <include name="IDR_MEDIA_SLIDER_THUMB" file="resources\media_slider_thumb.png" type="BINDATA" /> - <include name="IDR_MEDIA_VOLUME_SLIDER_THUMB" file="resources\media_volume_slider_thumb.png" type="BINDATA" /> - -- <if expr="os == 'linux2' or os == 'freebsd7' or os == 'openbsd4' or os == 'sunos5'"> -+ <if expr="os == 'linux2' or os.find('bsd') != -1 or os == 'sunos5'"> - <include name="IDR_LINUX_CHECKBOX_OFF" file="resources\linux-checkbox-off.png" type="BINDATA" /> - <include name="IDR_LINUX_CHECKBOX_ON" file="resources\linux-checkbox-on.png" type="BINDATA" /> - <include name="IDR_LINUX_CHECKBOX_DISABLED_OFF" file="resources\linux-checkbox-disabled-off.png" type="BINDATA" /> +diff --git a/webkit/glue/plugins/pepper_font.cc b/webkit/glue/plugins/pepper_font.cc +index 8bc48a3..1d7a655 100644 +--- webkit/glue/plugins/pepper_font.cc ++++ webkit/glue/plugins/pepper_font.cc +@@ -6,7 +6,7 @@ + + #include "webkit/glue/plugins/pepper_font.h" + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + #include <unistd.h> + #endif + +@@ -21,7 +21,7 @@ namespace { + + PP_Resource MatchFontWithFallback(PP_Module module_id, + const PP_FontDescription* description) { +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + PluginModule* module = PluginModule::FromPPModule(module_id); + if (!module) + return NULL; +@@ -73,7 +73,7 @@ Font::Font(PluginModule* module, int fd) + } + + Font::~Font() { +-#if defined (OS_LINUX) ++#if defined (OS_NIX) + close(fd_); + #endif + } +@@ -86,7 +86,7 @@ const PPB_Font* Font::GetInterface() { + bool Font::GetFontTable(uint32_t table, + void* output, + uint32_t* output_length) { +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + size_t temp_size = static_cast<size_t>(*output_length); + bool rv = webkit_glue::GetFontTable( + fd_, table, static_cast<uint8_t*>(output), &temp_size); +diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc +index dcc7ea2..215241e 100644 +--- webkit/glue/plugins/pepper_plugin_instance.cc ++++ webkit/glue/plugins/pepper_plugin_instance.cc +@@ -228,10 +228,10 @@ PluginInstance::PluginInstance(PluginDelegate* delegate, + find_identifier_(-1), + plugin_find_interface_(NULL), + plugin_zoom_interface_(NULL), +-#if defined (OS_LINUX) ++#if defined (OS_NIX) + num_pages_(0), + pdf_output_done_(false), +-#endif // defined (OS_LINUX) ++#endif // defined (OS_NIX) + plugin_print_interface_(NULL) { + memset(¤t_print_settings_, 0, sizeof(current_print_settings_)); + DCHECK(delegate); +@@ -542,17 +542,17 @@ int PluginInstance::PrintBegin(const gfx::Rect& printable_area, + if (!num_pages) + return 0; + current_print_settings_ = print_settings; +-#if defined (OS_LINUX) ++#if defined (OS_NIX) + num_pages_ = num_pages; + pdf_output_done_ = false; +-#endif // (OS_LINUX) ++#endif // (OS_NIX) + return num_pages; + } + + bool PluginInstance::PrintPage(int page_number, WebKit::WebCanvas* canvas) { + DCHECK(plugin_print_interface_); + PP_PrintPageNumberRange page_range; +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + if (current_print_settings_.format == PP_PRINTOUTPUTFORMAT_PDF) { + // On Linux we will try and output all pages as PDF in the first call to + // PrintPage. This is a temporary hack. +@@ -563,9 +563,9 @@ bool PluginInstance::PrintPage(int page_number, WebKit::WebCanvas* canvas) { + page_range.first_page_number = 0; + page_range.last_page_number = num_pages_ - 1; + } +-#else // defined(OS_LINUX) ++#else // defined(OS_NIX) + page_range.first_page_number = page_range.last_page_number = page_number; +-#endif // defined(OS_LINUX) ++#endif // defined(OS_NIX) + + PP_Resource print_output = + plugin_print_interface_->PrintPages(GetPPInstance(), &page_range, 1); +@@ -593,10 +593,10 @@ + memset(¤t_print_settings_, 0, sizeof(current_print_settings_)); + #if defined(OS_MACOSX) + last_printed_page_ = NULL; +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + num_pages_ = 0; + pdf_output_done_ = false; +-#endif // defined(OS_LINUX) ++#endif // defined(OS_NIX) + } + + bool PluginInstance::PrintPDFOutput(PP_Resource print_output, +@@ -619,7 +619,7 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output, + #endif // defined(OS_WIN) + + bool ret = false; +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + // On Linux we need to get the backing PdfPsMetafile and write the bits + // directly. + cairo_t* context = canvas->beginPlatformPaint(); +diff --git a/webkit/glue/plugins/pepper_plugin_instance.h b/webkit/glue/plugins/pepper_plugin_instance.h +index 4528a99..96d9c29 100644 +--- webkit/glue/plugins/pepper_plugin_instance.h ++++ webkit/glue/plugins/pepper_plugin_instance.h +@@ -184,7 +184,7 @@ + // to keep the pixels valid until CGContextEndPage is called. We use this + // variable to hold on to the pixels. + scoped_refptr<ImageData> last_printed_page_; +-#elif defined(OS_LINUX) ++#elif defined(OS_NIX) + // On Linux, we always send all pages from the renderer to the browser. + // So, if the plugin supports printPagesAsPDF we print the entire output + // in one shot in the first call to PrintPage. +@@ -195,7 +195,7 @@ + // Specifies whether we have already output all pages. This is used to ignore + // subsequent PrintPage requests. + bool pdf_output_done_; +-#endif // defined(OS_LINUX) ++#endif // defined(OS_NIX) + + // The plugin print interface. + const PPP_Printing* plugin_print_interface_; +diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h +index 541836b..5d3b64c 100644 +--- webkit/glue/webkit_glue.h ++++ webkit/glue/webkit_glue.h +@@ -265,7 +265,7 @@ std::string GetProductVersion(); + // Returns true if the embedder is running in single process mode. + bool IsSingleProcess(); + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + // Return a read-only file descriptor to the font which best matches the given + // properties or -1 on failure. + // charset: specifies the language(s) that the font must cover. See diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc -index 2ac34f8..671ac8a 100644 +index b05e7d9..9bcb0dd 100644 --- webkit/glue/webkitclient_impl.cc +++ webkit/glue/webkitclient_impl.cc -@@ -40,7 +40,7 @@ +@@ -37,7 +37,7 @@ #include "webkit/glue/websocketstreamhandle_impl.h" #include "webkit/glue/weburlloader_impl.h" @@ -4890,15 +4997,16 @@ index 2ac34f8..671ac8a 100644 #include "v8/include/v8.h" #endif -diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi -index 84c085f..9c94deb 100644 ---- webkit/tools/test_shell/test_shell.gypi -+++ webkit/tools/test_shell/test_shell.gypi -@@ -504,6 +504,7 @@ - ], - 'include_dirs': [ - '../../..', -+ '/usr/local/include', - ], - 'dependencies': [ - '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', +diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc +index bae6374..6f13174 100644 +--- webkit/support/webkit_support_glue.cc ++++ webkit/support/webkit_support_glue.cc +@@ -72,7 +72,7 @@ bool IsSingleProcess() { + return true; + } + +-#if defined(OS_LINUX) ++#if defined(OS_NIX) + int MatchFontWithFallback(const std::string& face, bool bold, + bool italic, int charset) { + return -1; diff --git a/www/chromium/files/patch-clang b/www/chromium/files/patch-clang index c7a941114140..41e786df6c65 100644 --- a/www/chromium/files/patch-clang +++ b/www/chromium/files/patch-clang @@ -1,3 +1,44 @@ +diff --git a/base/logging.h b/base/logging.h +index 2084739..d865744 100644 +--- base/logging.h ++++ base/logging.h +@@ -102,6 +102,18 @@ + // There is also the special severity of DFATAL, which logs FATAL in + // debug mode, ERROR in normal mode. + ++// XXX better comment -- must be before we use << and in global namespace ++// These functions are provided as a convenience for logging, which is where we ++// use streams (it is against Google style to use streams in other places). It ++// is designed to allow you to emit non-ASCII Unicode strings to the log file, ++// which is normally ASCII. It is relatively slow, so try not to use it for ++// common cases. Non-ASCII characters will be converted to UTF-8 by these ++// operators. ++std::ostream& operator<<(std::ostream& out, const wchar_t* wstr); ++inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { ++ return out << wstr.c_str(); ++} ++ + namespace logging { + + // Where to record logging output? A flat file and/or system debug log via +@@ -842,17 +854,6 @@ void RawLog(int level, const char* message); + + } // namespace logging + +-// These functions are provided as a convenience for logging, which is where we +-// use streams (it is against Google style to use streams in other places). It +-// is designed to allow you to emit non-ASCII Unicode strings to the log file, +-// which is normally ASCII. It is relatively slow, so try not to use it for +-// common cases. Non-ASCII characters will be converted to UTF-8 by these +-// operators. +-std::ostream& operator<<(std::ostream& out, const wchar_t* wstr); +-inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { +- return out << wstr.c_str(); +-} +- + // The NOTIMPLEMENTED() macro annotates codepaths which have + // not been implemented yet. + // diff -ru chrome/plugin/plugin_main_linux.cc.orig chrome/plugin/plugin_main_linux.cc --- chrome/plugin/plugin_main_linux.cc.orig 2010-10-23 17:25:49.000000000 -0700 +++ chrome/plugin/plugin_main_linux.cc 2010-10-23 13:57:10.000000000 -0700 @@ -10,18 +51,44 @@ diff -ru chrome/plugin/plugin_main_linux.cc.orig chrome/plugin/plugin_main_linux #include <unistd.h> #include "build/build_config.h" -diff -ru third_party/libjingle/files/talk/base/stringencode.cc.orig third_party/libjingle/files/talk/base/stringencode.cc ---- third_party/libjingle/files/talk/base/stringencode.cc.orig 2010-08-18 01:01:35.000000000 -0700 -+++ third_party/libjingle/files/talk/base/stringencode.cc 2010-10-23 13:51:39.000000000 -0700 -@@ -29,7 +29,7 @@ - #include <malloc.h> +--- net/base/ssl_config_service.h.orig 2010-09-21 08:01:26.000000000 +0000 ++++ net/base/ssl_config_service.h 2010-11-13 07:22:48.000000000 +0000 +@@ -121,10 +121,10 @@ + // True if we use False Start for SSL and TLS. + static bool false_start_enabled(); + +- protected: + // SetFlags sets the values of several flags based on global configuration. + static void SetSSLConfigFlags(SSLConfig*); + ++ protected: + friend class base::RefCountedThreadSafe<SSLConfigService>; + + virtual ~SSLConfigService() {} +--- third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/x86/dsputil_mmx.c.orig 2010-09-21 08:06:29.000000000 +0000 ++++ third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/x86/dsputil_mmx.c 2010-11-13 07:22:15.000000000 +0000 +@@ -615,7 +615,7 @@ + __asm__ volatile( + "mov %7, %3 \n" + "1: \n" +- "movzx (%3,%4), %2 \n" ++ "movzbl (%3,%4), %2 \n" + "mov %2, %k3 \n" + "sub %b1, %b3 \n" + "add %b0, %b3 \n" +Index: third_party/libjingle/source/talk/base/stringutils.h +=================================================================== +--- third_party/libjingle/source/talk/base/stringutils.h (revision 29) ++++ third_party/libjingle/source/talk/base/stringutils.h (working copy) +@@ -37,7 +37,7 @@ + #define alloca _alloca #endif // WIN32 #ifdef POSIX -#include <alloca.h> +#include <stdlib.h> - #define _alloca alloca #endif // POSIX - #include <stdlib.h> + + #include <cstring> diff -ru third_party/skia/include/core/SkPreConfig.h.orig third_party/skia/include/core/SkPreConfig.h --- third_party/skia/include/core/SkPreConfig.h.orig 2010-08-18 01:03:49.000000000 -0700 +++ third_party/skia/include/core/SkPreConfig.h 2010-10-23 12:54:33.000000000 -0700 @@ -34,100 +101,3 @@ diff -ru third_party/skia/include/core/SkPreConfig.h.orig third_party/skia/inclu ////////////////////////////////////////////////////////////////////// -diff -ru v8/src/frames.h.bak v8/src/frames.h ---- v8/src/frames.h.bak 2010-08-18 01:12:33.000000000 -0700 -+++ v8/src/frames.h 2010-10-23 13:37:54.000000000 -0700 -@@ -343,6 +343,7 @@ - - private: - friend class StackFrame; -+ friend class StackFrameIterator; - }; - - -diff -ru v8/src/ia32/assembler-ia32-inl.h.b v8/src/ia32/assembler-ia32-inl.h ---- v8/src/ia32/assembler-ia32-inl.h.b 2010-08-18 01:12:29.000000000 -0700 -+++ v8/src/ia32/assembler-ia32-inl.h 2010-10-23 17:41:21.000000000 -0700 -@@ -42,10 +42,6 @@ - namespace v8 { - namespace internal { - --Condition NegateCondition(Condition cc) { -- return static_cast<Condition>(cc ^ 1); --} -- - - // The modes possibly affected by apply must be in kApplyMask. - void RelocInfo::apply(intptr_t delta) { -diff -ru v8/src/ia32/assembler-ia32.h.orig v8/src/ia32/assembler-ia32.h ---- v8/src/ia32/assembler-ia32.h.orig 2010-08-18 01:12:29.000000000 -0700 -+++ v8/src/ia32/assembler-ia32.h 2010-10-23 17:41:41.000000000 -0700 -@@ -146,7 +146,9 @@ - // Negation of the default no_condition (-1) results in a non-default - // no_condition value (-2). As long as tests for no_condition check - // for condition < 0, this will work as expected. --inline Condition NegateCondition(Condition cc); -+inline Condition NegateCondition(Condition cc) { -+ return static_cast<Condition>(cc ^ 1); -+} - - // Corresponds to transposing the operands of a comparison. - inline Condition ReverseCondition(Condition cc) { -diff -ru v8/src/objects.cc.b v8/src/objects.cc ---- v8/src/objects.cc.b 2010-08-18 01:12:33.000000000 -0700 -+++ v8/src/objects.cc 2010-10-23 13:44:19.000000000 -0700 -@@ -7945,7 +7945,7 @@ - - template<typename Shape, typename Key> - Object* Dictionary<Shape, Key>::AtPut(Key key, Object* value) { -- int entry = FindEntry(key); -+ int entry = this->FindEntry(key); - - // If the entry is present set the value; - if (entry != Dictionary<Shape, Key>::kNotFound) { -@@ -7970,7 +7970,7 @@ - Object* value, - PropertyDetails details) { - // Valdate key is absent. -- SLOW_ASSERT((FindEntry(key) == Dictionary<Shape, Key>::kNotFound)); -+ SLOW_ASSERT((this->FindEntry(key) == Dictionary<Shape, Key>::kNotFound)); - // Check whether the dictionary should be extended. - Object* obj = EnsureCapacity(1, key); - if (obj->IsFailure()) return obj; -@@ -8029,7 +8029,7 @@ - Object* value, - PropertyDetails details) { - UpdateMaxNumberKey(key); -- SLOW_ASSERT(FindEntry(key) == kNotFound); -+ SLOW_ASSERT(this->FindEntry(key) == kNotFound); - return Add(key, value, details); - } - -diff -ru v8/src/x64/assembler-x64-inl.h.orig v8/src/x64/assembler-x64-inl.h ---- v8/src/x64/assembler-x64-inl.h.orig 2010-08-18 01:12:31.000000000 -0700 -+++ v8/src/x64/assembler-x64-inl.h 2010-10-23 16:27:50.000000000 -0700 -@@ -34,10 +34,6 @@ - namespace v8 { - namespace internal { - --Condition NegateCondition(Condition cc) { -- return static_cast<Condition>(cc ^ 1); --} -- - - // ----------------------------------------------------------------------------- - // Implementation of Assembler -diff -ru v8/src/x64/assembler-x64.h.orig v8/src/x64/assembler-x64.h ---- v8/src/x64/assembler-x64.h.orig 2010-08-18 01:12:31.000000000 -0700 -+++ v8/src/x64/assembler-x64.h 2010-10-23 16:28:37.000000000 -0700 -@@ -215,7 +215,9 @@ - // Negation of the default no_condition (-1) results in a non-default - // no_condition value (-2). As long as tests for no_condition check - // for condition < 0, this will work as expected. --inline Condition NegateCondition(Condition cc); -+inline Condition NegateCondition(Condition cc){ -+return static_cast<Condition>(cc ^ 1); -+} - - // Corresponds to transposing the operands of a comparison. - inline Condition ReverseCondition(Condition cc) { diff --git a/www/chromium/files/patch-codecs b/www/chromium/files/patch-codecs new file mode 100644 index 000000000000..a0ff71a88174 --- /dev/null +++ b/www/chromium/files/patch-codecs @@ -0,0 +1,187 @@ +Index: third_party/ffmpeg/ffmpeg.gyp +=================================================================== +--- third_party/ffmpeg/ffmpeg.gyp (revision 49485) ++++ third_party/ffmpeg/ffmpeg.gyp (working copy) +@@ -80,7 +80,7 @@ + 'ffmpeg_variant%': '<(target_arch)', + + 'use_system_ffmpeg%': 0, +- 'use_system_yasm%': 0, ++ 'use_system_yasm%': 1, + 'build_ffmpegsumo%': 1, + 'use_system_vpx%': 0, + +@@ -156,11 +156,11 @@ + 'patched-ffmpeg-mt/libavutil/pixdesc.c', + 'patched-ffmpeg-mt/libavutil/rational.c', + # Config file for the OS and architecture. +- 'config/<(ffmpeg_branding)/<(OS)/<(ffmpeg_config)/config.h', ++ 'config/<(ffmpeg_branding)/linux/<(ffmpeg_config)/config.h', + 'config/libavutil/avconfig.h', + ], + 'include_dirs': [ +- 'config/<(ffmpeg_branding)/<(OS)/<(ffmpeg_config)', ++ 'config/<(ffmpeg_branding)/linux/<(ffmpeg_config)', + 'patched-ffmpeg-mt', + 'config', + ], +@@ -417,8 +417,13 @@ + }], + ['use_system_vpx==0', { + 'ldflags': [ +- '-L<(libvpx_hack_dir)/lib/<(OS)/<(target_arch)', ++ '-L<(libvpx_hack_dir)/lib/linux/<(target_arch)', + ], ++ }, { ++ # Using libvpx provided by the system. ++ 'ldflags': [ ++ '-L/usr/local/lib', ++ ], + }], + ], + }, +@@ -476,7 +476,7 @@ + }, { + # Using libvpx provided by the system. + 'include_dirs': [ +- '/usr/include/vpx', ++ '/usr/local/include', + ], + } + ], +Index: third_party/ffmpeg/config/Chromium/linux/x64/config.h +=================================================================== +--- third_party/ffmpeg/config/Chromium/linux/x64/config.h (revision 49485) ++++ third_party/ffmpeg/config/Chromium/linux/x64/config.h (working copy) +@@ -45,7 +45,7 @@ + #define HAVE_NEON 0 + #define HAVE_PPC4XX 0 + #define HAVE_SSE 1 +-#define HAVE_SSSE3 1 ++#define HAVE_SSSE3 0 + #define HAVE_VIS 0 + #define HAVE_BIGENDIAN 0 + #define HAVE_BEOSTHREADS 0 +@@ -94,16 +94,16 @@ + #define HAVE_LLRINT 1 + #define HAVE_LOCAL_ALIGNED_16 1 + #define HAVE_LOCAL_ALIGNED_8 1 +-#define HAVE_LOG2 1 +-#define HAVE_LOG2F 1 ++#define HAVE_LOG2 0 ++#define HAVE_LOG2F 0 + #define HAVE_LOONGSON 0 + #define HAVE_LRINT 1 + #define HAVE_LRINTF 1 + #define HAVE_LZO1X_999_COMPRESS 0 + #define HAVE_MACHINE_IOCTL_BT848_H 0 + #define HAVE_MACHINE_IOCTL_METEOR_H 0 +-#define HAVE_MALLOC_H 1 +-#define HAVE_MEMALIGN 1 ++#define HAVE_MALLOC_H 0 ++#define HAVE_MEMALIGN 0 + #define HAVE_MKSTEMP 1 + #define HAVE_PLD 0 + #define HAVE_POSIX_MEMALIGN 1 +Index: third_party/ffmpeg/config/Chromium/linux/ia32/config.h +=================================================================== +--- third_party/ffmpeg/config/Chromium/linux/ia32/config.h (revision 49485) ++++ third_party/ffmpeg/config/Chromium/linux/ia32/config.h (working copy) +@@ -45,7 +45,7 @@ + #define HAVE_NEON 0 + #define HAVE_PPC4XX 0 + #define HAVE_SSE 1 +-#define HAVE_SSSE3 1 ++#define HAVE_SSSE3 0 + #define HAVE_VIS 0 + #define HAVE_BIGENDIAN 0 + #define HAVE_BEOSTHREADS 0 +@@ -94,16 +94,16 @@ + #define HAVE_LLRINT 1 + #define HAVE_LOCAL_ALIGNED_16 1 + #define HAVE_LOCAL_ALIGNED_8 1 +-#define HAVE_LOG2 1 +-#define HAVE_LOG2F 1 ++#define HAVE_LOG2 0 ++#define HAVE_LOG2F 0 + #define HAVE_LOONGSON 0 + #define HAVE_LRINT 1 + #define HAVE_LRINTF 1 + #define HAVE_LZO1X_999_COMPRESS 0 + #define HAVE_MACHINE_IOCTL_BT848_H 0 + #define HAVE_MACHINE_IOCTL_METEOR_H 0 +-#define HAVE_MALLOC_H 1 +-#define HAVE_MEMALIGN 1 ++#define HAVE_MALLOC_H 0 ++#define HAVE_MEMALIGN 0 + #define HAVE_MKSTEMP 1 + #define HAVE_PLD 0 + #define HAVE_POSIX_MEMALIGN 1 +Index: third_party/ffmpeg/config/Chrome/linux/x64/config.h +=================================================================== +--- third_party/ffmpeg/config/Chrome/linux/x64/config.h (revision 49485) ++++ third_party/ffmpeg/config/Chrome/linux/x64/config.h (working copy) +@@ -45,7 +45,7 @@ + #define HAVE_NEON 0 + #define HAVE_PPC4XX 0 + #define HAVE_SSE 1 +-#define HAVE_SSSE3 1 ++#define HAVE_SSSE3 0 + #define HAVE_VIS 0 + #define HAVE_BIGENDIAN 0 + #define HAVE_BEOSTHREADS 0 +@@ -94,16 +94,16 @@ + #define HAVE_LLRINT 1 + #define HAVE_LOCAL_ALIGNED_16 1 + #define HAVE_LOCAL_ALIGNED_8 1 +-#define HAVE_LOG2 1 +-#define HAVE_LOG2F 1 ++#define HAVE_LOG2 0 ++#define HAVE_LOG2F 0 + #define HAVE_LOONGSON 0 + #define HAVE_LRINT 1 + #define HAVE_LRINTF 1 + #define HAVE_LZO1X_999_COMPRESS 0 + #define HAVE_MACHINE_IOCTL_BT848_H 0 + #define HAVE_MACHINE_IOCTL_METEOR_H 0 +-#define HAVE_MALLOC_H 1 +-#define HAVE_MEMALIGN 1 ++#define HAVE_MALLOC_H 0 ++#define HAVE_MEMALIGN 0 + #define HAVE_MKSTEMP 1 + #define HAVE_PLD 0 + #define HAVE_POSIX_MEMALIGN 1 +Index: third_party/ffmpeg/config/Chrome/linux/ia32/config.h +=================================================================== +--- third_party/ffmpeg/config/Chrome/linux/ia32/config.h (revision 49485) ++++ third_party/ffmpeg/config/Chrome/linux/ia32/config.h (working copy) +@@ -45,7 +45,7 @@ + #define HAVE_NEON 0 + #define HAVE_PPC4XX 0 + #define HAVE_SSE 1 +-#define HAVE_SSSE3 1 ++#define HAVE_SSSE3 0 + #define HAVE_VIS 0 + #define HAVE_BIGENDIAN 0 + #define HAVE_BEOSTHREADS 0 +@@ -94,16 +94,16 @@ + #define HAVE_LLRINT 1 + #define HAVE_LOCAL_ALIGNED_16 1 + #define HAVE_LOCAL_ALIGNED_8 1 +-#define HAVE_LOG2 1 +-#define HAVE_LOG2F 1 ++#define HAVE_LOG2 0 ++#define HAVE_LOG2F 0 + #define HAVE_LOONGSON 0 + #define HAVE_LRINT 1 + #define HAVE_LRINTF 1 + #define HAVE_LZO1X_999_COMPRESS 0 + #define HAVE_MACHINE_IOCTL_BT848_H 0 + #define HAVE_MACHINE_IOCTL_METEOR_H 0 +-#define HAVE_MALLOC_H 1 +-#define HAVE_MEMALIGN 1 ++#define HAVE_MALLOC_H 0 ++#define HAVE_MEMALIGN 0 + #define HAVE_MKSTEMP 1 + #define HAVE_PLD 0 + #define HAVE_POSIX_MEMALIGN 1 diff --git a/www/chromium/files/patch-thirdparty b/www/chromium/files/patch-thirdparty index 0369fc01463a..cc590a1ac640 100644 --- a/www/chromium/files/patch-thirdparty +++ b/www/chromium/files/patch-thirdparty @@ -1,6 +1,6 @@ Index: third_party/WebKit/WebCore/dom/SelectElement.cpp =================================================================== ---- third_party/WebKit/WebCore/dom/SelectElement.cpp (revision 57286) +--- third_party/WebKit/WebCore/dom/SelectElement.cpp (revision 63601) +++ third_party/WebKit/WebCore/dom/SelectElement.cpp (working copy) @@ -53,7 +53,7 @@ #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) @@ -13,9 +13,9 @@ Index: third_party/WebKit/WebCore/dom/SelectElement.cpp #else Index: third_party/WebKit/WebCore/page/EventHandler.cpp =================================================================== ---- third_party/WebKit/WebCore/page/EventHandler.cpp (revision 57286) +--- third_party/WebKit/WebCore/page/EventHandler.cpp (revision 63601) +++ third_party/WebKit/WebCore/page/EventHandler.cpp (working copy) -@@ -1829,7 +1829,7 @@ +@@ -1890,7 +1890,7 @@ return swallowEvent; } @@ -26,7 +26,7 @@ Index: third_party/WebKit/WebCore/page/EventHandler.cpp return false; Index: third_party/WebKit/WebCore/page/chromium/EventHandlerChromium.cpp =================================================================== ---- third_party/WebKit/WebCore/page/chromium/EventHandlerChromium.cpp (revision 57286) +--- third_party/WebKit/WebCore/page/chromium/EventHandlerChromium.cpp (revision 63601) +++ third_party/WebKit/WebCore/page/chromium/EventHandlerChromium.cpp (working copy) @@ -154,7 +154,7 @@ #endif @@ -39,9 +39,9 @@ Index: third_party/WebKit/WebCore/page/chromium/EventHandlerChromium.cpp // This code comes from gtk/EventHandlerGtk.cpp. Index: third_party/WebKit/WebCore/platform/chromium/ChromiumBridge.h =================================================================== ---- third_party/WebKit/WebCore/platform/chromium/ChromiumBridge.h (revision 57286) +--- third_party/WebKit/WebCore/platform/chromium/ChromiumBridge.h (revision 63601) +++ third_party/WebKit/WebCore/platform/chromium/ChromiumBridge.h (working copy) -@@ -114,7 +114,7 @@ +@@ -141,7 +141,7 @@ #if OS(WINDOWS) static bool ensureFontLoaded(HFONT font); #endif @@ -50,26 +50,9 @@ Index: third_party/WebKit/WebCore/platform/chromium/ChromiumBridge.h static void getRenderStyleForStrike(const char* family, int sizeAndStyle, FontRenderStyle* result); static String getFontFamilyForCharacters(const UChar*, size_t numCharacters); #endif -Index: third_party/WebKit/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp -=================================================================== ---- third_party/WebKit/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp (revision 57286) -+++ third_party/WebKit/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp (working copy) -@@ -130,9 +130,9 @@ - } - - png_struct* pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, -- png_voidp_NULL, -- png_error_ptr_NULL, -- png_error_ptr_NULL); -+ 0, //png_voidp_NULL, -+ 0, //png_error_ptr_NULL, -+ 0);//png_error_ptr_NULL); - if (!pngPtr) - return false; - Index: third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp =================================================================== ---- third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp (revision 57286) +--- third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp (revision 63601) +++ third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp (working copy) @@ -36,7 +36,7 @@ #include "Base64.h" @@ -127,7 +110,7 @@ Index: third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformD if (!typeface) Index: third_party/WebKit/WebCore/platform/graphics/chromium/FontPlatformData.h =================================================================== ---- third_party/WebKit/WebCore/platform/graphics/chromium/FontPlatformData.h (revision 57286) +--- third_party/WebKit/WebCore/platform/graphics/chromium/FontPlatformData.h (revision 63601) +++ third_party/WebKit/WebCore/platform/graphics/chromium/FontPlatformData.h (working copy) @@ -33,7 +33,7 @@ @@ -140,7 +123,7 @@ Index: third_party/WebKit/WebCore/platform/graphics/chromium/FontPlatformData.h Index: third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.h =================================================================== ---- third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.h (revision 57286) +--- third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.h (revision 63601) +++ third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformData.h (working copy) @@ -38,7 +38,7 @@ #if OS(WINDOWS) @@ -171,7 +154,7 @@ Index: third_party/WebKit/WebCore/platform/graphics/chromium/FontCustomPlatformD }; Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp =================================================================== ---- third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (revision 57286) +--- third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (revision 63601) +++ third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (working copy) @@ -89,7 +89,7 @@ // color to produce a new output color. @@ -182,7 +165,7 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp // If non-empty, the current State is clipped to this image. SkBitmap m_imageBufferClip; // If m_imageBufferClip is non-empty, this is the region the image is clipped to. -@@ -143,7 +143,7 @@ +@@ -146,7 +146,7 @@ , m_lineJoin(other.m_lineJoin) , m_dash(other.m_dash) , m_textDrawingMode(other.m_textDrawingMode) @@ -191,8 +174,8 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp , m_imageBufferClip(other.m_imageBufferClip) , m_clip(other.m_clip) #endif -@@ -214,7 +214,7 @@ - m_stateStack.append(*m_state); +@@ -232,7 +232,7 @@ + m_stateStack.append(m_state->cloneInheritedProperties()); m_state = &m_stateStack.last(); -#if OS(LINUX) || OS(WINDOWS) @@ -200,7 +183,7 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp // The clip image only needs to be applied once. Reset the image so that we // don't attempt to clip multiple times. m_state->m_imageBufferClip.reset(); -@@ -224,7 +224,7 @@ +@@ -242,7 +242,7 @@ canvas()->save(); } @@ -209,7 +192,7 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp void PlatformContextSkia::beginLayerClippedToImage(const WebCore::FloatRect& rect, const WebCore::ImageBuffer* imageBuffer) { -@@ -272,7 +272,7 @@ +@@ -290,7 +290,7 @@ void PlatformContextSkia::restore() { @@ -218,8 +201,8 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp if (!m_state->m_imageBufferClip.empty()) { applyClipFromImage(m_state->m_clip, m_state->m_imageBufferClip); canvas()->restore(); -@@ -563,7 +563,7 @@ - return m_canvas->getTopPlatformDevice().IsVectorial(); +@@ -614,7 +614,7 @@ + return !m_imageResamplingHintSrcSize.isEmpty() && !m_imageResamplingHintDstSize.isEmpty(); } -#if OS(LINUX) || OS(WINDOWS) @@ -229,7 +212,7 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.cpp // NOTE: this assumes the image mask contains opaque black for the portions that are to be shown, as such we Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h =================================================================== ---- third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h (revision 57286) +--- third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h (revision 63601) +++ third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h (working copy) @@ -88,7 +88,7 @@ // |rect|. This layer is implicitly restored when the next restore is @@ -240,8 +223,8 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h void beginLayerClippedToImage(const WebCore::FloatRect&, const WebCore::ImageBuffer*); #endif -@@ -168,7 +168,7 @@ - bool isPrinting(); +@@ -176,7 +176,7 @@ + bool hasImageResamplingHint() const; private: -#if OS(LINUX) || OS(WINDOWS) @@ -251,9 +234,9 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h void applyClipFromImage(const WebCore::FloatRect&, const SkBitmap&); Index: third_party/WebKit/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp =================================================================== ---- third_party/WebKit/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (revision 57286) +--- third_party/WebKit/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (revision 63601) +++ third_party/WebKit/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (working copy) -@@ -434,7 +434,7 @@ +@@ -432,7 +432,7 @@ if (paintingDisabled()) return; @@ -262,9 +245,22 @@ Index: third_party/WebKit/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp platformContext()->beginLayerClippedToImage(rect, imageBuffer); #endif } +Index: third_party/WebKit/WebCore/platform/Scrollbar.cpp +=================================================================== +--- third_party/WebKit/WebCore/platform/Scrollbar.cpp (revision 63601) ++++ third_party/WebKit/WebCore/platform/Scrollbar.cpp (working copy) +@@ -40,7 +40,7 @@ + + using namespace std; + +-#if PLATFORM(CHROMIUM) && OS(LINUX) ++#if PLATFORM(CHROMIUM) && (OS(LINUX) || OS(FREEBSD)) + // The position of the scrollbar thumb affects the appearance of the steppers, so + // when the thumb moves, we have to invalidate them for painting. + #define THUMB_POSITION_AFFECTS_BUTTONS Index: third_party/WebKit/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp =================================================================== ---- third_party/WebKit/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp (revision 57286) +--- third_party/WebKit/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp (revision 63601) +++ third_party/WebKit/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp (working copy) @@ -57,6 +57,8 @@ DEFINE_STATIC_LOCAL(const String, platform, ("windows")); @@ -277,7 +273,7 @@ Index: third_party/WebKit/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp #endif Index: third_party/WebKit/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp =================================================================== ---- third_party/WebKit/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp (revision 57286) +--- third_party/WebKit/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp (revision 63601) +++ third_party/WebKit/WebCore/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp (working copy) @@ -46,6 +46,8 @@ return v8String("mac"); @@ -290,20 +286,20 @@ Index: third_party/WebKit/WebCore/bindings/v8/custom/V8InspectorFrontendHostCust #else Index: third_party/WebKit/WebCore/loader/CachedFont.cpp =================================================================== ---- third_party/WebKit/WebCore/loader/CachedFont.cpp (revision 57286) +--- third_party/WebKit/WebCore/loader/CachedFont.cpp (revision 63601) +++ third_party/WebKit/WebCore/loader/CachedFont.cpp (working copy) @@ -27,7 +27,7 @@ #include "config.h" #include "CachedFont.h" --#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (OS(WINDOWS) || OS(LINUX))) || PLATFORM(HAIKU) || OS(WINCE) -+#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (OS(WINDOWS) || OS(LINUX) || OS(FREEBSD))) || PLATFORM(HAIKU) || OS(WINCE) +-#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (OS(WINDOWS) || OS(LINUX))) || PLATFORM(HAIKU) || OS(WINCE) || PLATFORM(ANDROID) ++#if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (OS(WINDOWS) || OS(LINUX) || OS(FREEBSD))) || PLATFORM(HAIKU) || OS(WINCE) || PLATFORM(ANDROID) #define STORE_FONT_CUSTOM_PLATFORM_DATA #endif Index: third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp =================================================================== ---- third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp (revision 57286) +--- third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp (revision 63601) +++ third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp (working copy) @@ -39,7 +39,7 @@ @@ -350,7 +346,7 @@ Index: third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cp s_gl->makeCurrent(0, 0); s_gl->destroyContext(m_contextObj); s_gl->destroyPbuffer(m_pbuffer); -@@ -308,7 +308,7 @@ +@@ -316,7 +316,7 @@ } m_pbuffer = pbuffer; m_contextObj = context; @@ -359,7 +355,7 @@ Index: third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cp if (!s_gl) { s_gl = GLConnection::create(); if (!s_gl) -@@ -422,7 +422,7 @@ +@@ -431,7 +431,7 @@ if (CGLGetCurrentContext() != m_contextObj) if (CGLSetCurrentContext(m_contextObj) == kCGLNoError) return true; @@ -370,18 +366,18 @@ Index: third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cp return true; Index: third_party/WebKit/WebKit/chromium/src/ChromiumBridge.cpp =================================================================== ---- third_party/WebKit/WebKit/chromium/src/ChromiumBridge.cpp (revision 57286) +--- third_party/WebKit/WebKit/chromium/src/ChromiumBridge.cpp (revision 63601) +++ third_party/WebKit/WebKit/chromium/src/ChromiumBridge.cpp (working copy) -@@ -62,7 +62,7 @@ +@@ -64,7 +64,7 @@ #include "WebThemeEngine.h" #endif -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) - #include "WebSandboxSupport.h" #include "WebFontInfo.h" #include "WebFontRenderStyle.h" -@@ -340,7 +340,7 @@ + #endif +@@ -420,7 +420,7 @@ } #endif @@ -392,9 +388,9 @@ Index: third_party/WebKit/WebKit/chromium/src/ChromiumBridge.cpp if (webKitClient()->sandboxSupport()) Index: third_party/WebKit/WebKit/chromium/src/WebFrameImpl.cpp =================================================================== ---- third_party/WebKit/WebKit/chromium/src/WebFrameImpl.cpp (revision 57286) +--- third_party/WebKit/WebKit/chromium/src/WebFrameImpl.cpp (revision 63601) +++ third_party/WebKit/WebKit/chromium/src/WebFrameImpl.cpp (working copy) -@@ -150,7 +150,7 @@ +@@ -151,7 +151,7 @@ #include "LocalCurrentGraphicsContext.h" #endif @@ -403,11 +399,20 @@ Index: third_party/WebKit/WebKit/chromium/src/WebFrameImpl.cpp #include <gdk/gdk.h> #endif +@@ -298,7 +298,7 @@ + float scale = m_printedPageWidth / pageRect.width(); + + ctx.save(); +-#if OS(LINUX) ++#if OS(LINUX) || OS(FREEBSD) + ctx.scale(WebCore::FloatSize(scale, scale)); + #endif + ctx.translate(static_cast<float>(-pageRect.x()), Index: third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h =================================================================== ---- third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h (revision 57286) +--- third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h (revision 63601) +++ third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h (working copy) -@@ -49,7 +49,7 @@ +@@ -52,7 +52,7 @@ #define FLIP_FRAMEBUFFER_VERTICALLY #endif @@ -416,7 +421,7 @@ Index: third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h #include "GL/glxew.h" #endif -@@ -322,7 +322,7 @@ +@@ -332,7 +332,7 @@ CGLPBufferObj m_pbuffer; CGLContextObj m_contextObj; unsigned char* m_renderOutput; @@ -427,9 +432,9 @@ Index: third_party/WebKit/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h Index: third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp =================================================================== ---- third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp (revision 57286) +--- third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp (revision 63601) +++ third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp (working copy) -@@ -103,7 +103,7 @@ +@@ -115,7 +115,7 @@ #if OS(WINDOWS) #include "RenderThemeChromiumWin.h" #else @@ -438,7 +443,7 @@ Index: third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp #include "RenderThemeChromiumLinux.h" #endif #include "RenderTheme.h" -@@ -370,7 +370,7 @@ +@@ -402,7 +402,7 @@ || (event.button == WebMouseEvent::ButtonLeft && event.modifiers & WebMouseEvent::ControlKey)) mouseContextMenu(event); @@ -447,7 +452,7 @@ Index: third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp if (event.button == WebMouseEvent::ButtonRight) mouseContextMenu(event); #endif -@@ -409,7 +409,7 @@ +@@ -441,7 +441,7 @@ if (!mainFrameImpl() || !mainFrameImpl()->frameView()) return; @@ -456,7 +461,7 @@ Index: third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp // If the event was a middle click, attempt to copy text into the focused // frame. We execute this before we let the page have a go at the event // because the page may change what is focused during in its event handler. -@@ -493,11 +493,11 @@ +@@ -525,11 +525,11 @@ if (!handler) return keyEventDefault(event); @@ -470,25 +475,25 @@ Index: third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp WebInputEvent::RawKeyDown; #endif -@@ -647,7 +647,7 @@ - // - // This function is an ugly copy/paste and should be cleaned up when the - // WebKitWin version is cleaned: https://bugs.webkit.org/show_bug.cgi?id=20438 +@@ -673,7 +673,7 @@ + } + #endif + -#if OS(WINDOWS) || OS(LINUX) +#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) - // FIXME: implement on Mac + // Mac has no way to open a context menu based on a keyboard event. bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event) { -@@ -1858,7 +1858,7 @@ +@@ -1875,7 +1875,7 @@ void WebViewImpl::setScrollbarColors(unsigned inactiveColor, unsigned activeColor, unsigned trackColor) { -#if OS(LINUX) +#if OS(LINUX) || OS(FREEBSD) - RenderThemeChromiumLinux::setScrollbarColors(inactiveColor, + PlatformThemeChromiumGtk::setScrollbarColors(inactiveColor, activeColor, trackColor); -@@ -1869,7 +1869,7 @@ +@@ -1886,7 +1886,7 @@ unsigned activeForegroundColor, unsigned inactiveBackgroundColor, unsigned inactiveForegroundColor) { @@ -499,7 +504,7 @@ Index: third_party/WebKit/WebKit/chromium/src/WebViewImpl.cpp inactiveBackgroundColor, Index: tools/gyp/test/additional-targets/src/dir1/actions.gyp =================================================================== ---- tools/gyp/test/additional-targets/src/dir1/actions.gyp (revision 810) +--- tools/gyp/test/additional-targets/src/dir1/actions.gyp (revision 837) +++ tools/gyp/test/additional-targets/src/dir1/actions.gyp (working copy) @@ -47,7 +47,7 @@ }, @@ -512,7 +517,7 @@ Index: tools/gyp/test/additional-targets/src/dir1/actions.gyp }, Index: tools/gyp/test/library/src/library.gyp =================================================================== ---- tools/gyp/test/library/src/library.gyp (revision 810) +--- tools/gyp/test/library/src/library.gyp (revision 837) +++ tools/gyp/test/library/src/library.gyp (working copy) @@ -48,7 +48,7 @@ }, @@ -525,7 +530,7 @@ Index: tools/gyp/test/library/src/library.gyp 'cflags': ['-fPIC'], Index: tools/gyp/pylib/gyp/generator/make.py =================================================================== ---- tools/gyp/pylib/gyp/generator/make.py (revision 810) +--- tools/gyp/pylib/gyp/generator/make.py (revision 837) +++ tools/gyp/pylib/gyp/generator/make.py (working copy) @@ -34,7 +34,7 @@ generator_default_variables = { @@ -536,9 +541,18 @@ Index: tools/gyp/pylib/gyp/generator/make.py 'STATIC_LIB_PREFIX': 'lib', 'SHARED_LIB_PREFIX': 'lib', 'STATIC_LIB_SUFFIX': '.a', -@@ -109,13 +109,13 @@ - AR.target ?= $(AR) - RANLIB.target ?= ranlib +@@ -106,7 +106,7 @@ + # export LINK="$(CXX)" + # + # This will allow make to invoke N linker processes as specified in -jN. +-LINK ?= flock $(builddir)/linker.lock $(CXX) ++LINK ?= $(CXX) + + # We want to use GNU ar's T option if available because it's much faster. + # We try to archive and link a file to see ar and ld support this feature. +@@ -147,13 +147,13 @@ + ARFLAGS.target := $(call detect_arflags,target) + endif -CC.host ?= gcc -CFLAGS.host ?= @@ -554,10 +568,19 @@ Index: tools/gyp/pylib/gyp/generator/make.py +LINK.host ?= $(LINK) +LDFLAGS.host ?= $(LDFLAGS) +AR.host ?= $(AR) - RANLIB.host ?= ranlib - - # Flags to make gcc output dependency info. Note that you need to be -@@ -850,12 +850,12 @@ + # See the description for ARFLAGS.target. + -include $(obj).host/arflags/arflags.mk + # Temporarily disabled -- see ARFLAGS.target. +@@ -195,7 +195,7 @@ + # We remove slashes and replace spaces with new lines; + # remove blank lines; + # delete the first line and append a colon to the remaining lines. +-sed -e 's|\\||' -e 's| |\n|g' $(depfile).raw |\ ++sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ + grep -v '^$$' |\ + sed -e 1d -e 's|$$|:|' \ + >> $(depfile) +@@ -895,12 +895,12 @@ # CFLAGS et al overrides must be target-local. # See "Target-specific Variable Values" in the GNU Make manual.""") self.WriteLn("$(OBJS): TOOLSET := $(TOOLSET)") @@ -576,9 +599,21 @@ Index: tools/gyp/pylib/gyp/generator/make.py self.WriteLn() +Index: tools/gyp/pylib/gyp/__init__.py +=================================================================== +--- tools/gyp/pylib/gyp/__init__.py (revision 856) ++++ tools/gyp/pylib/gyp/__init__.py (working copy) +@@ -315,6 +315,7 @@ + 'cygwin': 'msvs', + 'freebsd7': 'make', + 'freebsd8': 'make', ++ 'freebsd9': 'make', + 'linux2': 'make', + 'openbsd4': 'make', + 'sunos5': 'make',}[sys.platform] ] Index: third_party/hunspell/hunspell.gyp =================================================================== ---- third_party/hunspell/hunspell.gyp (revision 41000) +--- third_party/hunspell/hunspell.gyp (revision 50872) +++ third_party/hunspell/hunspell.gyp (working copy) @@ -63,11 +63,12 @@ ], @@ -594,41 +629,9 @@ Index: third_party/hunspell/hunspell.gyp ], }], ], - -Index: third_party/icu/icu.gyp -=================================================================== ---- third_party/icu/icu.gyp (revision 43139) -+++ third_party/icu/icu.gyp (working copy) -@@ -38,7 +38,7 @@ - }, { # else: OS != "win" - 'sources!': ['icudt42.dll'], - }], -- [ 'OS != "linux"', { -+ [ 'OS != "linux" and OS!= "freebsd"', { - 'sources!': ['linux/icudt42l_dat.s'], - }], - [ 'OS != "mac"', { -@@ -208,7 +208,7 @@ - ], - }, - 'conditions': [ -- [ 'OS=="linux"', { -+ [ 'OS=="linux" or OS=="freebsd"', { - # Since ICU wants to internally use its own deprecated APIs, don't - # complain about it. - 'cflags': [ -@@ -396,7 +396,7 @@ - 'source/stubdata/stubdata.c', - ], - }], -- [ 'OS == "linux"', { -+ [ 'OS == "linux" or OS=="freebsd"', { - 'cflags': [ - # TODO(port): fix ICU to not depend on this flag. - '-fno-strict-aliasing', Index: third_party/icu/public/common/unicode/umachine.h =================================================================== ---- third_party/icu/public/common/unicode/umachine.h (revision 43139) +--- third_party/icu/public/common/unicode/umachine.h (revision 51076) +++ third_party/icu/public/common/unicode/umachine.h (working copy) @@ -49,6 +49,8 @@ # include "unicode/pmac.h" @@ -957,9 +960,110 @@ Index: third_party/icu/public/common/unicode/pfreebsd.h +/*===========================================================================*/ + +#define U_MAKE "/usr/local/bin/gmake" +Index: third_party/icu/icu.gyp +=================================================================== +--- third_party/icu/icu.gyp (revision 51076) ++++ third_party/icu/icu.gyp (working copy) +@@ -42,7 +42,7 @@ + }, { # else: OS != "win" + 'sources!': ['icudt42.dll'], + }], +- [ 'OS != "linux" or chromeos == 1', { ++ [ '(OS != "linux" and OS != "freebsd") or chromeos == 1', { + 'sources!': ['linux/icudt42l_dat.s'], + }], + [ 'OS != "mac"', { +@@ -215,7 +215,7 @@ + ], + }, + 'conditions': [ +- [ 'OS=="linux"', { ++ [ 'OS=="linux" or OS=="freebsd"', { + # Since ICU wants to internally use its own deprecated APIs, don't + # complain about it. + 'cflags': [ +@@ -403,7 +403,7 @@ + 'source/stubdata/stubdata.c', + ], + }], +- [ 'OS == "linux"', { ++ [ 'OS == "linux" or OS=="freebsd"', { + 'cflags': [ + # TODO(port): fix ICU to not depend on this flag. + '-fno-strict-aliasing', +Index: third_party/libjingle/source/talk/base/httpcommon.cc +=================================================================== +--- third_party/libjingle/source/talk/base/httpcommon.cc (revision 24) ++++ third_party/libjingle/source/talk/base/httpcommon.cc (working copy) +@@ -399,7 +399,7 @@ + gmt = non_gmt + kTimeZoneOffsets[zindex] * 60 * 60; + } + // TODO: Android should support timezone, see b/2441195 +-#if defined(OSX) || defined(ANDROID) ++#if defined(OSX) || defined(ANDROID) || defined(BSD) + tm *tm_for_timezone = localtime((time_t *)&gmt); + *seconds = gmt + tm_for_timezone->tm_gmtoff; + #else +Index: third_party/libjingle/source/talk/base/unixfilesystem.cc +=================================================================== +--- third_party/libjingle/source/talk/base/unixfilesystem.cc (revision 24) ++++ third_party/libjingle/source/talk/base/unixfilesystem.cc (working copy) +@@ -490,7 +490,7 @@ + + Pathname UnixFilesystem::GetCurrentDirectory() { + Pathname cwd; +-#if defined(LINUX) || defined(OSX) ++#if defined(LINUX) || defined(OSX) || defined(BSD) + // Both Linux and Mac supported malloc()'ing the string themselves, although + // that is not required by POSIX. + char *path = getcwd(NULL, 0); +@@ -508,7 +508,7 @@ + } + cwd.SetFolder(std::string(path)); + +-#if defined(LINUX) || defined(OSX) ++#if defined(LINUX) || defined(OSX) || defined(BSD) + free(path); + #endif + return cwd; +Index: third_party/libjingle/source/talk/base/physicalsocketserver.cc +=================================================================== +--- third_party/libjingle/source/talk/base/physicalsocketserver.cc (revision 24) ++++ third_party/libjingle/source/talk/base/physicalsocketserver.cc (working copy) +@@ -487,7 +487,7 @@ + *slevel = IPPROTO_IP; + *sopt = IP_DONTFRAGMENT; + break; +-#elif defined(OSX) ++#elif defined(OSX) || defined(BSD) + LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported."; + return -1; + #elif defined(POSIX) +Index: third_party/ppapi/ppapi.gyp +=================================================================== +--- third_party/ppapi/ppapi.gyp (revision 165) ++++ third_party/ppapi/ppapi.gyp (working copy) +@@ -144,7 +144,7 @@ + }, + }, + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'cflags': ['-Wextra', '-pedantic'], + }], + ['OS=="mac"', { +@@ -172,7 +172,7 @@ + ['OS=="win"', { + 'msvs_guid': '057E7FA0-83C0-11DF-8395-0800200C9A66', + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'cflags': ['-Wextra', '-pedantic'], + }], + ['OS=="mac"', { Index: native_client/src/shared/platform/platform.gyp =================================================================== ---- native_client/src/shared/platform/platform.gyp (revision 1998) +--- native_client/src/shared/platform/platform.gyp (revision 2697) +++ native_client/src/shared/platform/platform.gyp (working copy) @@ -59,7 +59,7 @@ 'time.h', @@ -972,7 +1076,7 @@ Index: native_client/src/shared/platform/platform.gyp 'linux/lock.cc', Index: native_client/src/trusted/service_runtime/service_runtime.gyp =================================================================== ---- native_client/src/trusted/service_runtime/service_runtime.gyp (revision 1998) +--- native_client/src/trusted/service_runtime/service_runtime.gyp (revision 2697) +++ native_client/src/trusted/service_runtime/service_runtime.gyp (working copy) @@ -31,7 +31,7 @@ { @@ -985,9 +1089,9 @@ Index: native_client/src/trusted/service_runtime/service_runtime.gyp ], Index: native_client/build/common.gypi =================================================================== ---- native_client/build/common.gypi (revision 1998) +--- native_client/build/common.gypi (revision 2697) +++ native_client/build/common.gypi (working copy) -@@ -344,7 +344,7 @@ +@@ -383,7 +383,7 @@ }, }, 'conditions': [ @@ -996,65 +1100,3 @@ Index: native_client/build/common.gypi 'target_defaults': { # Enable -Werror by default, but put it in a variable so it can # be disabled in ~/.gyp/include.gypi on the valgrind builders. -Index: v8/tools/gyp/v8.gyp -=================================================================== ---- v8/tools/gyp/v8.gyp (revision 4335) -+++ v8/tools/gyp/v8.gyp (working copy) -@@ -74,10 +74,15 @@ - 'LinkIncremental': '2', - }, - }, -+ 'conditions': [ -+ ['OS=="freebsd"', { -+ 'cflags': [ '-I/usr/local/include' ], -+ }], -+ ], - }, - 'Release': { - 'conditions': [ -- ['OS=="linux"', { -+ ['OS=="linux" or OS=="freebsd"', { - 'cflags!': [ - '-O2', - '-Os', -@@ -97,6 +102,9 @@ - }], - ], - }], -+ ['OS=="freebsd"', { -+ 'cflags': [ '-I/usr/local/include' ], -+ }], - ['OS=="mac"', { - 'xcode_settings': { - 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 -@@ -541,6 +549,17 @@ - ], - } - ], -+ ['OS=="freebsd"', { -+ 'link_settings': { -+ 'libraries': [ -+ '-L/usr/local/lib -lexecinfo', -+ ]}, -+ 'sources': [ -+ '../../src/platform-freebsd.cc', -+ '../../src/platform-posix.cc' -+ ], -+ } -+ ], - ['OS=="openbsd"', { - 'link_settings': { - 'libraries': [ -Index: v8/src/globals.h -=================================================================== ---- v8/src/globals.h (revision 4335) -+++ v8/src/globals.h (working copy) -@@ -112,7 +112,7 @@ - #define V8PRIxPTR "lx" - #endif - --#if defined(__APPLE__) && defined(__MACH__) -+#if (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__) - #define USING_MAC_ABI - #endif - diff --git a/www/chromium/pkg-plist b/www/chromium/pkg-plist index 6ae000abb127..90afa0421848 100644 --- a/www/chromium/pkg-plist +++ b/www/chromium/pkg-plist @@ -58,46 +58,24 @@ bin/chrome %%DATADIR%%/mksnapshot %%DATADIR%%/product_logo_48.png %%DATADIR%%/protoc -%%DATADIR%%/resources/bookmark_manager/css/bmm.css -%%DATADIR%%/resources/bookmark_manager/css/bmm.css.js -%%DATADIR%%/resources/bookmark_manager/css/list.css -%%DATADIR%%/resources/bookmark_manager/css/menu.css -%%DATADIR%%/resources/bookmark_manager/css/tree.css -%%DATADIR%%/resources/bookmark_manager/css/tree.css.js -%%DATADIR%%/resources/bookmark_manager/images/bookmark_bar_folder_mac.png -%%DATADIR%%/resources/bookmark_manager/images/bookmark_manager_recent.png -%%DATADIR%%/resources/bookmark_manager/images/bookmark_manager_search.png -%%DATADIR%%/resources/bookmark_manager/images/bookmarks_favicon.png -%%DATADIR%%/resources/bookmark_manager/images/bookmarks_section.png -%%DATADIR%%/resources/bookmark_manager/images/folder_closed.png -%%DATADIR%%/resources/bookmark_manager/images/folder_closed_rtl.png -%%DATADIR%%/resources/bookmark_manager/images/folder_open.png -%%DATADIR%%/resources/bookmark_manager/images/folder_open_rtl.png -%%DATADIR%%/resources/bookmark_manager/js/bmm.js -%%DATADIR%%/resources/bookmark_manager/js/bmm/bookmarklist.js -%%DATADIR%%/resources/bookmark_manager/js/bmm/bookmarktree.js -%%DATADIR%%/resources/bookmark_manager/js/bmm/treeiterator.js -%%DATADIR%%/resources/bookmark_manager/js/cr.js -%%DATADIR%%/resources/bookmark_manager/js/cr/event.js -%%DATADIR%%/resources/bookmark_manager/js/cr/eventtarget.js -%%DATADIR%%/resources/bookmark_manager/js/cr/promise.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/command.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/contextmenuhandler.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/list.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/listitem.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/listselectionmodel.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/menu.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/menubutton.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/menuitem.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/splitpane.js -%%DATADIR%%/resources/bookmark_manager/js/cr/ui/tree.js -%%DATADIR%%/resources/bookmark_manager/js/i18ntemplate.js -%%DATADIR%%/resources/bookmark_manager/js/localstrings.js -%%DATADIR%%/resources/bookmark_manager/js/util.js -%%DATADIR%%/resources/bookmark_manager/main.html -%%DATADIR%%/resources/bookmark_manager/manifest.json +%%DATADIR%%/resources.pak +%%DATADIR%%/resources/calendar_app/128.png +%%DATADIR%%/resources/calendar_app/24.png +%%DATADIR%%/resources/calendar_app/32.png +%%DATADIR%%/resources/calendar_app/48.png +%%DATADIR%%/resources/calendar_app/manifest.json +%%DATADIR%%/resources/docs_app/128.png +%%DATADIR%%/resources/docs_app/24.png +%%DATADIR%%/resources/docs_app/32.png +%%DATADIR%%/resources/docs_app/48.png +%%DATADIR%%/resources/docs_app/manifest.json +%%DATADIR%%/resources/gmail_app/128.png +%%DATADIR%%/resources/gmail_app/24.png +%%DATADIR%%/resources/gmail_app/32.png +%%DATADIR%%/resources/gmail_app/48.png +%%DATADIR%%/resources/gmail_app/manifest.json %%DATADIR%%/resources/inspector/DevTools.js +%%DATADIR%%/resources/inspector/Images/applicationCache.png %%DATADIR%%/resources/inspector/Images/auditsIcon.png %%DATADIR%%/resources/inspector/Images/back.png %%DATADIR%%/resources/inspector/Images/breakpointBorder.png @@ -186,16 +164,13 @@ bin/chrome %%DATADIR%%/resources/inspector/Images/searchSmallWhite.png %%DATADIR%%/resources/inspector/Images/segment.png %%DATADIR%%/resources/inspector/Images/segmentChromium.png -%%DATADIR%%/resources/inspector/Images/segmentChromium2.png %%DATADIR%%/resources/inspector/Images/segmentEnd.png %%DATADIR%%/resources/inspector/Images/segmentHover.png %%DATADIR%%/resources/inspector/Images/segmentHoverChromium.png -%%DATADIR%%/resources/inspector/Images/segmentHoverChromium2.png %%DATADIR%%/resources/inspector/Images/segmentHoverEnd.png %%DATADIR%%/resources/inspector/Images/segmentHoverEndChromium.png %%DATADIR%%/resources/inspector/Images/segmentSelected.png %%DATADIR%%/resources/inspector/Images/segmentSelectedChromium.png -%%DATADIR%%/resources/inspector/Images/segmentSelectedChromium2.png %%DATADIR%%/resources/inspector/Images/segmentSelectedEnd.png %%DATADIR%%/resources/inspector/Images/segmentSelectedEndChromium.png %%DATADIR%%/resources/inspector/Images/sessionStorage.png @@ -204,14 +179,12 @@ bin/chrome %%DATADIR%%/resources/inspector/Images/splitviewDividerBackground.png %%DATADIR%%/resources/inspector/Images/statusbarBackground.png %%DATADIR%%/resources/inspector/Images/statusbarBackgroundChromium.png -%%DATADIR%%/resources/inspector/Images/statusbarBackgroundChromium2.png %%DATADIR%%/resources/inspector/Images/statusbarBottomBackground.png %%DATADIR%%/resources/inspector/Images/statusbarBottomBackgroundChromium.png %%DATADIR%%/resources/inspector/Images/statusbarButtons.png %%DATADIR%%/resources/inspector/Images/statusbarButtonsChromium.png %%DATADIR%%/resources/inspector/Images/statusbarMenuButton.png %%DATADIR%%/resources/inspector/Images/statusbarMenuButtonChromium.png -%%DATADIR%%/resources/inspector/Images/statusbarMenuButtonChromium2.png %%DATADIR%%/resources/inspector/Images/statusbarMenuButtonSelected.png %%DATADIR%%/resources/inspector/Images/statusbarMenuButtonSelectedChromium.png %%DATADIR%%/resources/inspector/Images/statusbarResizerHorizontal.png @@ -269,38 +242,18 @@ bin/chrome %%DATADIR%%/resources/inspector/audits.css %%DATADIR%%/resources/inspector/devTools.css %%DATADIR%%/resources/inspector/devtools.html +%%DATADIR%%/resources/inspector/helpScreen.css %%DATADIR%%/resources/inspector/inspector.css %%DATADIR%%/resources/inspector/inspector.html %%DATADIR%%/resources/inspector/inspectorSyntaxHighlight.css %%DATADIR%%/resources/inspector/popover.css %%DATADIR%%/resources/inspector/textViewer.css -%%DATADIR%%/resources/net_internals/detailsview.js -%%DATADIR%%/resources/net_internals/dnsview.js -%%DATADIR%%/resources/net_internals/index.html -%%DATADIR%%/resources/net_internals/loggrouper.js -%%DATADIR%%/resources/net_internals/logviewpainter.js -%%DATADIR%%/resources/net_internals/main.css -%%DATADIR%%/resources/net_internals/main.js -%%DATADIR%%/resources/net_internals/proxyview.js -%%DATADIR%%/resources/net_internals/requestsview.js -%%DATADIR%%/resources/net_internals/resizableverticalsplitview.js -%%DATADIR%%/resources/net_internals/sourceentry.js -%%DATADIR%%/resources/net_internals/tabswitcherview.js -%%DATADIR%%/resources/net_internals/timelineviewpainter.js -%%DATADIR%%/resources/net_internals/topmidbottomview.js -%%DATADIR%%/resources/net_internals/util.js -%%DATADIR%%/resources/net_internals/view.js %%DATADIR%%/xdg-settings -@dirrm %%DATADIR%%/resources/bookmark_manager/css -@dirrm %%DATADIR%%/resources/bookmark_manager/images -@dirrm %%DATADIR%%/resources/bookmark_manager/js/bmm -@dirrm %%DATADIR%%/resources/bookmark_manager/js/cr/ui -@dirrm %%DATADIR%%/resources/bookmark_manager/js/cr -@dirrm %%DATADIR%%/resources/bookmark_manager/js -@dirrm %%DATADIR%%/resources/bookmark_manager +@dirrm %%DATADIR%%/locales +@dirrm %%DATADIR%%/resources/calendar_app +@dirrm %%DATADIR%%/resources/docs_app +@dirrm %%DATADIR%%/resources/gmail_app @dirrm %%DATADIR%%/resources/inspector/Images @dirrm %%DATADIR%%/resources/inspector -@dirrm %%DATADIR%%/resources/net_internals @dirrm %%DATADIR%%/resources -@dirrm %%DATADIR%%/locales @dirrm %%DATADIR%% |