summaryrefslogtreecommitdiffstats
path: root/mobile/android/chrome/content/PresentationView.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-23 15:32:23 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-23 15:32:23 -0400
commitabe80cc31d5a40ebed743085011fbcda0c1a9a10 (patch)
treefb3762f06b84745b182af281abb107b95a9fcf01 /mobile/android/chrome/content/PresentationView.js
parent63295d0087eb58a6eb34cad324c4c53d1b220491 (diff)
downloadUXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.gz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.lz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.xz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.zip
Issue #1053 - Drop support Android and remove Fennec - Part 1a: Remove mobile/android
Diffstat (limited to 'mobile/android/chrome/content/PresentationView.js')
-rw-r--r--mobile/android/chrome/content/PresentationView.js63
1 files changed, 0 insertions, 63 deletions
diff --git a/mobile/android/chrome/content/PresentationView.js b/mobile/android/chrome/content/PresentationView.js
deleted file mode 100644
index 4f7e02870..000000000
--- a/mobile/android/chrome/content/PresentationView.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/. */
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-const TOPIC_PRESENTATION_VIEW_READY = "presentation-view-ready";
-const TOPIC_PRESENTATION_RECEIVER_LAUNCH = "presentation-receiver:launch";
-const TOPIC_PRESENTATION_RECEIVER_LAUNCH_RESPONSE = "presentation-receiver:launch:response";
-
-// globals Services
-Cu.import("resource://gre/modules/Services.jsm");
-
-function log(str) {
- // dump("-*- PresentationView.js -*-: " + str + "\n");
-}
-
-let PresentationView = {
- _id: null,
-
- startup: function startup() {
- // use hash as the ID of this top level window
- this._id = window.location.hash.substr(1);
-
- // Listen "presentation-receiver:launch" sent from
- // PresentationRequestUIGlue.
- Services.obs.addObserver(this,TOPIC_PRESENTATION_RECEIVER_LAUNCH, false);
-
- // Notify PresentationView is ready.
- Services.obs.notifyObservers(null, TOPIC_PRESENTATION_VIEW_READY, this._id);
- },
-
- stop: function stop() {
- Services.obs.removeObserver(this, TOPIC_PRESENTATION_RECEIVER_LAUNCH);
- },
-
- observe: function observe(aSubject, aTopic, aData) {
- log("Got observe: aTopic=" + aTopic);
-
- let requestData = JSON.parse(aData);
- if (this._id != requestData.windowId) {
- return;
- }
-
- let browser = document.getElementById("content");
- browser.setAttribute("mozpresentation", requestData.url);
- try {
- browser.loadURI(requestData.url);
- Services.obs.notifyObservers(browser,
- TOPIC_PRESENTATION_RECEIVER_LAUNCH_RESPONSE,
- JSON.stringify({ result: "success",
- requestId: requestData.requestId }));
- } catch (e) {
- Services.obs.notifyObservers(null,
- TOPIC_PRESENTATION_RECEIVER_LAUNCH_RESPONSE,
- JSON.stringify({ result: "error",
- reason: e.message }));
- }
- }
-};