Merge fx-team to m-c. a=merge
@ -411,15 +411,13 @@ Toolbox.prototype = {
|
||||
|
||||
// Lazily connect to the profiler here and don't wait for it to complete,
|
||||
// used to intercept console.profile calls before the performance tools are open.
|
||||
let profilerReady = this.initPerformance();
|
||||
let performanceFrontConnection = this.initPerformance();
|
||||
|
||||
// However, while testing, we must wait for the performance connection to
|
||||
// finish, as most tests shut down without waiting for a toolbox
|
||||
// destruction event, resulting in the shared profiler connection being
|
||||
// opened and closed outside of the test that originally opened the
|
||||
// toolbox.
|
||||
// If in testing environment, wait for performance connection to finish,
|
||||
// so we don't have to explicitly wait for this in tests; ideally, all tests
|
||||
// will handle this on their own, but each have their own tear down function.
|
||||
if (DevToolsUtils.testing) {
|
||||
yield profilerReady;
|
||||
yield performanceFrontConnection;
|
||||
}
|
||||
|
||||
this.emit("ready");
|
||||
@ -1986,17 +1984,21 @@ Toolbox.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.performance) {
|
||||
yield this.performance.open();
|
||||
return this.performance;
|
||||
if (this._performanceFrontConnection) {
|
||||
return this._performanceFrontConnection.promise;
|
||||
}
|
||||
|
||||
this._performance = getPerformanceFront(this.target);
|
||||
this._performanceFrontConnection = promise.defer();
|
||||
|
||||
this._performance = getPerformanceFront(this._target);
|
||||
|
||||
yield this.performance.open();
|
||||
|
||||
// Emit an event when connected, but don't wait on startup for this.
|
||||
this.emit("profiler-connected");
|
||||
|
||||
return this.performance;
|
||||
this._performanceFrontConnection.resolve(this.performance);
|
||||
return this._performanceFrontConnection.promise;
|
||||
}),
|
||||
|
||||
/**
|
||||
@ -2008,6 +2010,11 @@ Toolbox.prototype = {
|
||||
if (!this.performance) {
|
||||
return;
|
||||
}
|
||||
// If still connecting to performance actor, allow the
|
||||
// actor to resolve its connection before attempting to destroy.
|
||||
if (this._performanceFrontConnection) {
|
||||
yield this._performanceFrontConnection.promise;
|
||||
}
|
||||
yield this.performance.destroy();
|
||||
this._performance = null;
|
||||
}),
|
||||
|
@ -222,6 +222,10 @@ function initPerformance(aUrl, tool="performance", targetOps={}) {
|
||||
merge(target, targetOps);
|
||||
|
||||
let toolbox = yield gDevTools.showToolbox(target, tool);
|
||||
|
||||
// Wait for the performance tool to be spun up
|
||||
yield toolbox.initPerformance();
|
||||
|
||||
let panel = toolbox.getCurrentPanel();
|
||||
return { target, panel, toolbox };
|
||||
});
|
||||
|
@ -26,6 +26,17 @@ this.ContentWebRTC = {
|
||||
Services.obs.addObserver(handlePCRequest, "PeerConnection:request", false);
|
||||
Services.obs.addObserver(updateIndicators, "recording-device-events", false);
|
||||
Services.obs.addObserver(removeBrowserSpecificIndicator, "recording-window-ended", false);
|
||||
|
||||
if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT)
|
||||
Services.obs.addObserver(processShutdown, "content-child-shutdown", false);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
Services.obs.removeObserver(handleRequest, "getUserMedia:request");
|
||||
Services.obs.removeObserver(updateIndicators, "recording-device-events");
|
||||
Services.obs.removeObserver(removeBrowserSpecificIndicator, "recording-window-ended");
|
||||
Services.obs.removeObserver(processShutdown, "content-child-shutdown");
|
||||
this._initialized = false;
|
||||
},
|
||||
|
||||
// Called only for 'unload' to remove pending gUM prompts in reloaded frames.
|
||||
@ -316,3 +327,7 @@ function getMessageManagerForWindow(aContentWindow) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function processShutdown() {
|
||||
ContentWebRTC.uninit();
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ this.webrtcUI = {
|
||||
.getService(Ci.nsIMessageBroadcaster);
|
||||
ppmm.addMessageListener("webrtc:UpdatingIndicators", this);
|
||||
ppmm.addMessageListener("webrtc:UpdateGlobalIndicators", this);
|
||||
ppmm.addMessageListener("child-process-shutdown", this);
|
||||
|
||||
let mm = Cc["@mozilla.org/globalmessagemanager;1"]
|
||||
.getService(Ci.nsIMessageListenerManager);
|
||||
@ -53,10 +54,47 @@ this.webrtcUI = {
|
||||
mm.removeMessageListener("webrtc:UpdateBrowserIndicators", this);
|
||||
},
|
||||
|
||||
showGlobalIndicator: false,
|
||||
showCameraIndicator: false,
|
||||
showMicrophoneIndicator: false,
|
||||
showScreenSharingIndicator: "", // either "Application", "Screen", "Window" or "Browser"
|
||||
processIndicators: new Map(),
|
||||
|
||||
get showGlobalIndicator() {
|
||||
for (let [, indicators] of this.processIndicators) {
|
||||
if (indicators.showGlobalIndicator)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
get showCameraIndicator() {
|
||||
for (let [, indicators] of this.processIndicators) {
|
||||
if (indicators.showCameraIndicator)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
get showMicrophoneIndicator() {
|
||||
for (let [, indicators] of this.processIndicators) {
|
||||
if (indicators.showMicrophoneIndicator)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
get showScreenSharingIndicator() {
|
||||
let list = [""];
|
||||
for (let [, indicators] of this.processIndicators) {
|
||||
if (indicators.showScreenSharingIndicator)
|
||||
list.push(indicators.showScreenSharingIndicator);
|
||||
}
|
||||
|
||||
let precedence =
|
||||
["Screen", "Window", "Application", "Browser", ""];
|
||||
|
||||
list.sort((a, b) => { return precedence.indexOf(a) -
|
||||
precedence.indexOf(b); });
|
||||
|
||||
return list[0];
|
||||
},
|
||||
|
||||
_streams: [],
|
||||
// The boolean parameters indicate which streams should be included in the result.
|
||||
@ -179,12 +217,16 @@ this.webrtcUI = {
|
||||
webrtcUI._streams = [];
|
||||
break;
|
||||
case "webrtc:UpdateGlobalIndicators":
|
||||
updateIndicators(aMessage.data)
|
||||
updateIndicators(aMessage.data, aMessage.target);
|
||||
break;
|
||||
case "webrtc:UpdateBrowserIndicators":
|
||||
webrtcUI._streams.push({browser: aMessage.target, state: aMessage.data});
|
||||
updateBrowserSpecificIndicator(aMessage.target, aMessage.data);
|
||||
break;
|
||||
case "child-process-shutdown":
|
||||
webrtcUI.processIndicators.delete(aMessage.target);
|
||||
updateIndicators(null, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -741,11 +783,22 @@ function maybeAddMenuIndicator(window) {
|
||||
|
||||
var gIndicatorWindow = null;
|
||||
|
||||
function updateIndicators(data) {
|
||||
webrtcUI.showGlobalIndicator = data.showGlobalIndicator;
|
||||
webrtcUI.showCameraIndicator = data.showCameraIndicator;
|
||||
webrtcUI.showMicrophoneIndicator = data.showMicrophoneIndicator;
|
||||
webrtcUI.showScreenSharingIndicator = data.showScreenSharingIndicator;
|
||||
function updateIndicators(data, target) {
|
||||
if (data) {
|
||||
// the global indicators specific to this process
|
||||
let indicators;
|
||||
if (webrtcUI.processIndicators.has(target)) {
|
||||
indicators = webrtcUI.processIndicators.get(target);
|
||||
} else {
|
||||
indicators = {};
|
||||
webrtcUI.processIndicators.set(target, indicators);
|
||||
}
|
||||
|
||||
indicators.showGlobalIndicator = data.showGlobalIndicator;
|
||||
indicators.showCameraIndicator = data.showCameraIndicator;
|
||||
indicators.showMicrophoneIndicator = data.showMicrophoneIndicator;
|
||||
indicators.showScreenSharingIndicator = data.showScreenSharingIndicator;
|
||||
}
|
||||
|
||||
let browserWindowEnum = Services.wm.getEnumerator("navigator:browser");
|
||||
while (browserWindowEnum.hasMoreElements()) {
|
||||
|
@ -11,8 +11,6 @@ ANDROID_EXTRA_JARS += \
|
||||
$(srcdir)/robotium-solo-4.3.1.jar \
|
||||
$(NULL)
|
||||
|
||||
ANDROID_ASSETS_DIR := $(TESTPATH)/assets
|
||||
|
||||
_JAVA_HARNESS := \
|
||||
Actions.java \
|
||||
Assert.java \
|
||||
|
@ -7,6 +7,9 @@
|
||||
DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
|
||||
|
||||
base = '/mobile/android/tests/browser/robocop/'
|
||||
|
||||
ANDROID_ASSETS_DIRS += [base + 'assets']
|
||||
|
||||
TEST_HARNESS_FILES.testing.mochitest += [
|
||||
base + 'robocop.ini',
|
||||
base + 'robocop_autophone.ini',
|
||||
|
@ -16,9 +16,9 @@ endif #} JAVAFILES
|
||||
|
||||
|
||||
ifdef ANDROID_APK_NAME #{
|
||||
android_res_dirs := $(addprefix $(srcdir)/,$(or $(ANDROID_RES_DIRS),res))
|
||||
android_res_dirs := $(or $(ANDROID_RES_DIRS),$(srcdir)/res)
|
||||
_ANDROID_RES_FLAG := $(addprefix -S ,$(android_res_dirs))
|
||||
_ANDROID_ASSETS_FLAG := $(addprefix -A ,$(ANDROID_ASSETS_DIR))
|
||||
_ANDROID_ASSETS_FLAG := $(if $(ANDROID_ASSETS_DIRS),$(addprefix -A ,$(ANDROID_ASSETS_DIRS)))
|
||||
android_manifest := $(or $(ANDROID_MANIFEST_FILE),AndroidManifest.xml)
|
||||
|
||||
GENERATED_DIRS += classes
|
||||
@ -45,7 +45,7 @@ $(ANDROID_APK_NAME).ap_: .aapt.deps ;
|
||||
# resource files one subdirectory below the parent resource directory.
|
||||
android_res_files := $(wildcard $(addsuffix /*,$(wildcard $(addsuffix /*,$(android_res_dirs)))))
|
||||
|
||||
.aapt.deps: $(android_manifest) $(android_res_files) $(wildcard $(ANDROID_ASSETS_DIR))
|
||||
.aapt.deps: $(android_manifest) $(android_res_files) $(wildcard $(ANDROID_ASSETS_DIRS))
|
||||
@$(TOUCH) $@
|
||||
$(AAPT) package -f -M $< -I $(ANDROID_SDK)/android.jar $(_ANDROID_RES_FLAG) $(_ANDROID_ASSETS_FLAG) \
|
||||
-J ${@D} \
|
||||
|
1
mobile/android/app/assets/example_asset.txt
Normal file
@ -0,0 +1 @@
|
||||
This is an example asset.
|
@ -420,6 +420,7 @@ $(1): $$(call mkdir_deps,$(filter-out ./,$(dir $(3) $(4) $(5)))) $(2)
|
||||
$(if $(MOZ_ANDROID_MAX_SDK_VERSION),--max-res-version $(MOZ_ANDROID_MAX_SDK_VERSION),) \
|
||||
--auto-add-overlay \
|
||||
$$(addprefix -S ,$$(ANDROID_RES_DIRS)) \
|
||||
$$(addprefix -A ,$$(ANDROID_ASSETS_DIRS)) \
|
||||
$(if $(extra_res_dirs),$$(addprefix -S ,$$(extra_res_dirs)),) \
|
||||
$(if $(extra_packages),--extra-packages $$(extra_packages),) \
|
||||
--custom-package org.mozilla.gecko \
|
||||
|
@ -579,7 +579,7 @@ gbjar.extra_jars += [
|
||||
]
|
||||
if CONFIG['MOZ_CRASHREPORTER']:
|
||||
gbjar.sources += [ 'CrashReporter.java' ]
|
||||
ANDROID_RES_DIRS += [ SRCDIR + '/crashreporter/res' ]
|
||||
ANDROID_RES_DIRS += [ 'crashreporter/res' ]
|
||||
|
||||
if CONFIG['MOZ_ANDROID_SHARE_OVERLAY']:
|
||||
gbjar.sources += [
|
||||
@ -754,9 +754,9 @@ if CONFIG['MOZ_INSTALL_TRACKING']:
|
||||
|
||||
# Putting branding earlier allows branders to override default resources.
|
||||
ANDROID_RES_DIRS += [
|
||||
TOPSRCDIR + '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res',
|
||||
SRCDIR + '/resources',
|
||||
OBJDIR + '/res',
|
||||
'/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res',
|
||||
'resources',
|
||||
'!res',
|
||||
]
|
||||
|
||||
ANDROID_GENERATED_RESFILES += [
|
||||
@ -764,6 +764,10 @@ ANDROID_GENERATED_RESFILES += [
|
||||
'res/values/strings.xml',
|
||||
]
|
||||
|
||||
ANDROID_ASSETS_DIRS += [
|
||||
'/mobile/android/app/assets',
|
||||
]
|
||||
|
||||
# We do not expose MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN here because that
|
||||
# would leak the value to build logs. Instead we expose the token quietly where
|
||||
# appropriate in Makefile.in.
|
||||
|
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 761 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 635 B |
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 888 B |
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 793 B |
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 770 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 709 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 508 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 819 B After Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 662 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 362 B |
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 878 B |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 816 B After Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 536 B |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 933 B |
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.1 KiB |