aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2013-01-11 01:14:52 +0000
committerRene Ladan <rene@FreeBSD.org>2013-01-11 01:14:52 +0000
commitbf75679390ba99103ece7300c233f94e792847a1 (patch)
treedb46a03736fca13357ba9c3a56c11595450d932a /www
parent7cb5f3fdc749060d59bbb63fdc53dafc26bec64c (diff)
downloadports-bf75679390ba99103ece7300c233f94e792847a1.tar.gz
ports-bf75679390ba99103ece7300c233f94e792847a1.zip
Update to 24.0.1312.52, which add support for MathML.
FreeBSD-specific improvements: - working WiFi geolocation [1] (can be turned off in preferences) - fix build with clang (use external libvpx) - use SysV SHM model and where possible OS_BSD, which saves some patches - no need to use ZygoteProcess switch HTML5 audio is currently broken. PR: ports/174402 [1] Submitted by: J.R. Oldroyd <fbsd@opal.com> [1] Security: http://www.vuxml.org/freebsd/46bd747b-5b84-11e2-b06d-00262d5ed8ee.html
Notes
Notes: svn path=/head/; revision=310215
Diffstat (limited to 'www')
-rw-r--r--www/chromium/Makefile15
-rw-r--r--www/chromium/distinfo4
-rw-r--r--www/chromium/files/patch-base__sys_info_freebsd.cc26
-rw-r--r--www/chromium/files/patch-chrome__app__chrome_main_delegate.cc11
-rw-r--r--www/chromium/files/patch-chrome__browser__shell_integration_linux.cc20
-rw-r--r--www/chromium/files/patch-chrome__browser__ui__webui__chrome_web_ui_controller_factory.cc10
-rw-r--r--www/chromium/files/patch-chrome__chrome_browser.gypi16
-rw-r--r--www/chromium/files/patch-content__app__content_main_runner.cc25
-rw-r--r--www/chromium/files/patch-content__browser__child_process_launcher.cc44
-rw-r--r--www/chromium/files/patch-content__browser__geolocation__empty_device_data_provider.cc11
-rw-r--r--www/chromium/files/patch-content__browser__geolocation__location_provider.cc2
-rw-r--r--www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.cc204
-rw-r--r--www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.h32
-rw-r--r--www/chromium/files/patch-content__browser__renderer_host__backing_store_gtk.cc22
-rw-r--r--www/chromium/files/patch-content__browser__renderer_host__render_message_filter.cc20
-rw-r--r--www/chromium/files/patch-content__browser__renderer_host__render_process_host_impl.cc11
-rw-r--r--www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.cc20
-rw-r--r--www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.h29
-rw-r--r--www/chromium/files/patch-content__common__plugin_messages.h38
-rw-r--r--www/chromium/files/patch-content__common__view_messages.h11
-rw-r--r--www/chromium/files/patch-content__content_browser.gypi45
-rw-r--r--www/chromium/files/patch-content__content_common.gypi28
-rw-r--r--www/chromium/files/patch-content__content_gpu.gypi6
-rw-r--r--www/chromium/files/patch-content__content_tests.gypi18
-rw-r--r--www/chromium/files/patch-content__plugin__plugin_main_linux.cc6
-rw-r--r--www/chromium/files/patch-content__public__common__common_param_traits.h11
-rw-r--r--www/chromium/files/patch-content__public__test__browser_test_base.cc13
-rw-r--r--www/chromium/files/patch-content__public__test__mock_render_process_host.cc11
-rw-r--r--www/chromium/files/patch-content__renderer__pepper__pepper_platform_image_2d_impl.cc20
-rw-r--r--www/chromium/files/patch-content__renderer__render_process_impl.cc38
-rw-r--r--www/chromium/files/patch-content__renderer__render_view_impl.cc29
-rw-r--r--www/chromium/files/patch-content__renderer__render_view_impl.h35
-rw-r--r--www/chromium/files/patch-content__renderer__render_widget.cc11
-rw-r--r--www/chromium/files/patch-content__renderer__renderer_main_platform_delegate_linux.cc21
-rw-r--r--www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.cc26
-rw-r--r--www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.h20
-rw-r--r--www/chromium/files/patch-media__audio__audio_input_volume_unittest.cc20
-rw-r--r--www/chromium/files/patch-media__audio__audio_low_latency_input_output_unittest.cc29
-rw-r--r--www/chromium/files/patch-media__media.gyp12
-rw-r--r--www/chromium/files/patch-ppapi__proxy__ppb_image_data_proxy.cc20
-rw-r--r--www/chromium/files/patch-ppapi__proxy__serialized_structs.h11
-rw-r--r--www/chromium/files/patch-third_party__WebKit__Source__ThirdParty__gyp__test__additional-targets__src__dir1__actions.gyp11
-rw-r--r--www/chromium/files/patch-third_party__WebKit__Source__ThirdParty__gyp__test__library__src__library.gyp (renamed from www/chromium/files/patch-tools__gyp__test__library__src__library.gyp)4
-rw-r--r--www/chromium/files/patch-third_party__protobuf__src__google__protobuf__compiler__main.cc15
-rw-r--r--www/chromium/files/patch-tools__gyp__pylib__gyp__generator__make.py23
-rw-r--r--www/chromium/files/patch-tools__gyp__test__additional-targets__src__dir1__actions.gyp11
-rw-r--r--www/chromium/files/patch-ui__base__l10n__l10n_util.cc10
-rw-r--r--www/chromium/files/patch-ui__base__x__x11_util.cc32
-rw-r--r--www/chromium/files/patch-ui__surface__surface.gyp17
-rw-r--r--www/chromium/files/patch-ui__surface__transport_dib.h44
-rw-r--r--www/chromium/files/patch-ui__surface__transport_dib_freebsd.cc110
-rw-r--r--www/chromium/pkg-plist2
52 files changed, 548 insertions, 732 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index b9c4247f8643..6e295f65f0c2 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -3,12 +3,11 @@
PORTNAME= chromium
DISTVERSIONPREFIX= courgette-redacted-
-DISTVERSION= 23.0.1271.97
+DISTVERSION= 24.0.1312.52
CATEGORIES= www
MASTER_SITES= http://download.goodking.org/downloads/ \
ftp://rene-ladan.nl/pub/distfiles/ \
- http://files.etoilebsd.net/goodking/ \
- http://distfiles.cybertron.gr/
+ http://files.etoilebsd.net/goodking/
MAINTAINER= chromium@FreeBSD.org
COMMENT= A mostly BSD-licensed web browser based on WebKit and Gtk+
@@ -34,6 +33,7 @@ LIB_DEPENDS= execinfo:${PORTSDIR}/devel/libexecinfo \
gnome-keyring:${PORTSDIR}/security/libgnome-keyring \
cups:${PORTSDIR}/print/cups-client \
event-1:${PORTSDIR}/devel/libevent \
+ vpx:${PORTSDIR}/multimedia/libvpx \
gcrypt:${PORTSDIR}/security/libgcrypt
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins \
@@ -62,6 +62,7 @@ GYP_DEFINES+= use_cups=1 \
use_system_ffmpeg=0 \
use_system_libusb=1 \
use_system_libevent=1 \
+ use_system_libvpx=1 \
linux_strip_binary=1 \
linux_use_tcmalloc=0 \
linux_use_heapchecker=0 \
@@ -70,6 +71,7 @@ GYP_DEFINES+= use_cups=1 \
enable_webrtc=0 \
enable_openmax=1 \
enable_one_click_signin=1 \
+ no_gc_sections=1 \
os_ver=${OSVERSION} \
prefix_dir=${LOCALBASE} \
python_ver=${PYTHON_VER}
@@ -140,7 +142,6 @@ BUILDTYPE= Release
MAKE_ENV+= BUILDTYPE=${BUILDTYPE} \
GPERF=${LOCALBASE}/bin/gperf
-CONFIGURE_ENV+= LD=${CC}
MAKE_JOBS_SAFE= yes
.include <bsd.port.pre.mk>
@@ -188,4 +189,10 @@ do-install:
${COPYTREE_SHARE} "locales resources" ${DATADIR}
${LN} -sf ${DATADIR}/chrome ${PREFIX}/bin
+post-install:
+ @${ECHO_MSG} "========================================================"
+ @${ECHO_MSG} "For best performance please enable shared memory support"
+ @${ECHO_MSG} "in chromium by setting kern.ipc.shm_allow_removed=1"
+ @${ECHO_MSG} "========================================================"
+
.include <bsd.port.post.mk>
diff --git a/www/chromium/distinfo b/www/chromium/distinfo
index d2255aaa09c9..6c36e571d399 100644
--- a/www/chromium/distinfo
+++ b/www/chromium/distinfo
@@ -1,2 +1,2 @@
-SHA256 (chromium-courgette-redacted-23.0.1271.97.tar.xz) = a41a9511bc7f3f4d8336a3bd3c8b309c7ebad6bff2e02fce081bb194349c6a36
-SIZE (chromium-courgette-redacted-23.0.1271.97.tar.xz) = 179510640
+SHA256 (chromium-courgette-redacted-24.0.1312.52.tar.xz) = bdb6b9aa205a16cf0daf941220b8bf7cebf6f1ad7339958403bbc98a5c9a53d3
+SIZE (chromium-courgette-redacted-24.0.1312.52.tar.xz) = 150640564
diff --git a/www/chromium/files/patch-base__sys_info_freebsd.cc b/www/chromium/files/patch-base__sys_info_freebsd.cc
index fbf125705a82..fa5434af93be 100644
--- a/www/chromium/files/patch-base__sys_info_freebsd.cc
+++ b/www/chromium/files/patch-base__sys_info_freebsd.cc
@@ -1,6 +1,26 @@
---- base/sys_info_freebsd.cc.orig 2012-10-31 21:02:04.000000000 +0200
-+++ base/sys_info_freebsd.cc 2012-11-07 17:49:20.000000000 +0200
-@@ -33,4 +33,25 @@
+--- base/sys_info_freebsd.cc.orig 2012-11-27 10:01:52.000000000 +0200
++++ base/sys_info_freebsd.cc 2012-12-09 18:04:30.000000000 +0200
+@@ -23,6 +23,19 @@
+ }
+
+ // static
++int64 SysInfo::AmountOfAvailablePhysicalMemory() {
++ int available_pages, page_size;
++ size_t size = sizeof(available_pages);
++ sysctlbyname("vm.stats.vm.v_free_count", &available_pages, &size, NULL, 0);
++ sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
++ if (available_pages == -1 || page_size == -1) {
++ NOTREACHED();
++ return 0;
++ }
++ return static_cast<int64>(available_pages) * page_size;
++}
++
++// static
+ size_t SysInfo::MaxSharedMemorySize() {
+ size_t limit;
+ size_t size = sizeof(limit);
+@@ -33,4 +46,25 @@
return limit;
}
diff --git a/www/chromium/files/patch-chrome__app__chrome_main_delegate.cc b/www/chromium/files/patch-chrome__app__chrome_main_delegate.cc
new file mode 100644
index 000000000000..8dd8206224d5
--- /dev/null
+++ b/www/chromium/files/patch-chrome__app__chrome_main_delegate.cc
@@ -0,0 +1,11 @@
+--- chrome/app/chrome_main_delegate.cc.orig 2012-12-04 23:34:32.000000000 +0200
++++ chrome/app/chrome_main_delegate.cc 2012-12-04 23:35:37.000000000 +0200
+@@ -264,7 +264,7 @@
+ // Mac needs them for the plugin process name.
+ process_type == switches::kPluginProcess ||
+ #endif
+-#if defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ // The zygote process opens the resources for the renderers.
+ process_type == switches::kZygoteProcess ||
+ #endif
diff --git a/www/chromium/files/patch-chrome__browser__shell_integration_linux.cc b/www/chromium/files/patch-chrome__browser__shell_integration_linux.cc
deleted file mode 100644
index e88f12e0ac65..000000000000
--- a/www/chromium/files/patch-chrome__browser__shell_integration_linux.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- chrome/browser/shell_integration_linux.cc.orig 2012-05-30 10:01:59.000000000 +0300
-+++ chrome/browser/shell_integration_linux.cc 2012-06-05 21:54:31.000000000 +0300
-@@ -122,6 +122,8 @@
- if (!PathService::Get(chrome::DIR_USER_DESKTOP, &desktop_path))
- return false;
-
-+#if !defined(OS_FREEBSD)
-+// BSD: Linux-specific calls like openat are used so defined out for BSD.
- int desktop_fd = open(desktop_path.value().c_str(), O_RDONLY | O_DIRECTORY);
- if (desktop_fd < 0)
- return false;
-@@ -150,7 +152,7 @@
-
- if (HANDLE_EINTR(close(desktop_fd)) < 0)
- PLOG(ERROR) << "close";
--
-+#endif // OS_FREEBSD
- return true;
- }
-
diff --git a/www/chromium/files/patch-chrome__browser__ui__webui__chrome_web_ui_controller_factory.cc b/www/chromium/files/patch-chrome__browser__ui__webui__chrome_web_ui_controller_factory.cc
index 3b9d81d7d26c..df12a7be791d 100644
--- a/www/chromium/files/patch-chrome__browser__ui__webui__chrome_web_ui_controller_factory.cc
+++ b/www/chromium/files/patch-chrome__browser__ui__webui__chrome_web_ui_controller_factory.cc
@@ -1,9 +1,9 @@
---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2012-05-30 10:01:56.000000000 +0300
-+++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc 2012-06-05 21:58:25.000000000 +0300
-@@ -320,7 +320,7 @@
+--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2012-11-27 10:02:11.000000000 +0200
++++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc 2012-11-28 21:02:24.000000000 +0200
+@@ -366,7 +366,7 @@
+ url.host() == chrome::kChromeUIMemoryRedirectHost ||
url.host() == chrome::kChromeUIStatsHost ||
- url.host() == chrome::kChromeUITermsHost ||
- url.host() == chrome::kChromeUIVersionHost
+ url.host() == chrome::kChromeUITermsHost
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_LINUX) || defined(OS_BSD)
|| url.host() == chrome::kChromeUILinuxProxyConfigHost
diff --git a/www/chromium/files/patch-chrome__chrome_browser.gypi b/www/chromium/files/patch-chrome__chrome_browser.gypi
index a3a6d379818b..4af4dd1903a4 100644
--- a/www/chromium/files/patch-chrome__chrome_browser.gypi
+++ b/www/chromium/files/patch-chrome__chrome_browser.gypi
@@ -1,15 +1,19 @@
---- chrome/chrome_browser.gypi.orig 2012-10-31 21:02:48.000000000 +0200
-+++ chrome/chrome_browser.gypi 2012-11-07 16:06:11.000000000 +0200
-@@ -2531,6 +2531,14 @@
+--- chrome/chrome_browser.gypi.orig 2012-11-27 10:02:39.000000000 +0200
++++ chrome/chrome_browser.gypi 2012-11-29 22:30:15.798669580 +0200
+@@ -2633,6 +2633,18 @@
['exclude', '^browser/usb/'],
],
}],
+ ['os_bsd==1', {
+ 'sources!': [
-+ 'browser/media_gallery/media_device_notifications_linux.cc',
-+ 'browser/media_gallery/media_device_notifications_linux.h',
++ 'browser/chrome_browser_main_linux.cc',
++ 'browser/chrome_browser_main_linux.h',
++ 'browser/media_gallery/mtp_device_delegate_impl_linux.cc',
++ 'browser/media_gallery/mtp_device_delegate_impl_linux.h',
++ 'browser/system_monitor/media_transfer_protocol_device_observer_linux.cc',
++ 'browser/system_monitor/media_transfer_protocol_device_observer_linux.h',
+ 'browser/system_monitor/removable_device_notifications_linux.cc',
-+ 'browser/system_monitor/removable_device_notifications_linux.h'
++ 'browser/system_monitor/removable_device_notifications_linux.h',
+ ],
+ }],
['OS=="mac"', {
diff --git a/www/chromium/files/patch-content__app__content_main_runner.cc b/www/chromium/files/patch-content__app__content_main_runner.cc
index 8225ea5d65ae..612eacdb1542 100644
--- a/www/chromium/files/patch-content__app__content_main_runner.cc
+++ b/www/chromium/files/patch-content__app__content_main_runner.cc
@@ -1,15 +1,15 @@
---- content/app/content_main_runner.cc.orig 2012-10-31 21:01:34.000000000 +0200
-+++ content/app/content_main_runner.cc 2012-11-07 17:25:10.000000000 +0200
-@@ -91,7 +91,7 @@
+--- content/app/content_main_runner.cc.orig 2012-11-27 10:01:23.000000000 +0200
++++ content/app/content_main_runner.cc 2012-12-09 16:57:51.000000000 +0200
+@@ -99,7 +99,7 @@
extern int RendererMain(const content::MainFunctionParams&);
- extern int WorkerMain(const content::MainFunctionParams&);
- extern int UtilityMain(const content::MainFunctionParams&);
+ extern int UtilityMain(const MainFunctionParams&);
+ extern int WorkerMain(const MainFunctionParams&);
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- namespace content {
extern int ZygoteMain(const MainFunctionParams&,
ZygoteForkDelegate* forkdelegate);
-@@ -333,7 +333,7 @@
+ #endif
+@@ -344,7 +344,7 @@
int (*function)(const MainFunctionParams&);
};
@@ -18,7 +18,7 @@
// On platforms that use the zygote, we have a special subset of
// subprocesses that are launched via the zygote. This function
// fills in some process-launching bits around ZygoteMain().
-@@ -438,7 +438,7 @@
+@@ -449,7 +449,7 @@
}
}
@@ -27,12 +27,3 @@
// Zygote startup is special -- see RunZygote comments above
// for why we don't use ZygoteMain directly.
if (process_type == switches::kZygoteProcess)
-@@ -548,7 +548,7 @@
- kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor);
- #endif // !OS_ANDROID && !OS_IOS
-
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- g_fds->Set(kCrashDumpSignal,
- kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor);
- #endif
diff --git a/www/chromium/files/patch-content__browser__child_process_launcher.cc b/www/chromium/files/patch-content__browser__child_process_launcher.cc
index a63c6df069b4..f0b51a89b24c 100644
--- a/www/chromium/files/patch-content__browser__child_process_launcher.cc
+++ b/www/chromium/files/patch-content__browser__child_process_launcher.cc
@@ -1,25 +1,25 @@
---- content/browser/child_process_launcher.cc.orig 2012-10-31 21:01:35.000000000 +0200
-+++ content/browser/child_process_launcher.cc 2012-11-19 22:35:00.000000000 +0200
-@@ -52,7 +52,7 @@
+--- content/browser/child_process_launcher.cc.orig 2012-11-27 10:01:25.000000000 +0200
++++ content/browser/child_process_launcher.cc 2012-12-09 17:02:22.000000000 +0200
+@@ -53,7 +53,7 @@
termination_status_(base::TERMINATION_STATUS_NORMAL_TERMINATION),
- exit_code_(content::RESULT_CODE_NORMAL_EXIT),
+ exit_code_(RESULT_CODE_NORMAL_EXIT),
starting_(true)
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
, zygote_(false)
#endif
{
-@@ -188,7 +188,7 @@
- base::GlobalDescriptors::Mapping files_to_register;
- files_to_register.push_back(std::pair<base::GlobalDescriptors::Key, int>(
- kPrimaryIPCChannel, ipcfd));
+@@ -196,7 +196,7 @@
+ FileDescriptorInfo(kPrimaryIPCChannel,
+ base::FileDescriptor(ipcfd, false)));
+
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
- content::GetContentClient()->browser()->
- GetAdditionalMappedFilesForChildProcess(*cmd_line, &files_to_register);
- if (use_zygote) {
-@@ -209,7 +209,7 @@
- id_file.first + base::GlobalDescriptors::kBaseDescriptor));
+ GetContentClient()->browser()->
+ GetAdditionalMappedFilesForChildProcess(*cmd_line, child_process_id,
+ &files_to_register);
+@@ -217,7 +217,7 @@
+ base::GlobalDescriptors::kBaseDescriptor));
}
-#if !defined(OS_MACOSX)
@@ -27,7 +27,7 @@
if (process_type == switches::kRendererProcess) {
const int sandbox_fd =
RenderSandboxHostLinux::GetInstance()->GetRendererSocket();
-@@ -261,7 +261,7 @@
+@@ -269,7 +269,7 @@
base::Bind(
&Context::Notify,
this_object.get(),
@@ -36,7 +36,7 @@
use_zygote,
#endif
handle));
-@@ -269,7 +269,7 @@
+@@ -277,7 +277,7 @@
}
void Notify(
@@ -45,7 +45,7 @@
bool zygote,
#endif
base::ProcessHandle handle) {
-@@ -282,7 +282,7 @@
+@@ -290,7 +290,7 @@
if (!handle)
LOG(ERROR) << "Failed to launch child process";
@@ -54,7 +54,7 @@
zygote_ = zygote;
#endif
if (client_) {
-@@ -305,7 +305,7 @@
+@@ -313,7 +313,7 @@
BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
base::Bind(
&Context::TerminateInternal,
@@ -63,7 +63,7 @@
zygote_,
#endif
process_.handle()));
-@@ -319,7 +319,7 @@
+@@ -327,7 +327,7 @@
}
static void TerminateInternal(
@@ -72,8 +72,8 @@
bool zygote,
#endif
base::ProcessHandle handle) {
-@@ -333,7 +333,7 @@
- process.Terminate(content::RESULT_CODE_NORMAL_EXIT);
+@@ -341,7 +341,7 @@
+ process.Terminate(RESULT_CODE_NORMAL_EXIT);
// On POSIX, we must additionally reap the child.
#if defined(OS_POSIX)
-#if !defined(OS_MACOSX)
@@ -81,7 +81,7 @@
if (zygote) {
// If the renderer was created via a zygote, we have to proxy the reaping
// through the zygote process.
-@@ -360,7 +360,7 @@
+@@ -368,7 +368,7 @@
#if defined(OS_ANDROID)
// The fd to close after creating the process.
int ipcfd_;
@@ -90,7 +90,7 @@
bool zygote_;
#endif
};
-@@ -413,7 +413,7 @@
+@@ -423,7 +423,7 @@
*exit_code = context_->exit_code_;
return context_->termination_status_;
}
diff --git a/www/chromium/files/patch-content__browser__geolocation__empty_device_data_provider.cc b/www/chromium/files/patch-content__browser__geolocation__empty_device_data_provider.cc
new file mode 100644
index 000000000000..d5a1b81ef544
--- /dev/null
+++ b/www/chromium/files/patch-content__browser__geolocation__empty_device_data_provider.cc
@@ -0,0 +1,11 @@
+--- content/browser/geolocation/empty_device_data_provider.cc.orig 2012-11-27 21:01:24.000000000 -0500
++++ content/browser/geolocation/empty_device_data_provider.cc 2012-12-06 15:40:02.698863304 -0500
+@@ -5,7 +5,7 @@
+ #include "content/browser/geolocation/empty_device_data_provider.h"
+
+ // Only define for platforms that lack a real wifi data provider.
+-#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_LINUX)
++#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_FREEBSD)
+ // static
+ template<>
+ WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() {
diff --git a/www/chromium/files/patch-content__browser__geolocation__location_provider.cc b/www/chromium/files/patch-content__browser__geolocation__location_provider.cc
index 7c469ff71055..dedf89954775 100644
--- a/www/chromium/files/patch-content__browser__geolocation__location_provider.cc
+++ b/www/chromium/files/patch-content__browser__geolocation__location_provider.cc
@@ -5,7 +5,7 @@
}
-#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_WIN) && !defined OS_ANDROID
-+#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_WIN) && !defined OS_ANDROID && !defined(OS_FREEBSD)
++#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_ANDROID) && !defined(OS_FREEBSD)
LocationProviderBase* NewSystemLocationProvider() {
return NULL;
}
diff --git a/www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.cc b/www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.cc
new file mode 100644
index 000000000000..18ba11456cea
--- /dev/null
+++ b/www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.cc
@@ -0,0 +1,204 @@
+--- content/browser/geolocation/wifi_data_provider_freebsd.cc.orig 2012-12-27 23:17:38.000000000 +0100
++++ content/browser/geolocation/wifi_data_provider_freebsd.cc 2012-12-28 12:28:16.000000000 +0100
+@@ -0,0 +1,201 @@
++// Copyright (c) 2010 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++// For FreeBSD we use the getifaddrs(3) to obtain the list of interfaces
++// and then check for those with an 802.11 media type and able to return
++// a list of stations. This is similar to ifconfig(8).
++
++#include "content/browser/geolocation/wifi_data_provider_freebsd.h"
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/sockio.h>
++#include <net/if.h>
++#include <net/if_media.h>
++#include <ifaddrs.h>
++#include <net80211/ieee80211_ioctl.h>
++#include <net/ethernet.h>
++
++#include "base/utf_string_conversions.h"
++#include "content/browser/geolocation/wifi_data_provider_common.h"
++
++namespace content {
++namespace {
++// The time periods, in milliseconds, between successive polls of the wifi data.
++const int kDefaultPollingInterval = 120000; // 2 mins
++const int kNoChangePollingInterval = 300000; // 5 mins
++const int kTwoNoChangePollingInterval = 600000; // 10 mins
++const int kNoWifiPollingIntervalMilliseconds = 20 * 1000; // 20s
++
++// Convert a wifi frequency to the corresponding channel.
++// Taken from wifi_data_provider_linux.cc where it says this was
++// adapted from geolocaiton/wifilib.cc in googleclient (internal to google).
++int frquency_to_channel(int frequency_Mhz) {
++ if (frequency_Mhz >= 2412 && frequency_Mhz <= 2472) // Channels 1-13.
++ return (frequency_Mhz - 2407) / 5;
++ if (frequency_Mhz == 2484)
++ return 14;
++ if (frequency_Mhz > 5000 && frequency_Mhz < 6000) // .11a bands.
++ return (frequency_Mhz - 5000) / 5;
++ // Ignore everything else.
++ return AccessPointData().channel; // invalid channel
++}
++
++// Provides the wifi API binding for FreeBSD.
++class FreeBSDAccessPointData : public WifiDataProviderCommon::WlanApiInterface {
++public:
++ FreeBSDAccessPointData();
++ ~FreeBSDAccessPointData();
++
++ // this does nothing
++ bool Init();
++
++ // get the AP data
++ virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data);
++
++private:
++ DISALLOW_COPY_AND_ASSIGN(FreeBSDAccessPointData);
++};
++
++FreeBSDAccessPointData::FreeBSDAccessPointData() {
++}
++
++FreeBSDAccessPointData::~FreeBSDAccessPointData() {
++}
++
++bool FreeBSDAccessPointData::Init() {
++ return true;
++}
++
++bool FreeBSDAccessPointData::GetAccessPointData(WifiData::AccessPointDataSet* data) {
++ bool res;
++ char *dupn;
++ struct ifaddrs *ifal, *ifa;
++ struct ifreq ifr;
++ struct ifmediareq ifmr;
++ struct ieee80211req i802r;
++ int s;
++ char iscanbuf[32*1024], *vsr;
++ unsigned len;
++ AccessPointData apd;
++
++ res = false;
++ if (getifaddrs(&ifal) < 0)
++ return res;
++
++ dupn = NULL;
++ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
++ memset(&ifr, 0, sizeof(ifr));
++
++ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ continue;
++ dupn = ifa->ifa_name;
++
++ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
++ ifr.ifr_addr.sa_family = AF_LOCAL;
++
++ if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0)
++ continue;
++
++ (void) memset(&ifmr, 0, sizeof(ifmr));
++ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++
++ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
++ close(s);
++ continue;
++ }
++ if (IFM_TYPE(ifmr.ifm_active) != IFM_IEEE80211) {
++ close(s);
++ continue;
++ }
++
++ (void) memset(&i802r, 0, sizeof(i802r));
++ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
++ i802r.i_data = iscanbuf;
++ i802r.i_len = sizeof(iscanbuf);
++ if (ioctl(s, SIOCG80211, &i802r) < 0) {
++ close(s);
++ continue;
++ }
++
++ close(s);
++
++ vsr = (char *) i802r.i_data;
++ len = i802r.i_len;
++ while (len >= sizeof(struct ieee80211req_scan_result)) {
++ struct ieee80211req_scan_result *isr;
++ char *id;
++ int idlen;
++ char ssid[IEEE80211_NWID_LEN+1];
++
++ isr = (struct ieee80211req_scan_result *) vsr;
++
++ if (isr->isr_meshid_len) {
++ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
++ idlen = isr->isr_meshid_len;
++ }
++ else {
++ id = vsr + isr->isr_ie_off;
++ idlen = isr->isr_ssid_len;
++ }
++ strncpy(ssid, id, idlen);
++ ssid[idlen] = '\0';
++ apd.ssid = UTF8ToUTF16(ssid);
++ apd.mac_address = MacAddressAsString16(isr->isr_bssid);
++ apd.radio_signal_strength = (isr->isr_rssi/2) + isr->isr_noise;
++ apd.signal_to_noise = apd.radio_signal_strength - isr->isr_noise;
++ apd.channel = frquency_to_channel(isr->isr_freq);
++ VLOG(1) << "FreeBSD access point: "
++ << "SSID: " << apd.ssid << ", "
++ << "MAC: " << apd.mac_address << ", "
++ << "Strength: " << apd.radio_signal_strength << ":"
++ << apd.signal_to_noise << ", "
++ << "Channel: " << apd.channel;
++ data->insert(apd);
++ res = true;
++ len -= isr->isr_len;
++ vsr += isr->isr_len;
++ }
++ }
++
++ freeifaddrs(ifal);
++
++ return res;
++}
++
++} // namespace
++
++// static
++template<>
++WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() {
++ return new FreeBSDWifiDataProvider();
++}
++
++FreeBSDWifiDataProvider::FreeBSDWifiDataProvider() {
++}
++
++FreeBSDWifiDataProvider::~FreeBSDWifiDataProvider() {
++}
++
++WifiDataProviderCommon::WlanApiInterface* FreeBSDWifiDataProvider::NewWlanApi() {
++
++ scoped_ptr<FreeBSDAccessPointData> wlan_api(new FreeBSDAccessPointData);
++ if (wlan_api->Init())
++ return wlan_api.release();
++
++ return NULL;
++}
++
++PollingPolicyInterface* FreeBSDWifiDataProvider::NewPollingPolicy() {
++ return new GenericPollingPolicy<kDefaultPollingInterval,
++ kNoChangePollingInterval,
++ kTwoNoChangePollingInterval,
++ kNoWifiPollingIntervalMilliseconds>;
++}
++
++} // namespace content
diff --git a/www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.h b/www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.h
new file mode 100644
index 000000000000..dc959eda1339
--- /dev/null
+++ b/www/chromium/files/patch-content__browser__geolocation__wifi_data_provider_freebsd.h
@@ -0,0 +1,32 @@
+--- content/browser/geolocation/wifi_data_provider_freebsd.h.orig 2012-12-27 23:17:38.000000000 +0100
++++ content/browser/geolocation/wifi_data_provider_freebsd.h 2012-12-28 12:31:07.000000000 +0100
+@@ -0,0 +1,29 @@
++// Copyright (c) 2012 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
++#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
++
++#include "content/browser/geolocation/wifi_data_provider_common.h"
++
++namespace content {
++
++// Implementation of the wifi data provider for FreeBSD.
++class CONTENT_EXPORT FreeBSDWifiDataProvider : public WifiDataProviderCommon {
++public:
++ FreeBSDWifiDataProvider();
++
++private:
++ virtual ~FreeBSDWifiDataProvider();
++
++ // WifiDataProviderCommon
++ virtual WlanApiInterface* NewWlanApi() OVERRIDE;
++ virtual PollingPolicyInterface* NewPollingPolicy() OVERRIDE;
++
++ DISALLOW_COPY_AND_ASSIGN(FreeBSDWifiDataProvider);
++};
++
++} // namespace content
++
++#endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
diff --git a/www/chromium/files/patch-content__browser__renderer_host__backing_store_gtk.cc b/www/chromium/files/patch-content__browser__renderer_host__backing_store_gtk.cc
deleted file mode 100644
index 3ba12dd2875f..000000000000
--- a/www/chromium/files/patch-content__browser__renderer_host__backing_store_gtk.cc
+++ /dev/null
@@ -1,22 +0,0 @@
---- content/browser/renderer_host/backing_store_gtk.cc.orig 2011-09-14 11:01:10.000000000 +0300
-+++ content/browser/renderer_host/backing_store_gtk.cc 2011-09-22 00:21:16.000000000 +0300
-@@ -57,6 +57,9 @@
- XShmDetach(display, shminfo);
- XDestroyImage(image);
- shmdt(shminfo->shmaddr);
-+#if defined(OS_FREEBSD)
-+ shmctl(shminfo->shmid, IPC_RMID, 0);
-+#endif
- }
-
- BackingStoreX::BackingStoreGtk(RenderWidgetHost* widget,
-@@ -339,7 +342,9 @@
- }
-
- void* mapped_memory = shmat(shminfo.shmid, NULL, SHM_RDONLY);
-+#if !defined(OS_FREEBSD)
- shmctl(shminfo.shmid, IPC_RMID, 0);
-+#endif
- if (mapped_memory == (void*)-1) {
- XDestroyImage(image);
- return false;
diff --git a/www/chromium/files/patch-content__browser__renderer_host__render_message_filter.cc b/www/chromium/files/patch-content__browser__renderer_host__render_message_filter.cc
deleted file mode 100644
index fbc47b56821b..000000000000
--- a/www/chromium/files/patch-content__browser__renderer_host__render_message_filter.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- content/browser/renderer_host/render_message_filter.cc.orig 2011-11-01 10:42:33.000000000 +0200
-+++ content/browser/renderer_host/render_message_filter.cc 2011-11-21 21:16:01.000000000 +0200
-@@ -348,7 +348,7 @@
- OnCheckNotificationPermission)
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedMemory,
- OnAllocateSharedMemory)
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- IPC_MESSAGE_HANDLER(ViewHostMsg_AllocTransportDIB, OnAllocTransportDIB)
- IPC_MESSAGE_HANDLER(ViewHostMsg_FreeTransportDIB, OnFreeTransportDIB)
- #endif
-@@ -656,7 +656,7 @@
- return context;
- }
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- void RenderMessageFilter::OnAllocTransportDIB(
- size_t size, bool cache_in_browser, TransportDIB::Handle* handle) {
- render_widget_helper_->AllocTransportDIB(size, cache_in_browser, handle);
diff --git a/www/chromium/files/patch-content__browser__renderer_host__render_process_host_impl.cc b/www/chromium/files/patch-content__browser__renderer_host__render_process_host_impl.cc
deleted file mode 100644
index 158ca9aca61a..000000000000
--- a/www/chromium/files/patch-content__browser__renderer_host__render_process_host_impl.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- content/browser/renderer_host/render_process_host_impl.cc.orig 2012-01-29 16:19:50.000000000 +0200
-+++ content/browser/renderer_host/render_process_host_impl.cc 2012-01-29 16:20:14.000000000 +0200
-@@ -806,7 +806,7 @@
- STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ | FILE_MAP_WRITE,
- FALSE, 0);
- return TransportDIB::Map(section);
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_FREEBSD)
- // On OSX, the browser allocates all DIBs and keeps a file descriptor around
- // for each.
- return widget_helper_->MapTransportDIB(dib_id);
diff --git a/www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.cc b/www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.cc
deleted file mode 100644
index 1a5da08da1fc..000000000000
--- a/www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- content/browser/renderer_host/render_widget_helper.cc.orig 2010-12-16 02:11:57.000000000 +0100
-+++ content/browser/renderer_host/render_widget_helper.cc 2010-12-20 20:15:08.000000000 +0100
-@@ -58,7 +58,7 @@
- // object, so we should not be destroyed unless pending_paints_ is empty!
- DCHECK(pending_paints_.empty());
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- ClearAllocatedDIBs();
- #endif
- }
-@@ -274,7 +274,7 @@
- host->CreateNewFullscreenWidget(route_id, popup_type);
- }
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- TransportDIB* RenderWidgetHelper::MapTransportDIB(TransportDIB::Id dib_id) {
- AutoLock locked(allocated_dibs_lock_);
-
diff --git a/www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.h b/www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.h
deleted file mode 100644
index c53632ea7233..000000000000
--- a/www/chromium/files/patch-content__browser__renderer_host__render_widget_helper.h
+++ /dev/null
@@ -1,29 +0,0 @@
---- content/browser/renderer_host/render_widget_helper.h.orig 2010-12-16 02:11:57.000000000 +0100
-+++ content/browser/renderer_host/render_widget_helper.h 2010-12-20 20:15:08.000000000 +0100
-@@ -110,7 +110,7 @@
- const base::TimeDelta& max_delay,
- IPC::Message* msg);
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // Given the id of a transport DIB, return a mapping to it or NULL on error.
- TransportDIB* MapTransportDIB(TransportDIB::Id dib_id);
- #endif
-@@ -134,7 +134,7 @@
- WebKit::WebPopupType popup_type,
- int* route_id);
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // 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
-@@ -191,7 +191,7 @@
- // Called on the IO thread to resume a cross-site response.
- void OnCrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params);
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // Called on destruction to release all allocated transport DIBs
- void ClearAllocatedDIBs();
-
diff --git a/www/chromium/files/patch-content__common__plugin_messages.h b/www/chromium/files/patch-content__common__plugin_messages.h
deleted file mode 100644
index bed300ec9240..000000000000
--- a/www/chromium/files/patch-content__common__plugin_messages.h
+++ /dev/null
@@ -1,38 +0,0 @@
---- content/common/plugin_messages.h.orig 2011-07-28 11:01:09.000000000 +0300
-+++ content/common/plugin_messages.h 2011-09-06 23:29:54.000000000 +0300
-@@ -111,7 +111,7 @@
- gfx::PluginWindowHandle /* output: X window id */)
- #endif
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // On Mac OS X, we need the browser to keep track of plugin windows so
- // that it can add and remove them from stacking groups, hide and show the
- // menu bar, etc. We pass the window rect for convenience so that the
-@@ -206,7 +206,7 @@
- IPC_MESSAGE_ROUTED1(PluginMsg_SetContentAreaFocus,
- bool /* has_focus */)
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- IPC_MESSAGE_ROUTED1(PluginMsg_SetWindowFocus,
- bool /* has_focus */)
-
-@@ -278,7 +278,7 @@
- IPC_MESSAGE_CONTROL1(PluginMsg_ResetModalDialogEvent,
- gfx::NativeViewId /* containing_window */)
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // This message, used only on 10.6 and later, transmits the "fake"
- // window handle allocated by the browser on behalf of the renderer
- // to the GPU plugin.
-@@ -358,7 +358,7 @@
-
- IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown)
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- IPC_MESSAGE_ROUTED1(PluginHostMsg_FocusChanged,
- bool /* focused */)
-
diff --git a/www/chromium/files/patch-content__common__view_messages.h b/www/chromium/files/patch-content__common__view_messages.h
deleted file mode 100644
index 1ad3b87f2782..000000000000
--- a/www/chromium/files/patch-content__common__view_messages.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- content/common/view_messages.h.orig 2011-06-05 19:01:24.752163332 +0300
-+++ content/common/view_messages.h 2011-06-05 19:01:40.420163036 +0300
-@@ -1783,7 +1783,7 @@
- IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
- bool /* enabled */)
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // 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/www/chromium/files/patch-content__content_browser.gypi b/www/chromium/files/patch-content__content_browser.gypi
index 1a0c79f6ace9..7ab8d90e0b9d 100644
--- a/www/chromium/files/patch-content__content_browser.gypi
+++ b/www/chromium/files/patch-content__content_browser.gypi
@@ -1,20 +1,33 @@
---- content/content_browser.gypi.orig 2012-10-31 21:01:37.000000000 +0200
-+++ content/content_browser.gypi 2012-11-07 13:18:40.000000000 +0200
-@@ -995,8 +995,17 @@
+--- content/content_browser.gypi.orig 2012-11-27 10:01:27.000000000 +0200
++++ content/content_browser.gypi 2012-12-10 22:21:14.000000000 +0200
+@@ -409,6 +409,8 @@
+ 'browser/geolocation/wifi_data_provider_common_win.cc',
+ 'browser/geolocation/wifi_data_provider_common_win.h',
+ 'browser/geolocation/wifi_data_provider_corewlan_mac.mm',
++ 'browser/geolocation/wifi_data_provider_freebsd.cc',
++ 'browser/geolocation/wifi_data_provider_freebsd.h',
+ 'browser/geolocation/wifi_data_provider_linux.cc',
+ 'browser/geolocation/wifi_data_provider_linux.h',
+ 'browser/geolocation/wifi_data_provider_mac.cc',
+@@ -1056,9 +1056,18 @@
+ ],
}],
['os_bsd==1', {
- 'sources/': [
-+ ['exclude', 'public/browser/zygote_host_linux\\.h$'],
-+ ['exclude', 'browser/zygote_host/zygote_host_impl_linux\\.cc$'],
-+ ['exclude', 'browser/zygote_host/zygote_host_impl_linux\\.h$'],
-+ ['exclude', 'zygote/zygote_linux\\.cc$'],
-+ ['exclude', 'zygote/zygote_linux\\.h$'],
-+ ['exclude', 'zygote/zygote_main_linux\\.cc$'],
-+ ['exclude', '^browser/device_monitor_linux\\.cc$'],
-+ ['exclude', '^browser/download/file_metadata_linux\\.cc$'],
- ['exclude', '^browser/gamepad/gamepad_platform_data_fetcher_linux\\.cc$'],
- ['exclude', '^browser/geolocation/wifi_data_provider_linux\\.cc$'],
-+ ['exclude', '^browser/udev_linux\\.cc$'],
+- 'sources/': [
+- ['exclude', '^browser/gamepad/gamepad_platform_data_fetcher_linux\\.cc$'],
+- ['exclude', '^browser/geolocation/wifi_data_provider_linux\\.cc$'],
++ 'sources!': [
++ 'public/browser/zygote_host_linux.h',
++ 'browser/zygote_host/zygote_host_impl_linux.cc',
++ 'browser/zygote_host/zygote_host_impl_linux.h',
++ 'zygote/zygote_linux.cc',
++ 'zygote/zygote_linux.h',
++ 'zygote/zygote_main_linux.cc',
++ 'browser/device_monitor_linux.cc',
++ 'browser/download/file_metadata_linux.cc',
++ 'browser/gamepad/gamepad_platform_data_fetcher_linux.cc',
++ 'browser/geolocation/wifi_data_provider_linux.cc',
++ 'browser/udev_linux.cc',
],
}],
- ['use_aura==1', {
+ ['use_aura!=1 and OS!="win"', {
diff --git a/www/chromium/files/patch-content__content_common.gypi b/www/chromium/files/patch-content__content_common.gypi
index a4094c16edfa..1cc65d55b09b 100644
--- a/www/chromium/files/patch-content__content_common.gypi
+++ b/www/chromium/files/patch-content__content_common.gypi
@@ -1,11 +1,17 @@
---- content/content_common.gypi.orig 2012-11-07 15:08:50.000000000 +0200
-+++ content/content_common.gypi 2012-11-07 15:09:05.000000000 +0200
-@@ -330,8 +330,6 @@
- 'common/sandbox_linux.cc',
- 'common/sandbox_policy.cc',
- 'common/sandbox_policy.h',
-- 'common/sandbox_seccomp_bpf_linux.cc',
-- 'common/sandbox_seccomp_bpf_linux.h',
- 'common/savable_url_schemes.cc',
- 'common/savable_url_schemes.h',
- 'common/set_process_title.cc',
+--- content/content_common.gypi.orig 2012-11-27 10:01:27.000000000 +0200
++++ content/content_common.gypi 2012-12-10 22:16:37.000000000 +0200
+@@ -436,6 +436,14 @@
+ 'content.gyp:common_aidl',
+ ],
+ }],
++ ['os_bsd==1', {
++ 'sources!': [
++ 'common/sandbox_linux.cc',
++ 'common/sandbox_linux.h',
++ 'common/sandbox_seccomp_bpf_linux.cc',
++ 'common/sandbox_seccomp_bpf_linux.h',
++ ],
++ }],
+ ['toolkit_uses_gtk == 1', {
+ 'dependencies': [
+ '../build/linux/system.gyp:gtk',
diff --git a/www/chromium/files/patch-content__content_gpu.gypi b/www/chromium/files/patch-content__content_gpu.gypi
index 995bbfa5151f..4b2c48d9d3bd 100644
--- a/www/chromium/files/patch-content__content_gpu.gypi
+++ b/www/chromium/files/patch-content__content_gpu.gypi
@@ -1,11 +1,11 @@
---- content/content_gpu.gypi.orig 2012-10-01 20:45:02.000000000 +0300
-+++ content/content_gpu.gypi 2012-10-01 20:45:37.000000000 +0300
+--- content/content_gpu.gypi.orig 2012-11-28 04:01:27.000000000 +0200
++++ content/content_gpu.gypi 2012-12-04 22:06:17.000000000 +0200
@@ -95,7 +95,7 @@
'../third_party/amd/amd_videocard_info_win.cc',
],
}],
- ['OS=="linux"', {
-+ ['OS=="linux" or OS=="freebsd"', {
++ ['OS=="linux" or os_bsd==1', {
'dependencies': [
'../third_party/libXNVCtrl/libXNVCtrl.gyp:libXNVCtrl',
],
diff --git a/www/chromium/files/patch-content__content_tests.gypi b/www/chromium/files/patch-content__content_tests.gypi
new file mode 100644
index 000000000000..d5628d043ebe
--- /dev/null
+++ b/www/chromium/files/patch-content__content_tests.gypi
@@ -0,0 +1,18 @@
+--- content/content_tests.gypi.orig 2013-01-08 23:49:55.890245836 +0200
++++ content/content_tests.gypi 2013-01-08 23:52:52.374246102 +0200
+@@ -585,6 +585,15 @@
+ 'browser/geolocation/wifi_data_provider_linux_unittest.cc',
+ ],
+ }],
++ ['OS == "freebsd"', {
++ 'sources!': [
++ 'browser/download/file_metadata_unittest_linux.cc',
++ 'browser/geolocation/wifi_data_provider_linux_unittest.cc',
++ 'browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc',
++ 'browser/renderer_host/media/media_stream_manager_unittest.cc',
++ 'browser/renderer_host/media/media_stream_ui_controller_unittest.cc',
++ ],
++ }],
+ ['OS != "android" and OS != "ios"', {
+ 'dependencies': [
+ '../third_party/libvpx/libvpx.gyp:libvpx',
diff --git a/www/chromium/files/patch-content__plugin__plugin_main_linux.cc b/www/chromium/files/patch-content__plugin__plugin_main_linux.cc
index 649921105b36..feaf08c2b1b0 100644
--- a/www/chromium/files/patch-content__plugin__plugin_main_linux.cc
+++ b/www/chromium/files/patch-content__plugin__plugin_main_linux.cc
@@ -1,5 +1,5 @@
---- content/plugin/plugin_main_linux.cc.orig 2010-12-16 02:11:58.000000000 +0100
-+++ content/plugin/plugin_main_linux.cc 2010-12-20 20:15:08.000000000 +0100
+--- content/plugin/plugin_main_linux.cc.orig 2012-11-28 04:01:26.000000000 +0200
++++ content/plugin/plugin_main_linux.cc 2012-12-04 22:14:32.000000000 +0200
@@ -5,13 +5,13 @@
#include <signal.h>
#include <string.h>
@@ -12,7 +12,7 @@
// This whole file is only useful on 64-bit architectures.
-#if defined(ARCH_CPU_64_BITS)
-+#if defined(ARCH_CPU_64_BITS) && !defined(OS_FREEBSD)
++#if defined(ARCH_CPU_64_BITS) && !defined(OS_BSD)
namespace {
diff --git a/www/chromium/files/patch-content__public__common__common_param_traits.h b/www/chromium/files/patch-content__public__common__common_param_traits.h
deleted file mode 100644
index b4eec6c3d9c3..000000000000
--- a/www/chromium/files/patch-content__public__common__common_param_traits.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- content/public/common/common_param_traits.h.orig 2011-06-06 00:08:49.215163238 +0300
-+++ content/public/common/common_param_traits.h 2011-06-06 00:09:04.929165157 +0300
-@@ -187,7 +187,7 @@
- };
- #endif
-
--#if defined(USE_X11)
-+#if defined(USE_X11) && !defined(OS_FREEBSD)
- template<>
- struct ParamTraits<TransportDIB::Id> {
- typedef TransportDIB::Id param_type;
diff --git a/www/chromium/files/patch-content__public__test__browser_test_base.cc b/www/chromium/files/patch-content__public__test__browser_test_base.cc
new file mode 100644
index 000000000000..1a79e594dca2
--- /dev/null
+++ b/www/chromium/files/patch-content__public__test__browser_test_base.cc
@@ -0,0 +1,13 @@
+--- content/public/test/browser_test_base.cc.orig 2013-01-08 23:22:25.608704051 +0200
++++ content/public/test/browser_test_base.cc 2013-01-08 23:24:45.354245363 +0200
+@@ -4,6 +4,10 @@
+
+ #include "content/public/test/browser_test_base.h"
+
++#if defined(OS_FREEBSD)
++#include <sys/signal.h>
++#endif
++
+ #include "base/bind.h"
+ #include "base/command_line.h"
+ #include "base/debug/stack_trace.h"
diff --git a/www/chromium/files/patch-content__public__test__mock_render_process_host.cc b/www/chromium/files/patch-content__public__test__mock_render_process_host.cc
deleted file mode 100644
index f40fea12fb12..000000000000
--- a/www/chromium/files/patch-content__public__test__mock_render_process_host.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- content/public/test/mock_render_process_host.cc.orig 2010-12-16 02:11:57.000000000 +0100
-+++ content/public/test/mock_render_process_host.cc 2010-12-20 20:15:08.000000000 +0100
-@@ -106,7 +106,7 @@
- DuplicateHandle(GetCurrentProcess(), dib_id.handle, GetCurrentProcess(),
- &duped, 0, TRUE, DUPLICATE_SAME_ACCESS);
- transport_dib_ = TransportDIB::Map(duped);
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_FREEBSD)
- // On Mac, TransportDIBs are always created in the browser, so we cannot map
- // one from a dib_id.
- transport_dib_ = TransportDIB::Create(100 * 100 * 4, 0);
diff --git a/www/chromium/files/patch-content__renderer__pepper__pepper_platform_image_2d_impl.cc b/www/chromium/files/patch-content__renderer__pepper__pepper_platform_image_2d_impl.cc
deleted file mode 100644
index 5301d01132f4..000000000000
--- a/www/chromium/files/patch-content__renderer__pepper__pepper_platform_image_2d_impl.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- content/renderer/pepper/pepper_platform_image_2d_impl.cc.orig 2012-07-18 10:01:27.000000000 +0300
-+++ content/renderer/pepper/pepper_platform_image_2d_impl.cc 2012-07-25 21:15:02.000000000 +0300
-@@ -31,7 +31,7 @@
- UMA_HISTOGRAM_COUNTS("Plugin.PepperImage2DSize", buffer_size);
-
- // Allocate the transport DIB and the PlatformCanvas pointing to it.
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // On the Mac, shared memory has to be created in the browser in order to
- // work in the sandbox. Do this by sending a message to the browser
- // requesting a TransportDIB (see also
-@@ -66,7 +66,7 @@
- *byte_count = dib_->size();
- #if defined(OS_WIN)
- return reinterpret_cast<intptr_t>(dib_->handle());
--#elif defined(OS_MACOSX) || defined(OS_ANDROID)
-+#elif defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_FREEBSD)
- return static_cast<intptr_t>(dib_->handle().fd);
- #elif defined(OS_POSIX)
- return static_cast<intptr_t>(dib_->handle());
diff --git a/www/chromium/files/patch-content__renderer__render_process_impl.cc b/www/chromium/files/patch-content__renderer__render_process_impl.cc
index b4fe93d7dfec..7c868abda4ba 100644
--- a/www/chromium/files/patch-content__renderer__render_process_impl.cc
+++ b/www/chromium/files/patch-content__renderer__render_process_impl.cc
@@ -1,24 +1,24 @@
---- content/renderer/render_process_impl.cc.orig 2012-01-18 11:11:41.000000000 +0200
-+++ content/renderer/render_process_impl.cc 2012-01-29 17:05:58.000000000 +0200
-@@ -105,7 +105,7 @@
- #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_OPENBSD)
+--- content/renderer/render_process_impl.cc.orig 2012-11-14 04:01:35.000000000 +0200
++++ content/renderer/render_process_impl.cc 2012-12-03 23:25:17.000000000 +0200
+@@ -87,7 +87,7 @@
+
+ bool RenderProcessImpl::InProcessPlugins() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // 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))
+@@ -112,7 +112,7 @@
+
+ TransportDIB* RenderProcessImpl::CreateTransportDIB(size_t size) {
+ #if defined(OS_WIN) || defined(OS_LINUX) || \
+- defined(OS_OPENBSD) || defined(OS_ANDROID)
++ defined(OS_BSD) || defined(OS_ANDROID)
// Windows and Linux create transport DIBs inside the renderer
return TransportDIB::Create(size, transport_dib_next_sequence_number_++);
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_FREEBSD)
- // 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;
-@@ -122,7 +122,7 @@
- if (!dib)
- return;
-
--#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());
-@@ -140,7 +140,7 @@
+ #elif defined(OS_MACOSX)
+@@ -150,7 +150,7 @@
int width = rect.width();
int height = rect.height();
const size_t stride = skia::PlatformCanvas::StrideForWidth(rect.width());
diff --git a/www/chromium/files/patch-content__renderer__render_view_impl.cc b/www/chromium/files/patch-content__renderer__render_view_impl.cc
deleted file mode 100644
index 7022c6485eb7..000000000000
--- a/www/chromium/files/patch-content__renderer__render_view_impl.cc
+++ /dev/null
@@ -1,29 +0,0 @@
---- content/renderer/render_view_impl.cc.orig 2011-11-01 10:42:35.000000000 +0200
-+++ content/renderer/render_view_impl.cc 2011-11-21 22:20:15.000000000 +0200
-@@ -423,7 +423,7 @@
- file_chooser_completions_.pop_front();
- }
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // Destroy all fake plugin window handles on the browser side.
- while (!fake_plugin_window_handles_.empty()) {
- // Make sure no NULL plugin window handles were inserted into this list.
-@@ -1499,7 +1499,7 @@
- }
-
- bool RenderViewImpl::isSmartInsertDeleteEnabled() {
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- return true;
- #else
- return false;
-@@ -4318,7 +4318,7 @@
- }
- #endif
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) {
- IPC::Message* msg = new ViewHostMsg_PluginFocusChanged(routing_id(),
- focused, plugin_id);
diff --git a/www/chromium/files/patch-content__renderer__render_view_impl.h b/www/chromium/files/patch-content__renderer__render_view_impl.h
deleted file mode 100644
index a7072f52bc45..000000000000
--- a/www/chromium/files/patch-content__renderer__render_view_impl.h
+++ /dev/null
@@ -1,35 +0,0 @@
---- content/renderer/render_view_impl.h.orig 2012-09-25 16:01:33.000000000 +0300
-+++ content/renderer/render_view_impl.h 2012-09-29 17:42:16.000000000 +0300
-@@ -344,12 +344,12 @@
- void SimulateImeConfirmComposition(const string16& text,
- const ui::Range& replacement_range);
-
--#if defined(OS_MACOSX) || defined(OS_WIN)
-+#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_FREEBSD)
- // Informs the render view that the given plugin has gained or lost focus.
- void PluginFocusChanged(bool focused, int plugin_id);
- #endif
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // Starts plugin IME.
- void StartPluginIme();
-
-@@ -799,7 +799,7 @@
- FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
- GetCompositionCharacterBoundsTest);
- FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost);
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- FRIEND_TEST_ALL_PREFIXES(RenderViewTest, MacTestCmdUp);
- #endif
- FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SetHistoryLengthAndPrune);
-@@ -1271,7 +1271,7 @@
- bool cached_has_main_frame_horizontal_scrollbar_;
- bool cached_has_main_frame_vertical_scrollbar_;
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // Track the fake plugin window handles allocated on the browser side for
- // the accelerated compositor and (currently) accelerated plugins so that
- // we can discard them when the view goes away.
diff --git a/www/chromium/files/patch-content__renderer__render_widget.cc b/www/chromium/files/patch-content__renderer__render_widget.cc
deleted file mode 100644
index b5c827ad163a..000000000000
--- a/www/chromium/files/patch-content__renderer__render_widget.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- content/renderer/render_widget.cc.orig 2011-03-23 00:47:39.891641114 +0200
-+++ content/renderer/render_widget.cc 2011-03-23 00:48:36.043641158 +0200
-@@ -888,7 +888,7 @@
- // Close our unused handle.
- #if defined(OS_WIN)
- ::CloseHandle(dib_handle);
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_FREEBSD)
- base::SharedMemory::CloseHandle(dib_handle);
- #endif
- }
diff --git a/www/chromium/files/patch-content__renderer__renderer_main_platform_delegate_linux.cc b/www/chromium/files/patch-content__renderer__renderer_main_platform_delegate_linux.cc
index 4f129676c10e..7e82ce2e40ca 100644
--- a/www/chromium/files/patch-content__renderer__renderer_main_platform_delegate_linux.cc
+++ b/www/chromium/files/patch-content__renderer__renderer_main_platform_delegate_linux.cc
@@ -1,12 +1,25 @@
---- content/renderer/renderer_main_platform_delegate_linux.cc.orig 2012-10-31 21:01:36.000000000 +0200
-+++ content/renderer/renderer_main_platform_delegate_linux.cc 2012-11-07 17:38:32.000000000 +0200
-@@ -34,7 +34,9 @@
+--- content/renderer/renderer_main_platform_delegate_linux.cc.orig 2012-11-27 10:01:25.000000000 +0200
++++ content/renderer/renderer_main_platform_delegate_linux.cc 2012-12-10 22:47:50.000000000 +0200
+@@ -42,11 +42,14 @@
//
// The seccomp sandbox mode 1 (sandbox/linux/seccomp-legacy) and mode 2
// (sandbox/linux/seccomp-bpf) are started in InitializeSandbox().
+#if !defined(OS_BSD)
- content::InitializeSandbox();
+ InitializeSandbox();
+#endif
return true;
}
+ void RendererMainPlatformDelegate::RunSandboxTests(bool no_sandbox) {
++#if !defined(OS_BSD)
+ // The LinuxSandbox class requires going through initialization before
+ // GetStatus() and others can be used. When we are not launched through the
+ // Zygote, this initialization will only happen in the renderer process if
+@@ -81,6 +84,7 @@
+ CHECK_EQ(errno, EPERM);
+ }
+ #endif // __x86_64__
++#endif
+ }
+
+ } // namespace content
diff --git a/www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.cc b/www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.cc
deleted file mode 100644
index 9079ced23be8..000000000000
--- a/www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.cc
+++ /dev/null
@@ -1,26 +0,0 @@
---- content/renderer/webplugin_delegate_proxy.cc.orig 2012-05-30 10:01:23.000000000 +0300
-+++ content/renderer/webplugin_delegate_proxy.cc 2012-06-05 22:20:29.000000000 +0300
-@@ -491,7 +491,7 @@
- const TransportDIB::Handle& handle_in,
- TransportDIB::Handle* handle_out,
- base::ProcessId peer_pid) {
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // On Mac, TransportDIB::Handle is typedef'ed to FileDescriptor, and
- // FileDescriptor message fields needs to remain valid until the message is
- // sent or else the sendmsg() call will fail.
-@@ -651,12 +651,12 @@
- scoped_ptr<TransportDIB>* memory,
- scoped_ptr<skia::PlatformCanvas>* canvas) {
- const size_t size = BitmapSizeForPluginRect(plugin_rect_);
--#if defined(OS_POSIX) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD)
- memory->reset(TransportDIB::Create(size, 0));
- if (!memory->get())
- return false;
- #endif
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- TransportDIB::Handle handle;
- IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, false, &handle);
- if (!RenderThreadImpl::current()->Send(msg))
diff --git a/www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.h b/www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.h
deleted file mode 100644
index d61b89975e60..000000000000
--- a/www/chromium/files/patch-content__renderer__webplugin_delegate_proxy.h
+++ /dev/null
@@ -1,20 +0,0 @@
---- content/renderer/webplugin_delegate_proxy.h.orig 2011-09-11 19:07:19.000000000 +0300
-+++ content/renderer/webplugin_delegate_proxy.h 2011-09-11 19:07:36.000000000 +0300
-@@ -21,7 +21,7 @@
- #include "webkit/plugins/npapi/webplugininfo.h"
- #include "webkit/plugins/npapi/webplugin_delegate.h"
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- #include "base/hash_tables.h"
- #include "base/memory/linked_ptr.h"
- #endif
-@@ -243,7 +243,7 @@
- // point the window has already been destroyed).
- void WillDestroyWindow();
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_FREEBSD)
- // Synthesize a fake window handle for the plug-in to identify the instance
- // to the browser, allowing mapping to a surface for hardware acceleration
- // of plug-in content. The browser generates the handle which is then set on
diff --git a/www/chromium/files/patch-media__audio__audio_input_volume_unittest.cc b/www/chromium/files/patch-media__audio__audio_input_volume_unittest.cc
new file mode 100644
index 000000000000..554d2eb5102a
--- /dev/null
+++ b/www/chromium/files/patch-media__audio__audio_input_volume_unittest.cc
@@ -0,0 +1,20 @@
+--- media/audio/audio_input_volume_unittest.cc.orig 2013-01-08 22:03:03.389246512 +0200
++++ media/audio/audio_input_volume_unittest.cc 2013-01-08 22:03:51.071246007 +0200
+@@ -59,7 +59,7 @@
+ int samples_per_packet = 0;
+ #if defined(OS_MACOSX)
+ samples_per_packet = (sample_rate / 100);
+-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ samples_per_packet = (sample_rate / 100);
+ #elif defined(OS_WIN)
+ if (sample_rate == 44100)
+@@ -75,7 +75,7 @@
+ device_id);
+ EXPECT_TRUE(NULL != ais);
+
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Some linux devices do not support our settings, we may fail to open
+ // those devices.
+ if (!ais->Open()) {
diff --git a/www/chromium/files/patch-media__audio__audio_low_latency_input_output_unittest.cc b/www/chromium/files/patch-media__audio__audio_low_latency_input_output_unittest.cc
new file mode 100644
index 000000000000..dc6ddebeffae
--- /dev/null
+++ b/www/chromium/files/patch-media__audio__audio_low_latency_input_output_unittest.cc
@@ -0,0 +1,29 @@
+--- media/audio/audio_low_latency_input_output_unittest.cc.orig 2013-01-08 22:05:58.175309674 +0200
++++ media/audio/audio_low_latency_input_output_unittest.cc 2013-01-08 22:06:40.328246386 +0200
+@@ -19,7 +19,7 @@
+ #include "testing/gmock/include/gmock/gmock.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "media/audio/linux/audio_manager_linux.h"
+ #elif defined(OS_MACOSX)
+ #include "media/audio/mac/audio_manager_mac.h"
+@@ -32,7 +32,7 @@
+
+ namespace media {
+
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ typedef AudioManagerLinux AudioManagerAnyPlatform;
+ #elif defined(OS_MACOSX)
+ typedef AudioManagerMac AudioManagerAnyPlatform;
+@@ -338,7 +338,7 @@
+ #if defined(OS_MACOSX)
+ // 10ms buffer size works well for 44.1, 48, 96 and 192kHz.
+ samples_per_packet_ = (sample_rate_ / 100);
+-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ // 10ms buffer size works well for 44.1, 48, 96 and 192kHz.
+ samples_per_packet_ = (sample_rate_ / 100);
+ #elif defined(OS_WIN)
diff --git a/www/chromium/files/patch-media__media.gyp b/www/chromium/files/patch-media__media.gyp
index df91f70a8039..ad5f49f0dcf1 100644
--- a/www/chromium/files/patch-media__media.gyp
+++ b/www/chromium/files/patch-media__media.gyp
@@ -1,6 +1,6 @@
---- media/media.gyp.orig 2012-04-25 10:01:21.000000000 +0300
-+++ media/media.gyp 2012-04-30 00:26:41.000000000 +0300
-@@ -341,7 +341,7 @@
+--- media/media.gyp.orig 2012-11-27 10:01:14.000000000 +0200
++++ media/media.gyp 2012-11-28 22:11:36.000000000 +0200
+@@ -470,7 +470,7 @@
'audio/openbsd/audio_manager_openbsd.h',
],
}],
@@ -9,12 +9,12 @@
'variables': {
'conditions': [
['sysroot!=""', {
-@@ -858,7 +858,7 @@
+@@ -1101,7 +1101,7 @@
},
],
}],
-- ['OS == "linux" and target_arch != "arm"', {
-+ ['(OS == "linux" or OS == "freebsd") and target_arch != "arm"', {
+- ['OS == "linux" and target_arch != "arm" and target_arch != "mipsel"', {
++ ['(OS == "linux" or OS == "freebsd") and target_arch != "arm" and target_arch != "mipsel"', {
'targets': [
{
'target_name': 'tile_render_bench',
diff --git a/www/chromium/files/patch-ppapi__proxy__ppb_image_data_proxy.cc b/www/chromium/files/patch-ppapi__proxy__ppb_image_data_proxy.cc
deleted file mode 100644
index ac06e2a35f39..000000000000
--- a/www/chromium/files/patch-ppapi__proxy__ppb_image_data_proxy.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- ppapi/proxy/ppb_image_data_proxy.cc.orig 2012-04-25 10:01:26.000000000 +0300
-+++ ppapi/proxy/ppb_image_data_proxy.cc 2012-04-29 21:40:17.000000000 +0300
-@@ -104,7 +104,7 @@
- ImageHandle ImageData::NullHandle() {
- #if defined(OS_WIN)
- return NULL;
--#elif defined(OS_MACOSX) || defined(OS_ANDROID)
-+#elif defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_FREEBSD)
- return ImageHandle();
- #else
- return 0;
-@@ -114,7 +114,7 @@
- ImageHandle ImageData::HandleFromInt(int32_t i) {
- #if defined(OS_WIN)
- return reinterpret_cast<ImageHandle>(i);
--#elif defined(OS_MACOSX) || defined(OS_ANDROID)
-+#elif defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_FREEBSD)
- return ImageHandle(i, false);
- #else
- return static_cast<ImageHandle>(i);
diff --git a/www/chromium/files/patch-ppapi__proxy__serialized_structs.h b/www/chromium/files/patch-ppapi__proxy__serialized_structs.h
deleted file mode 100644
index e4f62d5ec8e7..000000000000
--- a/www/chromium/files/patch-ppapi__proxy__serialized_structs.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ppapi/proxy/serialized_structs.h.orig 2012-02-21 10:34:02.000000000 +0200
-+++ ppapi/proxy/serialized_structs.h 2012-02-27 18:19:15.000000000 +0200
-@@ -111,7 +111,7 @@
-
- #if defined(OS_WIN)
- typedef HANDLE ImageHandle;
--#elif defined(OS_MACOSX) || defined(OS_ANDROID)
-+#elif defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_FREEBSD)
- typedef base::SharedMemoryHandle ImageHandle;
- #else
- // On X Windows this is a SysV shared memory key.
diff --git a/www/chromium/files/patch-third_party__WebKit__Source__ThirdParty__gyp__test__additional-targets__src__dir1__actions.gyp b/www/chromium/files/patch-third_party__WebKit__Source__ThirdParty__gyp__test__additional-targets__src__dir1__actions.gyp
new file mode 100644
index 000000000000..95a0761333bd
--- /dev/null
+++ b/www/chromium/files/patch-third_party__WebKit__Source__ThirdParty__gyp__test__additional-targets__src__dir1__actions.gyp
@@ -0,0 +1,11 @@
+--- third_party/WebKit/Source/ThirdParty/gyp/test/additional-targets/src/dir1/actions.gyp.orig 2010-12-16 02:33:31.000000000 +0100
++++ third_party/WebKit/Source/ThirdParty/gyp/test/additional-targets/src/dir1/actions.gyp 2010-12-20 20:15:08.000000000 +0100
+@@ -47,7 +47,7 @@
+ },
+ ],
+ 'conditions': [
+- ['OS=="linux"', {
++ ['OS=="linux" or OS=="freebsd"', {
+ 'target_defaults': {
+ 'cflags': ['-fPIC'],
+ },
diff --git a/www/chromium/files/patch-tools__gyp__test__library__src__library.gyp b/www/chromium/files/patch-third_party__WebKit__Source__ThirdParty__gyp__test__library__src__library.gyp
index 050990b84576..db70f0bfd9c0 100644
--- a/www/chromium/files/patch-tools__gyp__test__library__src__library.gyp
+++ b/www/chromium/files/patch-third_party__WebKit__Source__ThirdParty__gyp__test__library__src__library.gyp
@@ -1,5 +1,5 @@
---- ./tools/gyp/test/library/src/library.gyp.orig 2010-12-16 02:33:32.000000000 +0100
-+++ ./tools/gyp/test/library/src/library.gyp 2010-12-20 20:15:08.000000000 +0100
+--- third_party/WebKit/Source/ThirdParty/gyp/test/library/src/library.gyp.orig 2010-12-16 02:33:32.000000000 +0100
++++ third_party/WebKit/Source/ThirdParty/gyp/test/library/src/library.gyp 2010-12-20 20:15:08.000000000 +0100
@@ -48,7 +48,7 @@
},
],
diff --git a/www/chromium/files/patch-third_party__protobuf__src__google__protobuf__compiler__main.cc b/www/chromium/files/patch-third_party__protobuf__src__google__protobuf__compiler__main.cc
deleted file mode 100644
index bc44b5b7abd0..000000000000
--- a/www/chromium/files/patch-third_party__protobuf__src__google__protobuf__compiler__main.cc
+++ /dev/null
@@ -1,15 +0,0 @@
---- third_party/protobuf/src/google/protobuf/compiler/main.cc.orig 2012-03-27 03:01:30.000000000 +0200
-+++ third_party/protobuf/src/google/protobuf/compiler/main.cc 2012-04-01 12:39:04.000000000 +0200
-@@ -35,9 +35,12 @@
- #include <google/protobuf/compiler/python/python_generator.h>
- #include <google/protobuf/compiler/java/java_generator.h>
-
-+#include <fenv.h>
-
- int main(int argc, char* argv[]) {
-
-+ fedisableexcept(FE_INVALID);
-+
- google::protobuf::compiler::CommandLineInterface cli;
- cli.AllowPlugins("protoc-");
-
diff --git a/www/chromium/files/patch-tools__gyp__pylib__gyp__generator__make.py b/www/chromium/files/patch-tools__gyp__pylib__gyp__generator__make.py
index 93aeab339451..b784d58225dc 100644
--- a/www/chromium/files/patch-tools__gyp__pylib__gyp__generator__make.py
+++ b/www/chromium/files/patch-tools__gyp__pylib__gyp__generator__make.py
@@ -1,6 +1,6 @@
---- tools/gyp/pylib/gyp/generator/make.py.orig 2012-10-31 21:04:03.000000000 +0200
-+++ tools/gyp/pylib/gyp/generator/make.py 2012-11-07 15:22:38.000000000 +0200
-@@ -87,7 +87,7 @@
+--- tools/gyp/pylib/gyp/generator/make.py.orig 2012-11-27 10:03:58.000000000 +0200
++++ tools/gyp/pylib/gyp/generator/make.py 2012-12-10 22:26:33.000000000 +0200
+@@ -86,7 +86,7 @@
else:
operating_system = flavor
if flavor == 'android':
@@ -9,8 +9,15 @@
default_variables.setdefault('OS', operating_system)
default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
default_variables.setdefault('SHARED_LIB_DIR','$(builddir)/lib.$(TOOLSET)')
-@@ -269,13 +269,13 @@
- # in gyp's make.py where ARFLAGS.host etc. is computed.
+@@ -265,19 +265,19 @@
+ CFLAGS.target ?= $(CFLAGS)
+ CXX.target ?= %(CXX.target)s
+ CXXFLAGS.target ?= $(CXXFLAGS)
+-LINK.target ?= %(LINK.target)s
++LINK.target ?= %(CXX.target)s
+ LDFLAGS.target ?= $(LDFLAGS)
+ AR.target ?= $(AR)
+
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
-CC.host ?= %(CC.host)s
@@ -24,13 +31,13 @@
+CFLAGS.host ?= $(CFLAGS)
+CXX.host ?= $(CXX)
+CXXFLAGS.host ?= $(CXXFLAGS)
-+LINK.host ?= $(LINK)
++LINK.host ?= $(CXX)
+LDFLAGS.host ?= $(LDFLAGS)
+AR.host ?= $(AR)
- ARFLAGS.host := %(ARFLAGS.host)s
# Define a dir function that can handle spaces.
-@@ -1770,7 +1770,7 @@
+ # http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
+@@ -1782,7 +1782,7 @@
return modules
# Retrieve the default value of 'SHARED_LIB_SUFFIX'
diff --git a/www/chromium/files/patch-tools__gyp__test__additional-targets__src__dir1__actions.gyp b/www/chromium/files/patch-tools__gyp__test__additional-targets__src__dir1__actions.gyp
deleted file mode 100644
index a350f6e110c8..000000000000
--- a/www/chromium/files/patch-tools__gyp__test__additional-targets__src__dir1__actions.gyp
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./tools/gyp/test/additional-targets/src/dir1/actions.gyp.orig 2010-12-16 02:33:31.000000000 +0100
-+++ ./tools/gyp/test/additional-targets/src/dir1/actions.gyp 2010-12-20 20:15:08.000000000 +0100
-@@ -47,7 +47,7 @@
- },
- ],
- 'conditions': [
-- ['OS=="linux"', {
-+ ['OS=="linux" or OS=="freebsd"', {
- 'target_defaults': {
- 'cflags': ['-fPIC'],
- },
diff --git a/www/chromium/files/patch-ui__base__l10n__l10n_util.cc b/www/chromium/files/patch-ui__base__l10n__l10n_util.cc
index e84c058f0e83..e3268b81d750 100644
--- a/www/chromium/files/patch-ui__base__l10n__l10n_util.cc
+++ b/www/chromium/files/patch-ui__base__l10n__l10n_util.cc
@@ -1,20 +1,20 @@
---- ui/base/l10n/l10n_util.cc.orig 2012-06-05 23:55:13.000000000 +0300
-+++ ui/base/l10n/l10n_util.cc 2012-06-06 00:00:11.000000000 +0300
+--- ui/base/l10n/l10n_util.cc.orig 2012-11-28 04:02:47.000000000 +0200
++++ ui/base/l10n/l10n_util.cc 2012-12-04 22:11:25.000000000 +0200
@@ -33,7 +33,7 @@
#include "base/android/locale_utils.h"
#endif
-#if defined(OS_LINUX)
-+#if defined(TOOLKIT_GTK)
++#if defined(OS_LINUX) || defined(OS_BSD)
#include <glib.h>
#endif
-@@ -417,7 +417,7 @@
+@@ -419,7 +419,7 @@
if (!pref_locale.empty())
candidates.push_back(pref_locale);
-#elif defined(OS_LINUX)
-+#elif defined(TOOLKIT_GTK)
++#elif defined(OS_LINUX) || defined(OS_BSD)
// If we're on a different Linux system, we have glib.
// GLib implements correct environment variable parsing with
diff --git a/www/chromium/files/patch-ui__base__x__x11_util.cc b/www/chromium/files/patch-ui__base__x__x11_util.cc
deleted file mode 100644
index 2d4868d87d3e..000000000000
--- a/www/chromium/files/patch-ui__base__x__x11_util.cc
+++ /dev/null
@@ -1,32 +0,0 @@
---- ui/base/x/x11_util.cc.orig 2011-10-12 12:02:46.000000000 +0300
-+++ ui/base/x/x11_util.cc 2011-10-16 17:17:46.000000000 +0300
-@@ -103,6 +103,12 @@
- static SharedMemorySupport DoQuerySharedMemorySupport(Display* dpy) {
- int dummy;
- Bool pixmaps_supported;
-+
-+#if defined(OS_FREEBSD)
-+ if (!CommandLine::ForCurrentProcess()->HasSwitch("enable-xshm"))
-+ return SHARED_MEMORY_NONE;
-+#endif
-+
- // Query the server's support for XSHM.
- if (!XShmQueryVersion(dpy, &dummy, &dummy, &pixmaps_supported))
- return SHARED_MEMORY_NONE;
-@@ -112,8 +118,6 @@
- if (shmkey == -1)
- return SHARED_MEMORY_NONE;
- void* address = shmat(shmkey, NULL, 0);
-- // Mark the shared memory region for deletion
-- shmctl(shmkey, IPC_RMID, NULL);
-
- XShmSegmentInfo shminfo;
- memset(&shminfo, 0, sizeof(shminfo));
-@@ -125,6 +129,7 @@
- if (gdk_error_trap_pop())
- result = false;
- shmdt(address);
-+ shmctl(shmkey, IPC_RMID, NULL);
- if (!result)
- return SHARED_MEMORY_NONE;
-
diff --git a/www/chromium/files/patch-ui__surface__surface.gyp b/www/chromium/files/patch-ui__surface__surface.gyp
deleted file mode 100644
index d34f5bfb8885..000000000000
--- a/www/chromium/files/patch-ui__surface__surface.gyp
+++ /dev/null
@@ -1,17 +0,0 @@
---- ui/surface/surface.gyp.orig 2011-09-09 21:37:36.000000000 +0300
-+++ ui/surface/surface.gyp 2011-09-09 21:45:23.000000000 +0300
-@@ -14,6 +14,14 @@
- '<(DEPTH)/third_party/angle/include',
- ],
- }],
-+ ['OS == "freebsd"', {
-+ 'sources!': [
-+ 'transport_dib_linux.cc',
-+ ],
-+ 'sources': [
-+ 'transport_dib_freebsd.cc',
-+ ],
-+ }],
- ],
- },
- 'targets': [
diff --git a/www/chromium/files/patch-ui__surface__transport_dib.h b/www/chromium/files/patch-ui__surface__transport_dib.h
deleted file mode 100644
index 5d13acbaf9a0..000000000000
--- a/www/chromium/files/patch-ui__surface__transport_dib.h
+++ /dev/null
@@ -1,44 +0,0 @@
---- ui/surface/transport_dib.h.orig 2011-11-01 10:43:23.000000000 +0200
-+++ ui/surface/transport_dib.h 2011-11-21 22:35:21.000000000 +0200
-@@ -9,7 +9,7 @@
- #include "base/basictypes.h"
- #include "ui/gfx/surface/surface_export.h"
-
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_FREEBSD)
- #include "base/shared_memory.h"
- #endif
-
-@@ -79,7 +79,7 @@
- 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;
-@@ -94,7 +94,7 @@
- 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
- struct Id {
- // Ensure that default initialized Ids are invalid.
-@@ -199,11 +199,12 @@
-
- private:
- TransportDIB();
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID) || defined(OS_FREEBSD)
- explicit TransportDIB(base::SharedMemoryHandle dib);
- base::SharedMemory shared_memory_;
- uint32 sequence_num_;
--#elif defined(USE_X11)
-+#endif
-+#if defined(USE_X11)
- Id key_; // SysV shared memory id
- void* address_; // mapped address
- XSharedMemoryId x_shm_; // X id for the shared segment
diff --git a/www/chromium/files/patch-ui__surface__transport_dib_freebsd.cc b/www/chromium/files/patch-ui__surface__transport_dib_freebsd.cc
deleted file mode 100644
index 1738a9601e3a..000000000000
--- a/www/chromium/files/patch-ui__surface__transport_dib_freebsd.cc
+++ /dev/null
@@ -1,110 +0,0 @@
---- /dev/null 2011-06-28 23:33:00.000000000 +0300
-+++ ui/surface/transport_dib_freebsd.cc 2011-06-28 23:30:26.428806593 +0300
-@@ -0,0 +1,107 @@
-+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "ui/surface/transport_dib.h"
-+
-+#include <unistd.h>
-+#include <sys/stat.h>
-+
-+#include "base/eintr_wrapper.h"
-+#include "base/logging.h"
-+#include "base/memory/scoped_ptr.h"
-+#include "base/shared_memory.h"
-+#include "skia/ext/platform_canvas.h"
-+
-+TransportDIB::TransportDIB()
-+ : size_(0) {
-+}
-+
-+TransportDIB::TransportDIB(TransportDIB::Handle dib)
-+ : shared_memory_(dib, false /* read write */),
-+ size_(0) {
-+}
-+
-+TransportDIB::~TransportDIB() {
-+}
-+
-+// static
-+TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) {
-+ TransportDIB* dib = new TransportDIB;
-+ if (!dib->shared_memory_.CreateAndMapAnonymous(size)) {
-+ delete dib;
-+ return NULL;
-+ }
-+
-+ dib->size_ = size;
-+ return dib;
-+}
-+
-+// static
-+TransportDIB* TransportDIB::Map(Handle handle) {
-+ scoped_ptr<TransportDIB> dib(CreateWithHandle(handle));
-+ if (!dib->Map())
-+ return NULL;
-+ return dib.release();
-+}
-+
-+// static
-+TransportDIB* TransportDIB::CreateWithHandle(Handle handle) {
-+ return new TransportDIB(handle);
-+}
-+
-+// static
-+bool TransportDIB::is_valid_handle(Handle dib) {
-+ return dib.fd >= 0;
-+}
-+
-+// static
-+bool TransportDIB::is_valid_id(Id id) {
-+ return id != 0;
-+}
-+
-+skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
-+ if (!memory() && !Map())
-+ return NULL;
-+ scoped_ptr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas);
-+ if (!canvas->initialize(w, h, true, reinterpret_cast<uint8_t*>(memory())))
-+ return NULL;
-+ return canvas.release();
-+}
-+
-+bool TransportDIB::Map() {
-+ if (!is_valid_handle(handle()))
-+ return false;
-+ if (memory())
-+ return true;
-+
-+ struct stat st;
-+ if ((fstat(shared_memory_.handle().fd, &st) != 0) ||
-+ (!shared_memory_.Map(st.st_size))) {
-+ return false;
-+ }
-+
-+ size_ = st.st_size;
-+ return true;
-+}
-+
-+void* TransportDIB::memory() const {
-+ return shared_memory_.memory();
-+}
-+
-+TransportDIB::Id TransportDIB::id() const {
-+ return shared_memory_.id();
-+}
-+
-+TransportDIB::Handle TransportDIB::handle() const {
-+ return shared_memory_.handle();
-+}
-+
-+XID TransportDIB::MapToX(Display* display) {
-+ if (!x_shm_) {
-+ x_shm_ = ui::AttachSharedMemory(display, key_);
-+ display_ = display;
-+ }
-+
-+ return x_shm_;
-+}
diff --git a/www/chromium/pkg-plist b/www/chromium/pkg-plist
index b8ad99bc1eed..25039705913c 100644
--- a/www/chromium/pkg-plist
+++ b/www/chromium/pkg-plist
@@ -66,6 +66,7 @@ bin/chrome
%%DATADIR%%/resources/inspector/auditsPanel.css
%%DATADIR%%/resources/inspector/AuditsPanel.js
%%DATADIR%%/resources/inspector/breadcrumbList.css
+%%DATADIR%%/resources/inspector/canvasProfiler.css
%%DATADIR%%/resources/inspector/cmdevtools.css
%%DATADIR%%/resources/inspector/codemirror.css
%%DATADIR%%/resources/inspector/CodeMirrorTextEditor.js
@@ -247,7 +248,6 @@ bin/chrome
%%DATADIR%%/resources/inspector/textPrompt.css
%%DATADIR%%/resources/inspector/timelinePanel.css
%%DATADIR%%/resources/inspector/TimelinePanel.js
-%%DATADIR%%/resources/inspector/webGLProfiler.css
%%DATADIR%%/xdg-settings
@dirrm %%DATADIR%%/locales
@dirrm %%DATADIR%%/resources/inspector/Images