Bug 905668 - Add browser's Shumway extension to Android Nightly. r=mfinkle, r=gps
authorYury Delendik <ydelendik@mozilla.com>
Wed, 11 Dec 2013 09:13:30 -0600
changeset 160286 1029848aea9a6a6e80b80d38ee8dd5f50c73ba2d
parent 160285 f28c346633a6e6d55d9ab673779066ab01a0dfee
child 160287 3bd167b0f89a265ddde550034d36d7088d931f4c
push id37540
push userkwierso@gmail.com
push dateFri, 13 Dec 2013 03:23:05 +0000
treeherdermozilla-inbound@1bc33fa19b24 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, gps
bugs905668
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 905668 - Add browser's Shumway extension to Android Nightly. r=mfinkle, r=gps
mobile/android/app/mobile.js
mobile/android/chrome/content/browser.js
mobile/android/extensions/Makefile.in
mobile/android/extensions/moz.build
mobile/android/installer/package-manifest.in
mobile/android/moz.build
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -567,16 +567,21 @@ pref("dom.indexedDB.warningQuota", 5);
 // prevent video elements from preloading too much data
 pref("media.preload.default", 1); // default to preload none
 pref("media.preload.auto", 2);    // preload metadata if preload=auto
 
 // optimize images memory usage
 pref("image.mem.decodeondraw", true);
 pref("image.mem.min_discard_timeout_ms", 10000);
 
+#ifdef NIGHTLY_BUILD
+// Shumway component (SWF player) is disabled by default. Also see bug 904346.
+pref("shumway.disabled", true);
+#endif
+
 // enable touch events interfaces
 pref("dom.w3c_touch_events.enabled", 1);
 
 #ifdef MOZ_SAFE_BROWSING
 pref("browser.safebrowsing.enabled", true);
 pref("browser.safebrowsing.malware.enabled", true);
 pref("browser.safebrowsing.debug", false);
 
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -60,16 +60,21 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
                                   "resource://gre/modules/FormHistory.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
                                    "@mozilla.org/uuid-generator;1",
                                    "nsIUUIDGenerator");
 
+#ifdef NIGHTLY_BUILD
+XPCOMUtils.defineLazyModuleGetter(this, "ShumwayUtils",
+                                  "resource://shumway/ShumwayUtils.jsm");
+#endif
+
 // Lazily-loaded browser scripts:
 [
   ["SelectHelper", "chrome://browser/content/SelectHelper.js"],
   ["InputWidgetHelper", "chrome://browser/content/InputWidgetHelper.js"],
   ["AboutReader", "chrome://browser/content/aboutReader.js"],
   ["WebAppRT", "chrome://browser/content/WebAppRT.js"],
   ["MasterPassword", "chrome://browser/content/MasterPassword.js"],
   ["PluginHelper", "chrome://browser/content/PluginHelper.js"],
@@ -336,16 +341,19 @@ var BrowserApp = {
     Reader.init();
     UserAgentOverrides.init();
     DesktopUserAgent.init();
     Distribution.init();
     Tabs.init();
 #ifdef ACCESSIBILITY
     AccessFu.attach(window);
 #endif
+#ifdef NIGHTLY_BUILD
+    ShumwayUtils.init();
+#endif
 
     // Init LoginManager
     Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
 
     let url = null;
     let pinned = false;
     if ("arguments" in window) {
       if (window.arguments[0])
new file mode 100644
--- /dev/null
+++ b/mobile/android/extensions/Makefile.in
@@ -0,0 +1,27 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+
+include $(topsrcdir)/config/rules.mk
+
+SHUMWAY_BROWSER_EXTENSION = $(topsrcdir)/browser/extensions/shumway
+
+exclude_files = \
+  test \
+  $(NULL)
+
+ifdef NIGHTLY_BUILD
+$(FINAL_TARGET)/chrome/shumway.manifest: $(GLOBAL_DEPS)
+	$(call py_action,buildlist,$@ "manifest shumway/chrome.manifest")
+
+libs:: $(SHUMWAY_BROWSER_EXTENSION) $(GLOBAL_DEPS)
+	$(PYTHON) $(topsrcdir)/config/nsinstall.py \
+	  $(SHUMWAY_BROWSER_EXTENSION) \
+          $(foreach exclude,$(exclude_files), -X $(SHUMWAY_BROWSER_EXTENSION)/$(exclude)) \
+          $(FINAL_TARGET)/chrome
+
+libs:: $(FINAL_TARGET)/chrome/shumway.manifest
+	$(call py_action,buildlist,$(FINAL_TARGET)/chrome.manifest "manifest chrome/shumway.manifest")
+endif
+
+
new file mode 100644
--- /dev/null
+++ b/mobile/android/extensions/moz.build
@@ -0,0 +1,6 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -437,16 +437,20 @@
 ; GNOME hooks
 #ifdef MOZ_ENABLE_GNOME_COMPONENT
 @BINPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@
 #endif
 
 ; [Browser Chrome Files]
 @BINPATH@/chrome/browser@JAREXT@
 @BINPATH@/chrome/browser.manifest
+#ifdef NIGHTLY_BUILD
+@BINPATH@/chrome/shumway.manifest
+@BINPATH@/chrome/shumway/*
+#endif
 @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
 @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
 @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png
 @BINPATH@/chrome/toolkit@JAREXT@
 @BINPATH@/chrome/toolkit.manifest
 #ifdef XP_UNIX
 @BINPATH@/chrome/icons/default/default16.png
 @BINPATH@/chrome/icons/default/default32.png
--- a/mobile/android/moz.build
+++ b/mobile/android/moz.build
@@ -12,16 +12,17 @@ DIRS += [
     'base',
     'chrome',
     'components',
     'modules',
     'themes/core',
     'app',
     'fonts',
     'geckoview_library',
+    'extensions',
 ]
 
 if not CONFIG['LIBXUL_SDK']:
     PARALLEL_DIRS += ['../../xulrunner/tools/redit']
 
 TEST_DIRS += [
     'tests',
 ]