Bug 1307108 - Added system addon to enable async plugin rendering draft
authorKirk Steuber <ksteuber@mozilla.com>
Wed, 05 Oct 2016 15:34:23 -0700
changeset 421716 14866a98fc3ed7479021f8d8ef3f677238f96aeb
parent 421361 0c6c6bbf5fbe667f3c49ab39180cbda156d56c60
child 533148 78c9f44a8c4eb3d2e10059922be60195cc4bb5cf
push id31575
push userksteuber@mozilla.com
push dateThu, 06 Oct 2016 18:03:23 +0000
bugs1307108
milestone49.0.2
Bug 1307108 - Added system addon to enable async plugin rendering MozReview-Commit-ID: AuVg8xXokBm
browser/extensions/asyncrendering/bootstrap.js
browser/extensions/asyncrendering/install.rdf.in
browser/extensions/asyncrendering/moz.build
new file mode 100644
--- /dev/null
+++ b/browser/extensions/asyncrendering/bootstrap.js
@@ -0,0 +1,24 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* 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/. */
+
+const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+
+Cu.import("resource://gre/modules/Preferences.jsm");
+
+const PREF_ASYNC_DRAWING_ENABLED = "dom.ipc.plugins.asyncdrawing.enabled";
+
+function install() {
+}
+
+function uninstall() {
+}
+
+function startup() {
+  let defaults = new Preferences({defaultBranch: true})
+  defaults.set(PREF_ASYNC_DRAWING_ENABLED, true);
+}
+
+function shutdown(data, reason) {
+}
new file mode 100644
--- /dev/null
+++ b/browser/extensions/asyncrendering/install.rdf.in
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!-- 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/. -->
+
+#filter substitution
+
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>asyncrendering@mozilla.org</em:id>
+    <em:version>1.0</em:version>
+    <em:type>2</em:type>
+    <em:bootstrap>true</em:bootstrap>
+    <em:multiprocessCompatible>true</em:multiprocessCompatible>
+
+    <!-- Target Application this theme can install into,
+        with minimum and maximum supported versions. -->
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
+        <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:name>Asynchronous Plugin Rendering</em:name>
+    <em:description>Enables asynchronous drawing mode for plugins.</em:description>
+  </Description>
+</RDF>
new file mode 100644
--- /dev/null
+++ b/browser/extensions/asyncrendering/moz.build
@@ -0,0 +1,16 @@
+# -*- 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/.
+
+DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
+DEFINES['MOZ_APP_MAXVERSION'] = CONFIG['MOZ_APP_MAXVERSION']
+
+FINAL_TARGET_FILES.features['asyncrendering@mozilla.org'] += [
+  'bootstrap.js'
+]
+
+FINAL_TARGET_PP_FILES.features['asyncrendering@mozilla.org'] += [
+  'install.rdf.in'
+]