зеркало из https://github.com/mozilla/gecko-dev.git
Bug 837848 - Remove gecko property from handleGeckoMessage calls. r=mfinkle
This commit is contained in:
Родитель
6556e8e870
Коммит
0873d26649
|
@ -39,7 +39,7 @@ this.AccessFu = {
|
|||
try {
|
||||
Cc['@mozilla.org/android/bridge;1'].
|
||||
getService(Ci.nsIAndroidBridge).handleGeckoMessage(
|
||||
JSON.stringify({ gecko: { type: 'Accessibility:Ready' } }));
|
||||
JSON.stringify({ type: 'Accessibility:Ready' }));
|
||||
Services.obs.addObserver(this, 'Accessibility:Settings', false);
|
||||
} catch (x) {
|
||||
// Not on Android
|
||||
|
@ -348,7 +348,7 @@ var Output = {
|
|||
androidEvent.type = 'Accessibility:Event';
|
||||
if (androidEvent.bounds)
|
||||
androidEvent.bounds = this._adjustBounds(androidEvent.bounds, aBrowser);
|
||||
this._bridge.handleGeckoMessage(JSON.stringify({gecko: androidEvent}));
|
||||
this._bridge.handleGeckoMessage(JSON.stringify(androidEvent));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -508,7 +508,7 @@ var Input = {
|
|||
// Return focus to native Android browser chrome.
|
||||
Cc['@mozilla.org/android/bridge;1'].
|
||||
getService(Ci.nsIAndroidBridge).handleGeckoMessage(
|
||||
JSON.stringify({ gecko: { type: 'ToggleChrome:Focus' } }));
|
||||
JSON.stringify({ type: 'ToggleChrome:Focus' }));
|
||||
break;
|
||||
case aEvent.DOM_VK_RETURN:
|
||||
case aEvent.DOM_VK_ENTER:
|
||||
|
|
|
@ -125,11 +125,7 @@
|
|||
showCheckingMessage();
|
||||
|
||||
let bridge = Cc["@mozilla.org/android/bridge;1"].getService(Ci.nsIAndroidBridge);
|
||||
bridge.handleGeckoMessage(JSON.stringify({
|
||||
gecko: {
|
||||
type: "Update:Check",
|
||||
}
|
||||
}));
|
||||
bridge.handleGeckoMessage(JSON.stringify({ type: "Update:Check" }));
|
||||
}
|
||||
|
||||
let updateLink = document.getElementById("updateLink");
|
||||
|
|
|
@ -38,7 +38,7 @@ NSSDialogs.prototype = {
|
|||
buttons: aButtons,
|
||||
inputs: aInputs
|
||||
};
|
||||
let data = Cc["@mozilla.org/android/bridge;1"].getService(Ci.nsIAndroidBridge).handleGeckoMessage(JSON.stringify({ gecko: msg }));
|
||||
let data = Cc["@mozilla.org/android/bridge;1"].getService(Ci.nsIAndroidBridge).handleGeckoMessage(JSON.stringify(msg));
|
||||
return JSON.parse(data);
|
||||
},
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ LightweightThemeConsumer.prototype = {
|
|||
|
||||
let active = !!aData.headerURL;
|
||||
|
||||
let msg = active ? { gecko: { type: "LightweightTheme:Update", data: aData } } :
|
||||
{ gecko: { type: "LightweightTheme:Disable" } };
|
||||
let msg = active ? { type: "LightweightTheme:Update", data: aData } :
|
||||
{ type: "LightweightTheme:Disable" };
|
||||
let bridge = Cc["@mozilla.org/android/bridge;1"].getService(Ci.nsIAndroidBridge);
|
||||
bridge.handleGeckoMessage(JSON.stringify(msg));
|
||||
}
|
||||
|
|
|
@ -22,12 +22,10 @@ var windowListener = {
|
|||
if (domWindow) {
|
||||
domWindow.addEventListener("scroll", function(e) {
|
||||
let message = {
|
||||
gecko: {
|
||||
type: 'robocop:scroll',
|
||||
y: XPCNativeWrapper.unwrap(e.target).documentElement.scrollTop,
|
||||
height: XPCNativeWrapper.unwrap(e.target).documentElement.scrollHeight,
|
||||
cheight: XPCNativeWrapper.unwrap(e.target).documentElement.clientHeight,
|
||||
}
|
||||
type: 'robocop:scroll',
|
||||
y: XPCNativeWrapper.unwrap(e.target).documentElement.scrollTop,
|
||||
height: XPCNativeWrapper.unwrap(e.target).documentElement.scrollHeight,
|
||||
cheight: XPCNativeWrapper.unwrap(e.target).documentElement.clientHeight,
|
||||
};
|
||||
let retVal = _sendMessageToJava(message);
|
||||
});
|
||||
|
|
|
@ -242,11 +242,9 @@ function copyRawDataToClipboard(button) {
|
|||
#ifdef ANDROID
|
||||
// Present a toast notification.
|
||||
let message = {
|
||||
gecko: {
|
||||
type: "Toast:Show",
|
||||
message: stringBundle().GetStringFromName("rawDataCopied"),
|
||||
duration: "short"
|
||||
}
|
||||
type: "Toast:Show",
|
||||
message: stringBundle().GetStringFromName("rawDataCopied"),
|
||||
duration: "short"
|
||||
};
|
||||
Cc["@mozilla.org/android/bridge;1"].
|
||||
getService(Ci.nsIAndroidBridge).
|
||||
|
@ -300,11 +298,9 @@ function copyContentsToClipboard() {
|
|||
#ifdef ANDROID
|
||||
// Present a toast notification.
|
||||
let message = {
|
||||
gecko: {
|
||||
type: "Toast:Show",
|
||||
message: stringBundle().GetStringFromName("textCopied"),
|
||||
duration: "short"
|
||||
}
|
||||
type: "Toast:Show",
|
||||
message: stringBundle().GetStringFromName("textCopied"),
|
||||
duration: "short"
|
||||
};
|
||||
Cc["@mozilla.org/android/bridge;1"].
|
||||
getService(Ci.nsIAndroidBridge).
|
||||
|
|
Загрузка…
Ссылка в новой задаче