Merge mozilla-central to inbound. a=merge CLOSED TREE

This commit is contained in:
Narcis Beleuzu 2018-12-21 00:06:08 +02:00
Родитель e1fd96b2df 7cfde3000c
Коммит 2b363fce3a
146 изменённых файлов: 2587 добавлений и 2062 удалений

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist lastupdate="1544811398633" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<blocklist lastupdate="1545232187960" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
<prefs/>
@ -2420,6 +2420,10 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="53168513-103a-4ea0-a48f-bc291354cc9f" id="/^((\{4c4ceb83-f3f1-ad73-bfe0-259a371ed872\})|(\{a941b5ab-8894-41e1-a2ca-c5a6e2769c5f\})|(\{56488007-bd74-4702-9b6d-aee8f6cc05ea\})|(\{9eebac07-ac86-4be7-928f-e1015f858eee\})|(\{5a993517-5be7-480e-a86c-b8e8109fa774\})|(\{309ad78e-efff-43cf-910c-76361c536b20\})|(\{cefcf45b-dfec-4072-9ffc-317094c69c28\})|(\{5b04980b-25e9-4bc6-b6ea-02c58d86cc5e\})|(\{0021a844-360f-480e-ac53-47391b7b17b4\})|(\{2bed9f51-62a8-4471-b23c-827e6727c794\})|(\{7d2130d3-d724-4f58-b6b7-8537a9e09d4c\})|(\{ccd3847a-e5ec-4d28-bf98-340230dcbd4d\})|(\{83716b9b-6e6e-4471-af76-2d846f5804f3\})|(\{5154c03a-4bfc-4b13-86a9-0581a7d8c26d\})|(\{24f51c5c-e3f5-4667-bd6c-0be4f6ef5cc2\})|(\{73554774-4390-4b00-a5b9-84e8e06d6f3c\})|(\{c70cfd12-6dc3-4021-97f2-68057b3b759b\})|(\{ef5fe17b-eb6a-4e5e-9c18-9d423525bbbd\})|(\{461eb9b4-953c-4412-998e-9452a7cb42e0\})|(\{966b00fe-40b0-4d4b-8fde-6deca31c577b\})|(\{dab908ac-e1b0-4d7e-bc2e-86a15f37621f\})|(\{01a067d3-7bfa-44ac-8da7-2474a0114a7e\})|(\{6126261f-d025-4254-a1db-068a48113b11\})|(\{6c80453f-05ec-4243-bb71-e1aac5e59cae\})|(\{f94ec34b-5590-4518-8546-c1c3a94a5731\})|(\{5d4c049e-7433-485a-ac62-dd6e41af1a73\})|(\{507f643d-6db8-47fe-af9c-7a7b85a86d83\})|(\{5c56eeb4-f97c-4b0d-a72f-8e639fbaf295\})|(\{2ef98f55-1e26-40d3-a113-a004618a772e\})|(\{77d58874-d516-4b00-b68a-2d987ef83ec5\})|(\{7a0755d3-3ba2-4b19-98ce-efcdc36423fc\})|(\{47ee3ba1-8974-4f71-b8a4-8033d8c2155f\})|(\{a477f774-bc36-4cc8-85bd-99f6b04ea255\})|(\{1a2e41e3-4343-4a00-90cd-ce77ac77a8af\})|(\{7b180e9a-afd6-4693-94a1-c7b5ed9b46fa\})|(\{51f76862-f222-414d-8724-6063f61bbabf\})|(\{d47a0c63-ac4c-48ce-8fc7-c5abc81d7f75\})|(\{b8adf653-f262-413c-b955-100213b105ad\})|(\{ccedf35b-dfd6-417a-80de-fb432948861d\})|(\{70e29b0e-7cd8-40df-b560-cf6eb066350d\})|(\{9926f8ad-b4c3-4122-a033-1b8a5db416db\})|(\{62eefb1c-a2d8-40ba-ab94-9fc2f2d31b2f\})|(\{17f14919-00bd-44a4-8c14-78ab9728038f\})|(\{20e36a3e-672c-4448-9efb-5750cbffe90c\})|(\{6070c95f-6460-4ffd-9846-2bbd7238697f\})|(\{1edb8a4e-f105-4623-9e19-e40fb082b132\})|(\{223a1503-772d-45eb-8cb8-e2e49563703d\})|(\{59e0f01c-1f70-445c-a572-7be5d85549bd\})|(\{8ec160b7-1089-4944-a999-a1d6afa71c5d\})|(\{d2d111d6-0ea1-4880-ae7b-2e82dff3a719\})|(\{cfacacd6-191c-46c4-b78c-8a48289b2829\})|(\{1155e72f-2b21-433f-ba9a-5af6ed40c8ee\})|(\{583910bd-759f-40f6-b96a-1d678d65650f\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p332">

Просмотреть файл

@ -1168,6 +1168,8 @@ pref("services.sync.prefs.sync.addons.ignoreUserEnabledChanges", true);
// could weaken the pref locally, install an add-on from an untrusted
// source, and this would propagate automatically to other,
// uncompromised Sync-connected devices.
pref("services.sync.prefs.sync.browser.contentblocking.category", true);
pref("services.sync.prefs.sync.browser.contentblocking.introCount", true);
pref("services.sync.prefs.sync.browser.ctrlTab.recentlyUsedOrder", true);
pref("services.sync.prefs.sync.browser.download.useDownloadDir", true);
pref("services.sync.prefs.sync.browser.formfill.enable", true);

Просмотреть файл

@ -3,8 +3,11 @@ tags = trackingprotection
support-files =
head.js
benignPage.html
containerPage.html
cookiePage.html
cookieSetterPage.html
cookieServer.sjs
embeddedPage.html
trackingAPI.js
trackingPage.html

Просмотреть файл

@ -6,6 +6,7 @@
"use strict";
const COOKIE_PAGE = "http://not-tracking.example.com/browser/browser/base/content/test/trackingUI/cookiePage.html";
const CONTAINER_PAGE = "http://not-tracking.example.com/browser/browser/base/content/test/trackingUI/containerPage.html";
const TPC_PREF = "network.cookie.cookieBehavior";
@ -242,3 +243,35 @@ add_task(async function testCookiesSubViewAllowedHeuristic() {
Services.prefs.clearUserPref(TPC_PREF);
});
add_task(async function testCookiesSubViewBlockedDoublyNested() {
Services.prefs.setIntPref(TPC_PREF, Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER);
await BrowserTestUtils.withNewTab(CONTAINER_PAGE, async function(browser) {
await openIdentityPopup();
let categoryItem =
document.getElementById("identity-popup-content-blocking-category-cookies");
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
let cookiesView = document.getElementById("identity-popup-cookiesView");
let viewShown = BrowserTestUtils.waitForEvent(cookiesView, "ViewShown");
categoryItem.click();
await viewShown;
ok(true, "Cookies view was shown");
let listItems = cookiesView.querySelectorAll(".identity-popup-content-blocking-list-item");
is(listItems.length, 1, "We have 1 cookie in the list");
let listItem = listItems[0];
let label = listItem.querySelector(".identity-popup-content-blocking-list-host-label");
is(label.value, "http://trackertest.org", "Has an item for trackertest.org");
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
ok(!listItem.classList.contains("allowed"), "Indicates whether the cookie was blocked or allowed");
let button = listItem.querySelector(".identity-popup-permission-remove-button");
ok(!button, "Permission remove button doesn't exist");
});
Services.prefs.clearUserPref(TPC_PREF);
});

Просмотреть файл

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<body>
<iframe src="http://not-tracking.example.com/browser/browser/base/content/test/trackingUI/embeddedPage.html"></iframe>
</body>
</html>

Просмотреть файл

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<body>
<script> document.cookie = "foo=bar"; </script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<body>
<iframe src="http://trackertest.org/browser/browser/base/content/test/trackingUI/cookieSetterPage.html"></iframe>
</body>
</html>

Просмотреть файл

@ -5,7 +5,7 @@ prefs =
dom.payments.request.enabled=true
extensions.formautofill.creditCards.available=true
extensions.formautofill.reauth.enabled=true
skip-if = !e10s # Bug 1365964 - Payment Request isn't implemented for non-e10s
skip-if = true || !e10s # Bug 1515048 - Disable for now. Bug 1365964 - Payment Request isn't implemented for non-e10s
support-files =
blank_page.html

Просмотреть файл

@ -10,7 +10,7 @@ support-files =
../../res/paymentRequest.xhtml
../../res/**
payments_common.js
skip-if = !e10s
skip-if = true || !e10s # Bug 1515048 - Disable for now. Bug 1365964 - Payment Request isn't implemented for non-e10s.
[test_accepted_cards.html]
[test_address_form.html]

Просмотреть файл

@ -1,5 +1,6 @@
[DEFAULT]
firefox-appdir = browser
head = head.js
skip-if = true # Bug 1515048 - Disable for now.
[test_response_creation.js]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,15 @@
<!-- 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/. -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">resource://search-plugins/images/google.ico</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://www.google.com/complete/search?client=firefox&amp;q={searchTerms}"/>
<Url type="text/html" method="GET" template="https://www.google.com/search" rel="searchform">
<Param name="client" value="firefox-b-1-d"/>
<Param name="q" value="{searchTerms}"/>
</Url>
</SearchPlugin>

Просмотреть файл

@ -0,0 +1,15 @@
<!-- 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/. -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">resource://search-plugins/images/google.ico</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://www.google.com/complete/search?client=firefox&amp;q={searchTerms}"/>
<Url type="text/html" method="GET" template="https://www.google.com/search" rel="searchform">
<Param name="client" value="firefox-b-1-e"/>
<Param name="q" value="{searchTerms}"/>
</Url>
</SearchPlugin>

Просмотреть файл

@ -0,0 +1,15 @@
<!-- 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/. -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">resource://search-plugins/images/google.ico</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://www.google.com/complete/search?client=firefox&amp;q={searchTerms}"/>
<Url type="text/html" method="GET" template="https://www.google.com/search" rel="searchform">
<Param name="client" value="firefox-b-d"/>
<Param name="q" value="{searchTerms}"/>
</Url>
</SearchPlugin>

Просмотреть файл

@ -0,0 +1,15 @@
<!-- 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/. -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">resource://search-plugins/images/google.ico</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://www.google.com/complete/search?client=firefox&amp;q={searchTerms}"/>
<Url type="text/html" method="GET" template="https://www.google.com/search" rel="searchform">
<Param name="client" value="firefox-b-e"/>
<Param name="q" value="{searchTerms}"/>
</Url>
</SearchPlugin>

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Двоичные данные
browser/components/search/searchplugins/images/google.ico Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.3 KiB

Просмотреть файл

@ -3,12 +3,12 @@
"searchDefault": "Google",
"searchOrder": ["Google", "Bing"],
"visibleDefaultEngines": [
"google", "amazondotcom", "bing", "ddg", "ebay", "twitter", "wikipedia"
"google-b-d", "amazondotcom", "bing", "ddg", "ebay", "twitter", "wikipedia"
]
},
"regionOverrides": {
"US": {
"google": "google-2018"
"google-b-d": "google-b-1-d"
},
"CA": {
"ebay": "ebay-ca",
@ -54,68 +54,68 @@
"en-US": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "bing", "ddg", "ebay", "twitter", "wikipedia"
"google-b-d", "amazondotcom", "bing", "ddg", "ebay", "twitter", "wikipedia"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"amazon-ca", "amazon-au", "google-2018", "yandex-en"
"amazon-ca", "amazon-au", "google-2018", "yandex-en", "google", "google-b-1-e", "google-b-e"
]
}
},
"ach": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia"
]
}
},
"af": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "wikipedia-af"
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-af"
]
}
},
"an": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ebay-es", "wikipedia-an", "ddg", "twitter"
"google-b-d", "bing", "ebay-es", "wikipedia-an", "ddg", "twitter"
]
}
},
"ar": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "wikipedia-ar"
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-ar"
]
}
},
"as": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-in", "ddg", "wikipedia-as"
"google-b-d", "amazon-in", "ddg", "wikipedia-as"
]
}
},
"ast": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "diccionariu-alla", "ddg", "ebay-es", "wikipedia-ast"
"google-b-d", "bing", "diccionariu-alla", "ddg", "ebay-es", "wikipedia-ast"
]
}
},
"az": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "azerdict", "bing", "ddg", "wikipedia-az", "yandex-az"
"google-b-d", "amazondotcom", "azerdict", "bing", "ddg", "wikipedia-az", "yandex-az"
]
}
},
"be": {
"default": {
"visibleDefaultEngines": [
"yandex-by", "google", "ddg", "wikipedia-be", "wikipedia-be-tarask"
"yandex-by", "google-b-d", "ddg", "wikipedia-be", "wikipedia-be-tarask"
]
},
"BY": {
@ -134,56 +134,56 @@
"bg": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "ddg", "pazaruvaj", "portalbgdict", "wikipedia-bg"
"google-b-d", "amazondotcom", "ddg", "pazaruvaj", "portalbgdict", "wikipedia-bg"
]
}
},
"bn-BD": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "wikipedia-bn"
"google-b-d", "bing", "ddg", "wikipedia-bn"
]
}
},
"bn-IN": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-in", "bing", "ddg", "rediff", "wikipedia-bn"
"google-b-d", "amazon-in", "bing", "ddg", "rediff", "wikipedia-bn"
]
}
},
"br": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-france", "ddg", "ebay-fr", "freelang", "klask", "wikipedia-br"
"google-b-d", "amazon-france", "ddg", "ebay-fr", "freelang", "klask", "wikipedia-br"
]
}
},
"bs": {
"default": {
"visibleDefaultEngines": [
"google", "ddg", "olx", "twitter", "wikipedia-bs"
"google-b-d", "ddg", "olx", "twitter", "wikipedia-bs"
]
}
},
"ca": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "diec2", "ddg", "ebay-es", "twitter", "wikipedia-ca"
"google-b-d", "bing", "diec2", "ddg", "ebay-es", "twitter", "wikipedia-ca"
]
}
},
"cak": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "wikipedia-es"
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-es"
]
}
},
"crh": {
"default": {
"visibleDefaultEngines": [
"google", "ddg", "twitter", "wikipedia-crh"
"google-b-d", "ddg", "twitter", "wikipedia-crh"
]
}
},
@ -191,56 +191,56 @@
"default": {
"searchOrder": ["Google", "Seznam"],
"visibleDefaultEngines": [
"google", "seznam-cz", "ddg", "heureka-cz", "mapy-cz", "wikipedia-cz"
"google-b-d", "seznam-cz", "ddg", "heureka-cz", "mapy-cz", "wikipedia-cz"
]
}
},
"cy": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "ddg", "ebay-uk", "palasprint", "termau", "wikipedia-cy"
"google-b-d", "amazon-en-GB", "ddg", "ebay-uk", "palasprint", "termau", "wikipedia-cy"
]
}
},
"da": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-en-GB", "ddg", "wikipedia-da"
"google-b-d", "bing", "amazon-en-GB", "ddg", "wikipedia-da"
]
}
},
"de": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom-de", "bing", "ddg", "ebay-de", "ecosia", "leo_ende_de", "wikipedia-de"
"google-b-d", "amazondotcom-de", "bing", "ddg", "ebay-de", "ecosia", "leo_ende_de", "wikipedia-de"
]
}
},
"dsb": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom-de", "ddg", "ebay-de", "leo_ende_de", "wikipedia-dsb"
"google-b-d", "bing", "amazondotcom-de", "ddg", "ebay-de", "leo_ende_de", "wikipedia-dsb"
]
}
},
"el": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "bing", "ddg", "wikipedia-el"
"google-b-d", "amazon-en-GB", "bing", "ddg", "wikipedia-el"
]
}
},
"en-CA": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-ca", "bing", "ddg", "ebay-ca", "twitter", "wikipedia"
"google-b-d", "amazon-ca", "bing", "ddg", "ebay-ca", "twitter", "wikipedia"
]
}
},
"en-GB": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-en-GB", "chambers-en-GB", "ddg", "ebay-uk", "twitter", "wikipedia"
"google-b-d", "bing", "amazon-en-GB", "chambers-en-GB", "ddg", "ebay-uk", "twitter", "wikipedia"
]
},
"experimental-hidden": {
@ -252,42 +252,42 @@
"en-ZA": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia"
]
}
},
"eo": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "reta-vortaro", "wikipedia-eo"
"google-b-d", "bing", "amazondotcom", "ddg", "reta-vortaro", "wikipedia-eo"
]
}
},
"es-AR": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "drae", "ddg", "mercadolibre-ar", "wikipedia-es"
"google-b-d", "amazondotcom", "drae", "ddg", "mercadolibre-ar", "wikipedia-es"
]
}
},
"es-CL": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "drae", "ddg", "mercadolibre-cl", "wikipedia-es"
"google-b-d", "bing", "drae", "ddg", "mercadolibre-cl", "wikipedia-es"
]
}
},
"es-ES": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "drae", "ddg", "ebay-es", "twitter", "wikipedia-es"
"google-b-d", "bing", "drae", "ddg", "ebay-es", "twitter", "wikipedia-es"
]
}
},
"es-MX": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "mercadolibre-mx", "wikipedia-es"
"google-b-d", "bing", "ddg", "mercadolibre-mx", "wikipedia-es"
]
},
"experimental-hidden": {
@ -299,49 +299,49 @@
"et": {
"default": {
"visibleDefaultEngines": [
"google", "neti-ee", "ddg", "osta-ee", "wikipedia-et", "eki-ee"
"google-b-d", "neti-ee", "ddg", "osta-ee", "wikipedia-et", "eki-ee"
]
}
},
"eu": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-en-GB", "ddg", "ebay-es", "elebila", "wikipedia-eu"
"google-b-d", "bing", "amazon-en-GB", "ddg", "ebay-es", "elebila", "wikipedia-eu"
]
}
},
"fa": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "bing", "ddg", "wikipedia-fa"
"google-b-d", "amazondotcom", "bing", "ddg", "wikipedia-fa"
]
}
},
"ff": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-france", "ddg", "cnrtl-tlfi-fr", "wikipedia-fr"
"google-b-d", "bing", "amazon-france", "ddg", "cnrtl-tlfi-fr", "wikipedia-fr"
]
}
},
"fi": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "bookplus-fi", "ddg", "wikipedia-fi"
"google-b-d", "bing", "bookplus-fi", "ddg", "wikipedia-fi"
]
}
},
"fr": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-france", "ddg", "ebay-fr", "cnrtl-tlfi-fr", "qwant", "wikipedia-fr"
"google-b-d", "bing", "amazon-france", "ddg", "ebay-fr", "cnrtl-tlfi-fr", "qwant", "wikipedia-fr"
]
}
},
"fy-NL": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "bolcom-fy-NL", "ddg", "ebay-nl", "marktplaats-fy-NL", "wikipedia-fy-NL"
"google-b-d", "bing", "bolcom-fy-NL", "ddg", "ebay-nl", "marktplaats-fy-NL", "wikipedia-fy-NL"
]
},
"experimental-hidden": {
@ -353,105 +353,105 @@
"ga-IE": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "ddg", "ebay-ie", "tearma", "twitter", "wikipedia-ga-IE"
"google-b-d", "amazon-en-GB", "ddg", "ebay-ie", "tearma", "twitter", "wikipedia-ga-IE"
]
}
},
"gd": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "bbc-alba", "ddg", "ebay-uk", "faclair-beag", "wikipedia-gd"
"google-b-d", "amazon-en-GB", "bbc-alba", "ddg", "ebay-uk", "faclair-beag", "wikipedia-gd"
]
}
},
"gl": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "ddg", "ebay-es", "wikipedia-gl"
"google-b-d", "amazon-en-GB", "ddg", "ebay-es", "wikipedia-gl"
]
}
},
"gn": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-gn"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-gn"
]
}
},
"gu-IN": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-in", "ddg", "gujaratilexicon", "wikipedia-gu"
"google-b-d", "bing", "amazon-in", "ddg", "gujaratilexicon", "wikipedia-gu"
]
}
},
"he": {
"default": {
"visibleDefaultEngines": [
"google", "ddg", "wikipedia-he", "morfix-dic"
"google-b-d", "ddg", "wikipedia-he", "morfix-dic"
]
}
},
"hi-IN": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "wikipedia-hi"
"google-b-d", "bing", "ddg", "wikipedia-hi"
]
}
},
"hr": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "bing", "ddg", "eudict", "twitter", "wikipedia-hr"
"google-b-d", "amazon-en-GB", "bing", "ddg", "eudict", "twitter", "wikipedia-hr"
]
}
},
"hsb": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom-de", "ddg", "ebay-de", "leo_ende_de", "wikipedia-hsb"
"google-b-d", "bing", "amazondotcom-de", "ddg", "ebay-de", "leo_ende_de", "wikipedia-hsb"
]
}
},
"hu": {
"default": {
"visibleDefaultEngines": [
"google", "ddg", "sztaki-en-hu", "vatera", "wikipedia-hu"
"google-b-d", "ddg", "sztaki-en-hu", "vatera", "wikipedia-hu"
]
}
},
"hy-AM": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "ddg", "list-am", "wikipedia-hy"
"google-b-d", "amazondotcom", "ddg", "list-am", "wikipedia-hy"
]
}
},
"ia": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-ia"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-ia"
]
}
},
"id": {
"default": {
"visibleDefaultEngines": [
"google", "ddg", "wikipedia-id"
"google-b-d", "ddg", "wikipedia-id"
]
}
},
"is": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "leit-is", "wikipedia-is"
"google-b-d", "bing", "amazondotcom", "ddg", "leit-is", "wikipedia-is"
]
}
},
"it": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-it", "ddg", "ebay-it", "hoepli", "wikipedia-it"
"google-b-d", "bing", "amazon-it", "ddg", "ebay-it", "hoepli", "wikipedia-it"
]
}
},
@ -459,7 +459,7 @@
"default": {
"searchOrder": ["Google", "Yahoo! JAPAN", "Bing", "Amazon.co.jp", "楽天市場", "ヤフオク!", "教えてgoo", "Twitter", "Wikipedia (ja)"],
"visibleDefaultEngines": [
"google", "yahoo-jp", "bing", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "twitter-ja", "wikipedia-ja", "ddg"
"google-b-d", "yahoo-jp", "bing", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "twitter-ja", "wikipedia-ja", "ddg"
]
}
},
@ -467,28 +467,28 @@
"default": {
"searchOrder": ["Google", "Yahoo! JAPAN", "Bing", "Amazon.co.jp", "楽天市場", "ヤフオク!", "教えてgoo", "Twitter", "Wikipedia (ja)"],
"visibleDefaultEngines": [
"google", "yahoo-jp", "bing", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "twitter-ja", "wikipedia-ja", "ddg"
"google-b-d", "yahoo-jp", "bing", "amazon-jp", "rakuten", "yahoo-jp-auctions", "oshiete-goo", "twitter-ja", "wikipedia-ja", "ddg"
]
}
},
"ka": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-ka"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-ka"
]
}
},
"kab": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "wikipedia-kab"
"google-b-d", "bing", "ddg", "wikipedia-kab"
]
}
},
"kk": {
"default": {
"visibleDefaultEngines": [
"yandex-kk", "google", "ddg", "flip", "kaz-kk", "twitter", "wikipedia-kk"
"yandex-kk", "google-b-d", "ddg", "flip", "kaz-kk", "twitter", "wikipedia-kk"
]
},
"KZ": {
@ -507,119 +507,119 @@
"km": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-km"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-km"
]
}
},
"kn": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-in", "ddg", "kannadastore", "wikipedia-kn"
"google-b-d", "bing", "amazon-in", "ddg", "kannadastore", "wikipedia-kn"
]
}
},
"ko": {
"default": {
"visibleDefaultEngines": [
"google", "ddg", "naver-kr", "danawa-kr", "daum-kr", "wikipedia-kr"
"google-b-d", "ddg", "naver-kr", "danawa-kr", "daum-kr", "wikipedia-kr"
]
}
},
"lij": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-it", "ddg", "ebay-it", "paroledigenova-lij", "wikipedia-lij"
"google-b-d", "bing", "amazon-it", "ddg", "ebay-it", "paroledigenova-lij", "wikipedia-lij"
]
}
},
"lo": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "wikipedia-lo", "twitter"
"google-b-d", "bing", "ddg", "wikipedia-lo", "twitter"
]
}
},
"lt": {
"default": {
"visibleDefaultEngines": [
"google", "wikipedia-lt", "bing", "amazondotcom", "ddg", "twitter"
"google-b-d", "wikipedia-lt", "bing", "amazondotcom", "ddg", "twitter"
]
}
},
"ltg": {
"default": {
"visibleDefaultEngines": [
"google", "dict-enlv", "ddg", "salidzinilv", "sslv", "wikipedia-ltg"
"google-b-d", "dict-enlv", "ddg", "salidzinilv", "sslv", "wikipedia-ltg"
]
}
},
"lv": {
"default": {
"visibleDefaultEngines": [
"google", "dict-enlv", "ddg", "salidzinilv", "sslv", "wikipedia-lv"
"google-b-d", "dict-enlv", "ddg", "salidzinilv", "sslv", "wikipedia-lv"
]
}
},
"mai": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-in", "ddg", "twitter", "wikipedia-hi"
"google-b-d", "bing", "amazon-in", "ddg", "twitter", "wikipedia-hi"
]
}
},
"mk": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "wikipedia-mk"
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-mk"
]
}
},
"ml": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-in", "ddg", "rediff", "webdunia", "wikipedia", "wikipedia-ml"
"google-b-d", "bing", "amazon-in", "ddg", "rediff", "webdunia", "wikipedia", "wikipedia-ml"
]
}
},
"mr": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-in", "ddg", "rediff", "wikipedia-mr"
"google-b-d", "amazon-in", "ddg", "rediff", "wikipedia-mr"
]
}
},
"ms": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-ms"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-ms"
]
}
},
"my": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-my"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-my"
]
}
},
"nb-NO": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "bing", "ddg", "gulesider-NO", "bok-NO", "qxl-NO", "wikipedia-NO"
"google-b-d", "amazon-en-GB", "bing", "ddg", "gulesider-NO", "bok-NO", "qxl-NO", "wikipedia-NO"
]
}
},
"ne-NP": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "twitter", "wikipedia-ne"
"google-b-d", "bing", "ddg", "twitter", "wikipedia-ne"
]
}
},
"nl": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "bolcom-nl", "ddg", "ebay-nl", "marktplaats-nl", "wikipedia-nl"
"google-b-d", "bing", "bolcom-nl", "ddg", "ebay-nl", "marktplaats-nl", "wikipedia-nl"
]
},
"experimental-hidden": {
@ -631,42 +631,42 @@
"nn-NO": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-en-GB", "ddg", "gulesider-NO", "bok-NO", "qxl-NO", "wikipedia-NN"
"google-b-d", "bing", "amazon-en-GB", "ddg", "gulesider-NO", "bok-NO", "qxl-NO", "wikipedia-NN"
]
}
},
"oc": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "twitter", "wikipedia-oc", "wiktionary-oc"
"google-b-d", "bing", "ddg", "twitter", "wikipedia-oc", "wiktionary-oc"
]
}
},
"or": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-in", "ddg", "wikipedia-or"
"google-b-d", "bing", "amazon-in", "ddg", "wikipedia-or"
]
}
},
"pa-IN": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-in", "ddg", "wikipedia-pa"
"google-b-d", "bing", "amazon-in", "ddg", "wikipedia-pa"
]
}
},
"pl": {
"default": {
"visibleDefaultEngines": [
"google", "allegro-pl", "ddg", "pwn-pl", "wikipedia-pl", "wolnelektury-pl"
"google-b-d", "allegro-pl", "ddg", "pwn-pl", "wikipedia-pl", "wolnelektury-pl"
]
}
},
"pt-BR": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "buscape", "ddg", "mercadolivre", "twitter", "wikipedia-pt"
"google-b-d", "bing", "buscape", "ddg", "mercadolivre", "twitter", "wikipedia-pt"
]
},
"experimental-hidden": {
@ -678,28 +678,28 @@
"pt-PT": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "ddg", "priberam", "sapo", "wikipedia-pt"
"google-b-d", "amazon-en-GB", "ddg", "priberam", "sapo", "wikipedia-pt"
]
}
},
"rm": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "ebay-ch", "leo_ende_de-rm", "pledarigrond", "wikipedia-rm"
"google-b-d", "bing", "ddg", "ebay-ch", "leo_ende_de-rm", "pledarigrond", "wikipedia-rm"
]
}
},
"ro": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "wikipedia-ro"
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-ro"
]
}
},
"ru": {
"default": {
"visibleDefaultEngines": [
"yandex-ru", "google", "ddg", "ozonru", "priceru", "wikipedia-ru", "mailru"
"yandex-ru", "google-b-d", "ddg", "ozonru", "priceru", "wikipedia-ru", "mailru"
]
},
"RU": {
@ -718,84 +718,84 @@
"si": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "ddg", "wikipedia-si"
"google-b-d", "amazondotcom", "ddg", "wikipedia-si"
]
}
},
"sk": {
"default": {
"visibleDefaultEngines": [
"google", "azet-sk", "atlas-sk", "ddg", "slovnik-sk", "wikipedia-sk", "zoznam-sk"
"google-b-d", "azet-sk", "atlas-sk", "ddg", "slovnik-sk", "wikipedia-sk", "zoznam-sk"
]
}
},
"sl": {
"default": {
"visibleDefaultEngines": [
"google", "ceneji", "ddg", "najdi-si", "odpiralni", "twitter", "wikipedia-sl"
"google-b-d", "ceneji", "ddg", "najdi-si", "odpiralni", "twitter", "wikipedia-sl"
]
}
},
"son": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-france", "ddg", "cnrtl-tlfi-fr", "wikipedia-fr"
"google-b-d", "bing", "amazon-france", "ddg", "cnrtl-tlfi-fr", "wikipedia-fr"
]
}
},
"sq": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-en-GB", "ddg", "wikipedia-sq"
"google-b-d", "bing", "amazon-en-GB", "ddg", "wikipedia-sq"
]
}
},
"sr": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-en-GB", "bing", "ddg", "wikipedia-sr", "pogodak"
"google-b-d", "amazon-en-GB", "bing", "ddg", "wikipedia-sr", "pogodak"
]
}
},
"sv-SE": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "allaannonser-sv-SE", "ddg", "prisjakt-sv-SE", "tyda-sv-SE", "wikipedia-sv-SE"
"google-b-d", "bing", "allaannonser-sv-SE", "ddg", "prisjakt-sv-SE", "tyda-sv-SE", "wikipedia-sv-SE"
]
}
},
"ta": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-in", "ddg", "wikipedia-ta"
"google-b-d", "amazon-in", "ddg", "wikipedia-ta"
]
}
},
"te": {
"default": {
"visibleDefaultEngines": [
"google", "amazon-in", "ddg", "wikipedia-te", "wiktionary-te"
"google-b-d", "amazon-in", "ddg", "wikipedia-te", "wiktionary-te"
]
}
},
"th": {
"default": {
"visibleDefaultEngines": [
"google", "amazondotcom", "bing", "ddg", "longdo", "wikipedia-th"
"google-b-d", "amazondotcom", "bing", "ddg", "longdo", "wikipedia-th"
]
}
},
"tl": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-tl"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-tl"
]
}
},
"tr": {
"default": {
"visibleDefaultEngines": [
"yandex-tr", "google", "ddg", "twitter", "wikipedia-tr"
"yandex-tr", "google-b-d", "ddg", "twitter", "wikipedia-tr"
]
},
"TR": {
@ -814,56 +814,56 @@
"trs": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "wikipedia-es"
"google-b-d", "bing", "amazondotcom", "ddg", "wikipedia-es"
]
}
},
"uk": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "meta-ua", "ddg", "wikipedia-uk", "hotline-ua"
"google-b-d", "bing", "meta-ua", "ddg", "wikipedia-uk", "hotline-ua"
]
}
},
"ur": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-in", "ddg", "twitter", "wikipedia-ur"
"google-b-d", "bing", "amazon-in", "ddg", "twitter", "wikipedia-ur"
]
}
},
"uz": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-uz"
"google-b-d", "bing", "amazondotcom", "ddg", "twitter", "wikipedia-uz"
]
}
},
"vi": {
"default": {
"visibleDefaultEngines": [
"google", "coccoc", "ddg", "wikipedia-vi"
"google-b-d", "coccoc", "ddg", "wikipedia-vi"
]
}
},
"wo": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "amazon-france", "ddg", "ebay-fr", "twitter", "wikipedia-wo"
"google-b-d", "bing", "amazon-france", "ddg", "ebay-fr", "twitter", "wikipedia-wo"
]
}
},
"xh": {
"default": {
"visibleDefaultEngines": [
"google", "bing", "ddg", "wikipedia"
"google-b-d", "bing", "ddg", "wikipedia"
]
}
},
"zh-CN": {
"default": {
"visibleDefaultEngines": [
"baidu", "google", "bing", "ddg", "wikipedia-zh-CN", "amazondotcn"
"baidu", "google-b-d", "bing", "ddg", "wikipedia-zh-CN", "amazondotcn"
]
},
"CN": {
@ -873,7 +873,7 @@
"zh-TW": {
"default": {
"visibleDefaultEngines": [
"google", "ddg", "readmoo", "wikipedia-zh-TW"
"google-b-d", "ddg", "readmoo", "wikipedia-zh-TW"
]
}
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -24,10 +24,10 @@ let region = Services.prefs.getCharPref("browser.search.region");
let code = "";
switch (region) {
case "US":
code = "firefox-b-1";
code = "firefox-b-1-d";
break;
case "DE":
code = "firefox-b";
code = "firefox-b-d";
break;
}
@ -36,7 +36,7 @@ if (code) {
codes.context = code;
codes.newTab = code;
codes.submission = code;
codes.keyword = `${code}-ab`;
codes.keyword = code;
}
function promiseContentSearchReady(browser) {

Просмотреть файл

@ -10,6 +10,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -25,6 +27,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -40,6 +44,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -55,6 +61,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -70,6 +78,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -85,6 +95,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -100,6 +112,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -115,6 +129,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -130,6 +146,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -145,6 +163,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -160,6 +180,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -175,6 +197,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -190,6 +214,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -205,6 +231,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -220,6 +248,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -235,6 +265,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -250,6 +282,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -265,6 +299,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -280,6 +316,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -295,6 +333,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -310,6 +350,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -325,6 +367,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -340,6 +384,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -355,6 +401,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -370,6 +418,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -385,6 +435,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -400,6 +452,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -415,6 +469,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -430,6 +486,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -445,6 +503,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -460,6 +520,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -475,6 +537,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -490,6 +554,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -505,6 +571,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -520,6 +588,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -535,6 +605,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -550,6 +622,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -565,6 +639,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -580,6 +656,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -595,6 +673,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -610,6 +690,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -625,6 +707,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -640,6 +724,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -655,6 +741,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -670,6 +758,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -685,6 +775,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -700,6 +792,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -715,6 +809,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -730,6 +826,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -745,6 +843,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -760,6 +860,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -775,6 +877,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -788,6 +892,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -810,6 +916,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -825,6 +933,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -840,6 +950,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -855,6 +967,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -870,6 +984,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -885,6 +1001,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -900,6 +1018,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -915,6 +1035,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -930,6 +1052,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -945,6 +1069,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -960,6 +1086,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -975,6 +1103,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -990,6 +1120,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1005,6 +1137,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1020,6 +1154,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1035,6 +1171,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1050,6 +1188,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1065,6 +1205,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1080,6 +1222,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1095,6 +1239,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1110,6 +1256,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1125,6 +1273,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1140,6 +1290,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1155,6 +1307,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1170,6 +1324,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1185,6 +1341,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1200,6 +1358,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1215,6 +1375,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1230,6 +1392,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1245,6 +1409,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1260,6 +1426,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1275,6 +1443,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1290,6 +1460,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1305,6 +1477,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1320,6 +1494,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1335,6 +1511,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1350,6 +1528,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1365,6 +1545,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1380,6 +1562,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1395,6 +1579,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1410,6 +1596,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1425,6 +1613,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1440,6 +1630,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1455,6 +1647,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1470,6 +1664,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1485,6 +1681,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1500,6 +1698,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1515,6 +1715,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1530,6 +1732,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1545,6 +1749,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"
@ -1560,6 +1766,8 @@
"win32",
"win32-devedition",
"win64",
"win64-aarch64-msvc",
"win64-aarch64-msvc-devedition",
"win64-devedition"
],
"revision": "default"

Просмотреть файл

@ -87,7 +87,7 @@ buildscript {
}
dependencies {
classpath 'org.mozilla.apilint:apilint:0.1.5'
classpath 'org.mozilla.apilint:apilint:0.1.6'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
classpath 'org.apache.commons:commons-exec:1.3'

Просмотреть файл

@ -36,8 +36,8 @@ export HOST_CXXFLAGS="-g"
export HOST_LDFLAGS="-g"
ac_add_options --target=x86_64-apple-darwin11
ac_add_options --with-macos-sdk=$CROSS_SYSROOT
ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
export MACOS_SDK_DIR=$CROSS_SYSROOT
export MACOS_PRIVATE_FRAMEWORKS_DIR=$CROSS_PRIVATE_FRAMEWORKS
if [ "x$MOZ_PKG_SPECIAL" != "xasan" -a -z "$MOZ_AUTOMATION_ARTIFACT_BUILDS" ]; then
# Enable static analysis checks by default on OSX cross builds.

Просмотреть файл

@ -222,7 +222,8 @@ with only_when(target_is_osx):
# MacOS SDK
# =========
option('--with-macos-sdk', nargs=1, help='Location of platform SDK to use')
option('--with-macos-sdk', env='MACOS_SDK_DIR', nargs=1,
help='Location of platform SDK to use')
@depends_if('--with-macos-sdk')
@imports(_from='os.path', _import='isdir')
@ -237,7 +238,8 @@ with only_when(target_is_osx):
set_config('MACOS_SDK_DIR', macos_sdk)
with only_when(cross_compiling):
option('--with-macos-private-frameworks', nargs=1,
option('--with-macos-private-frameworks',
env="MACOS_PRIVATE_FRAMEWORKS_DIR", nargs=1,
help='Location of private frameworks to use')
@depends_if('--with-macos-private-frameworks')

Просмотреть файл

@ -25,6 +25,8 @@ unset LLVM_PROFDATA
unset WIN64_LINK
unset WIN64_LIB
unset ENABLE_CLANG_PLUGIN
unset MACOS_SDK_DIR
unset MACOS_PRIVATE_FRAMEWORKS_DIR
unset MOZ_STDCXX_COMPAT
unset MOZ_NO_PIE_COMPAT

Просмотреть файл

@ -91,6 +91,9 @@ if __name__ == '__main__':
env['PATH'] = '%s;%s' % (vcdir, env['PATH'])
break
# Add MOZ_OBJDIR to the env so that cygprofile.cpp can use it.
env["MOZ_OBJDIR"] = build.topobjdir
# Run Firefox a first time to initialize its profile
runner = FirefoxRunner(profile=profile,
binary=binary,

Просмотреть файл

@ -32,6 +32,12 @@ const {
removeUSBRuntimesObserver,
} = require("./src/modules/usb-runtimes");
const {
addMultiE10sListener,
isMultiE10s,
removeMultiE10sListener,
} = require("devtools/client/shared/multi-e10s-helper");
loader.lazyRequireGetter(this, "adbAddon", "devtools/shared/adb/adb-addon", true);
const Router = createFactory(require("devtools/client/shared/vendor/react-router-dom").HashRouter);
@ -48,6 +54,7 @@ const AboutDebugging = {
this.onAdbAddonUpdated = this.onAdbAddonUpdated.bind(this);
this.onNetworkLocationsUpdated = this.onNetworkLocationsUpdated.bind(this);
this.onUSBRuntimesUpdated = this.onUSBRuntimesUpdated.bind(this);
this.onMultiE10sUpdated = this.onMultiE10sUpdated.bind(this);
this.store = configureStore();
this.actions = bindActionCreators(actions, this.store.dispatch);
@ -84,6 +91,12 @@ const AboutDebugging = {
// Remove deprecated remote debugging extensions.
await adbAddon.uninstallUnsupportedExtensions();
addMultiE10sListener(this.onMultiE10sUpdated);
},
onMultiE10sUpdated() {
this.actions.updateMultiE10sStatus(isMultiE10s());
},
onAdbAddonUpdated() {
@ -111,6 +124,7 @@ const AboutDebugging = {
// Remove all client listeners.
this.actions.removeRuntimeListeners();
removeMultiE10sListener(this.onMultiE10sUpdated);
removeNetworkLocationsObserver(this.onNetworkLocationsUpdated);
removeUSBRuntimesObserver(this.onUSBRuntimesUpdated);
adbAddon.off("update", this.onAdbAddonUpdated);

Просмотреть файл

@ -13,6 +13,7 @@ const {
ADB_ADDON_UNINSTALL_FAILURE,
ADB_ADDON_STATUS_UPDATED,
DEBUG_TARGET_COLLAPSIBILITY_UPDATED,
MULTI_E10S_UPDATED,
NETWORK_LOCATIONS_UPDATED,
PAGE_SELECTED,
PAGE_TYPES,
@ -123,6 +124,12 @@ function scanUSBRuntimes() {
};
}
function updateMultiE10sStatus(isMultiE10s) {
return (dispatch, getState) => {
dispatch({ type: MULTI_E10S_UPDATED, isMultiE10s});
};
}
module.exports = {
addNetworkLocation,
installAdbAddon,
@ -132,5 +139,6 @@ module.exports = {
uninstallAdbAddon,
updateAdbAddonStatus,
updateDebugTargetCollapsibility,
updateMultiE10sStatus,
updateNetworkLocations,
};

Просмотреть файл

@ -244,6 +244,10 @@ Form controls
background: var(--box-background-hover)
}
.default-button:disabled {
opacity: 0.4;
}
/* smaller size for a default button */
.default-button--micro {
padding-inline-start: calc(2 * var(--base-distance));

Просмотреть файл

@ -22,6 +22,7 @@ class InspectAction extends PureComponent {
return {
dispatch: PropTypes.func.isRequired,
target: Types.debugTarget.isRequired,
disabled: PropTypes.bool,
};
}
@ -31,6 +32,8 @@ class InspectAction extends PureComponent {
}
render() {
const { disabled } = this.props;
return Localized(
{
id: "about-debugging-debug-target-inspect-button",
@ -39,6 +42,7 @@ class InspectAction extends PureComponent {
{
onClick: e => this.inspect(),
className: "default-button js-debug-target-inspect-button",
disabled,
},
"Inspect"
)

Просмотреть файл

@ -7,6 +7,7 @@
const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const { connect } = require("devtools/client/shared/vendor/react-redux");
const FluentReact = require("devtools/client/shared/vendor/fluent-react");
@ -24,6 +25,8 @@ class ServiceWorkerAction extends PureComponent {
dispatch: PropTypes.func.isRequired,
// Provided by wrapping the component with FluentReact.withLocalization.
getString: PropTypes.func.isRequired,
// Provided by redux state
isMultiE10s: PropTypes.bool.isRequired,
target: Types.debugTarget.isRequired,
};
}
@ -39,13 +42,14 @@ class ServiceWorkerAction extends PureComponent {
}
_renderAction() {
const { dispatch, target } = this.props;
const { dispatch, isMultiE10s, target } = this.props;
const { isActive, isRunning } = target.details;
if (!isRunning) {
const startLabel = this.props.getString("about-debugging-worker-action-start");
return this._renderButton({
className: "default-button",
disabled: isMultiE10s,
label: startLabel,
onClick: this.start.bind(this),
});
@ -53,24 +57,26 @@ class ServiceWorkerAction extends PureComponent {
if (!isActive) {
// Only debug button is available if the service worker is not active.
return InspectAction({ dispatch, target });
return InspectAction({ disabled: isMultiE10s, dispatch, target });
}
const pushLabel = this.props.getString("about-debugging-worker-action-push");
return [
this._renderButton({
className: "default-button js-push-button",
disabled: isMultiE10s,
label: pushLabel,
onClick: this.push.bind(this),
}),
InspectAction({ dispatch, target }),
InspectAction({ disabled: isMultiE10s, dispatch, target }),
];
}
_renderButton({ className, label, onClick }) {
_renderButton({ className, disabled, label, onClick }) {
return dom.button(
{
className,
disabled,
onClick: e => onClick(),
},
label,
@ -87,4 +93,11 @@ class ServiceWorkerAction extends PureComponent {
}
}
module.exports = FluentReact.withLocalization(ServiceWorkerAction);
const mapStateToProps = state => {
return {
isMultiE10s: state.ui.isMultiE10s,
};
};
module.exports = FluentReact.withLocalization(
connect(mapStateToProps)(ServiceWorkerAction));

Просмотреть файл

@ -19,6 +19,7 @@ const actionTypes = {
DISCONNECT_RUNTIME_FAILURE: "DISCONNECT_RUNTIME_FAILURE",
DISCONNECT_RUNTIME_START: "DISCONNECT_RUNTIME_START",
DISCONNECT_RUNTIME_SUCCESS: "DISCONNECT_RUNTIME_SUCCESS",
MULTI_E10S_UPDATED: "MULTI_E10S_UPDATED",
NETWORK_LOCATIONS_UPDATED: "NETWORK_LOCATIONS_UPDATED",
PAGE_SELECTED: "PAGE_SELECTED",
REQUEST_EXTENSIONS_FAILURE: "REQUEST_EXTENSIONS_FAILURE",

Просмотреть файл

@ -9,6 +9,7 @@ const Services = require("Services");
const { applyMiddleware, createStore } = require("devtools/client/shared/vendor/redux");
const { thunk } = require("devtools/client/shared/redux/middleware/thunk.js");
const { waitUntilService } = require("devtools/client/shared/redux/middleware/wait-service.js");
const { isMultiE10s } = require("devtools/client/shared/multi-e10s-helper");
const rootReducer = require("./reducers/index");
const { DebugTargetsState } = require("./reducers/debug-targets-state");
@ -50,7 +51,7 @@ function getUiState() {
const showSystemAddons = Services.prefs.getBoolPref(PREFERENCES.SHOW_SYSTEM_ADDONS,
false);
return new UiState(locations, collapsibilities, networkEnabled, wifiEnabled,
showSystemAddons);
showSystemAddons, isMultiE10s());
}
exports.configureStore = configureStore;

Просмотреть файл

@ -7,6 +7,7 @@
const {
ADB_ADDON_STATUS_UPDATED,
DEBUG_TARGET_COLLAPSIBILITY_UPDATED,
MULTI_E10S_UPDATED,
NETWORK_LOCATIONS_UPDATED,
PAGE_SELECTED,
TEMPORARY_EXTENSION_INSTALL_FAILURE,
@ -16,10 +17,12 @@ const {
} = require("../constants");
function UiState(locations = [], debugTargetCollapsibilities = {},
networkEnabled = false, wifiEnabled = false, showSystemAddons = false) {
networkEnabled = false, wifiEnabled = false,
showSystemAddons = false, isMultiE10s = false) {
return {
adbAddonStatus: null,
debugTargetCollapsibilities,
isMultiE10s,
isScanningUsb: false,
networkEnabled,
networkLocations: locations,
@ -45,6 +48,11 @@ function uiReducer(state = UiState(), action) {
return Object.assign({}, state, { debugTargetCollapsibilities });
}
case MULTI_E10S_UPDATED: {
const { isMultiE10s } = action;
return Object.assign({}, state, { isMultiE10s });
}
case NETWORK_LOCATIONS_UPDATED: {
const { locations } = action;
return Object.assign({}, state, { networkLocations: locations });

Просмотреть файл

@ -11,6 +11,11 @@ const { Component, createFactory } = require("devtools/client/shared/vendor/reac
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const Services = require("Services");
const {
addMultiE10sListener,
isMultiE10s,
removeMultiE10sListener,
} = require("devtools/client/shared/multi-e10s-helper");
const PanelHeader = createFactory(require("../PanelHeader"));
const TargetList = createFactory(require("../TargetList"));
@ -30,8 +35,6 @@ const Strings = Services.strings.createBundle(
const WorkerIcon = "chrome://devtools/skin/images/debugging-workers.svg";
const MORE_INFO_URL = "https://developer.mozilla.org/en-US/docs/Tools/about%3Adebugging" +
"#Service_workers_not_compatible";
const PROCESS_COUNT_PREF = "dom.ipc.processCount";
const MULTI_OPTOUT_PREF = "dom.ipc.multiOptOut";
class WorkersPanel extends Component {
static get propTypes() {
@ -66,20 +69,7 @@ class WorkersPanel extends Component {
client.mainRoot.on("processListChanged", this.updateWorkers);
client.addListener("registration-changed", this.updateWorkers);
// Some notes about these observers:
// - nsIPrefBranch.addObserver observes prefixes. In reality, watching
// PROCESS_COUNT_PREF watches two separate prefs:
// dom.ipc.processCount *and* dom.ipc.processCount.web. Because these
// are the two ways that we control the number of content processes,
// that works perfectly fine.
// - The user might opt in or out of multi by setting the multi opt out
// pref. That affects whether we need to show our warning, so we need to
// update our state when that pref changes.
// - In all cases, we don't have to manually check which pref changed to
// what. The platform code in nsIXULRuntime.maxWebProcessCount does all
// of that for us.
Services.prefs.addObserver(PROCESS_COUNT_PREF, this.updateMultiE10S);
Services.prefs.addObserver(MULTI_OPTOUT_PREF, this.updateMultiE10S);
addMultiE10sListener(this.updateMultiE10S);
this.updateMultiE10S();
this.updateWorkers();
@ -95,8 +85,7 @@ class WorkersPanel extends Component {
}
client.removeListener("registration-changed", this.updateWorkers);
Services.prefs.removeObserver(PROCESS_COUNT_PREF, this.updateMultiE10S);
Services.prefs.removeObserver(MULTI_OPTOUT_PREF, this.updateMultiE10S);
removeMultiE10sListener(this.updateMultiE10S);
}
get initialState() {
@ -106,7 +95,7 @@ class WorkersPanel extends Component {
shared: [],
other: [],
},
processCount: 1,
isMultiE10S: isMultiE10s(),
// List of ContentProcessTargetFront registered from componentWillMount
// from which we listen for worker list changes
@ -115,10 +104,7 @@ class WorkersPanel extends Component {
}
updateMultiE10S() {
// We watch the pref but set the state based on
// nsIXULRuntime.maxWebProcessCount.
const processCount = Services.appinfo.maxWebProcessCount;
this.setState({ processCount });
this.setState({ isMultiE10S: isMultiE10s() });
}
updateWorkers() {
@ -175,10 +161,7 @@ class WorkersPanel extends Component {
render() {
const { client, id } = this.props;
const { workers, processCount } = this.state;
const isE10S = Services.appinfo.browserTabsRemoteAutostart;
const isMultiE10S = isE10S && processCount > 1;
const { workers, isMultiE10S } = this.state;
return dom.div(
{

Просмотреть файл

@ -53,9 +53,9 @@ class TimingPath extends PureComponent {
// This section is only useful in cases where iterationStart has decimals.
// e.g.
// if { iterationStart: 0.25, iterations: 3 }, firstSectionCount is 0.75.
const firstSectionCount = iterationStart % 1 === 0
? 0
: Math.min(iterationCount, 1) - iterationStart % 1;
const firstSectionCount =
iterationStart % 1 === 0 ? 0 : Math.min(1 - iterationStart % 1, iterationCount);
if (firstSectionCount) {
this.renderFirstIteration(pathList, state,
mainIterationStartTime, firstSectionCount, helper);

Просмотреть файл

@ -54,18 +54,6 @@ const TEST_DATA = [
],
],
},
{
targetClass: "delay-negative",
expectedIterationPathList: [
[
{ x: 0, y: 0 },
{ x: 0, y: 50 },
{ x: 250000, y: 75 },
{ x: 500000, y: 100 },
{ x: 500000, y: 0 },
],
],
},
{
targetClass: "easing-step",
expectedIterationPathList: [
@ -127,8 +115,6 @@ const TEST_DATA = [
expectedForwardsPath: [
{ x: 1500000, y: 0 },
{ x: 1500000, y: 100 },
{ x: 2000000, y: 100 },
{ x: 2000000, y: 0 },
],
},
{
@ -146,9 +132,6 @@ const TEST_DATA = [
{ x: 1000000, y: 0 },
{ x: 1250000, y: 25 },
{ x: 1500000, y: 50 },
{ x: 1750000, y: 75 },
{ x: 2000000, y: 100 },
{ x: 2000000, y: 0 },
],
],
isInfinity: true,
@ -169,8 +152,6 @@ const TEST_DATA = [
{ x: 1000000, y: 100 },
{ x: 1250000, y: 75 },
{ x: 1500000, y: 50 },
{ x: 1750000, y: 25 },
{ x: 2000000, y: 0 },
],
],
isInfinity: true,
@ -190,9 +171,6 @@ const TEST_DATA = [
{ x: 1000000, y: 0 },
{ x: 1250000, y: 25 },
{ x: 1500000, y: 50 },
{ x: 1750000, y: 75 },
{ x: 2000000, y: 100 },
{ x: 2000000, y: 0 },
],
],
isInfinity: true,
@ -213,8 +191,6 @@ const TEST_DATA = [
{ x: 1000000, y: 100 },
{ x: 1250000, y: 75 },
{ x: 1500000, y: 50 },
{ x: 1750000, y: 25 },
{ x: 2000000, y: 0 },
],
],
isInfinity: true,
@ -270,8 +246,8 @@ const TEST_DATA = [
expectedForwardsPath: [
{ x: 1000000, y: 0 },
{ x: 1000000, y: 100 },
{ x: 2000000, y: 100 },
{ x: 2000000, y: 0 },
{ x: 1500000, y: 100 },
{ x: 1500000, y: 0 },
],
},
{
@ -316,8 +292,8 @@ const TEST_DATA = [
expectedForwardsPath: [
{ x: 1000000, y: 0 },
{ x: 1000000, y: 100 },
{ x: 2000000, y: 100 },
{ x: 2000000, y: 0 },
{ x: 1500000, y: 100 },
{ x: 1500000, y: 0 },
],
},
{
@ -391,6 +367,7 @@ const TEST_DATA = [
add_task(async function() {
await addTab(URL_ROOT + "doc_multi_timings.html");
await removeAnimatedElementsExcept(TEST_DATA.map(t => `.${ t.targetClass }`));
const { panel } = await openAnimationInspector();
for (const testData of TEST_DATA) {

Просмотреть файл

@ -13,13 +13,54 @@ const TEST_DATA = [
},
{
targetClass: "delay-negative",
expectedPath: [
expectedIterationPathList: [
[
{ x: 0, y: 0 },
{ x: 0, y: 50 },
{ x: 250000, y: 75 },
{ x: 500000, y: 100 },
{ x: 500000, y: 0 },
],
],
expectedNegativePath: [
{ x: -500000, y: 0 },
{ x: -250000, y: 25 },
{ x: 0, y: 50 },
{ x: 0, y: 0 },
],
},
{
targetClass: "delay-negative-25",
expectedIterationPathList: [
[
{ x: 0, y: 0 },
{ x: 0, y: 25 },
{ x: 750000, y: 100 },
{ x: 750000, y: 0 },
],
],
expectedNegativePath: [
{ x: -250000, y: 0 },
{ x: 0, y: 25 },
{ x: 0, y: 0 },
],
},
{
targetClass: "delay-negative-75",
expectedIterationPathList: [
[
{ x: 0, y: 0 },
{ x: 0, y: 75 },
{ x: 250000, y: 100 },
{ x: 250000, y: 0 },
],
],
expectedNegativePath: [
{ x: -750000, y: 0 },
{ x: 0, y: 75 },
{ x: 0, y: 0 },
],
},
];
add_task(async function() {
@ -27,7 +68,8 @@ add_task(async function() {
await removeAnimatedElementsExcept(TEST_DATA.map(t => `.${ t.targetClass }`));
const { panel } = await openAnimationInspector();
for (const { targetClass, expectedPath } of TEST_DATA) {
for (const { targetClass,
expectedIterationPathList, expectedNegativePath } of TEST_DATA) {
const animationItemEl =
findAnimationItemElementsByTargetSelector(panel, `.${ targetClass }`);
@ -35,14 +77,35 @@ add_task(async function() {
const negativeDelayPathEl =
animationItemEl.querySelector(".animation-negative-delay-path");
if (expectedPath) {
if (expectedNegativePath) {
ok(negativeDelayPathEl,
"The negative delay path element should be in animation item element");
const pathEl = negativeDelayPathEl.querySelector("path");
assertPathSegments(pathEl, true, expectedPath);
assertPathSegments(pathEl, true, expectedNegativePath);
} else {
ok(!negativeDelayPathEl,
"The negative delay path element should not be in animation item element");
}
if (!expectedIterationPathList) {
// We don't need to test for iteration path.
continue;
}
info(`Checking computed timing path existance for ${ targetClass }`);
const computedTimingPathEl =
animationItemEl.querySelector(".animation-computed-timing-path");
ok(computedTimingPathEl,
"The computed timing path element should be in each animation item element");
info(`Checking iteration path list for ${ targetClass }`);
const iterationPathEls =
computedTimingPathEl.querySelectorAll(".animation-iteration-path");
is(iterationPathEls.length, expectedIterationPathList.length,
`Number of iteration path should be ${ expectedIterationPathList.length }`);
for (const [j, iterationPathEl] of iterationPathEls.entries()) {
assertPathSegments(iterationPathEl, true, expectedIterationPathList[j]);
}
}
});

Просмотреть файл

@ -156,6 +156,14 @@
],
{},
"duplicate-offsets");
createAnimation({ opacity: [0, 1] },
{ delay: -250000 },
"delay-negative-25");
createAnimation({ opacity: [0, 1] },
{ delay: -750000 },
"delay-negative-75");
</script>
</body>
</html>

Просмотреть файл

@ -24,6 +24,9 @@ class SmartTrace extends Component {
sourceMapService: PropTypes.object,
initialRenderDelay: PropTypes.number,
onSourceMapResultDebounceDelay: PropTypes.number,
// Function that will be called when the SmartTrace is ready, i.e. once it was
// rendered.
onReady: PropTypes.func,
};
}
@ -83,6 +86,12 @@ class SmartTrace extends Component {
}
}
componentDidMount() {
if (this.props.onReady && this.state.ready) {
this.props.onReady();
}
}
shouldComponentUpdate(_, nextState) {
if (this.state.ready === false && nextState.ready === true) {
return true;
@ -95,6 +104,12 @@ class SmartTrace extends Component {
return false;
}
componentDidUpdate(_, previousState) {
if (this.props.onReady && !previousState.ready && this.state.ready) {
this.props.onReady();
}
}
componentWillUnmount() {
if (this.initialRenderDelayTimeoutId) {
clearTimeout(this.initialRenderDelayTimeoutId);

Просмотреть файл

@ -39,11 +39,15 @@ window.onload = function() {
},
];
let onReadyCount = 0;
const props = {
stacktrace,
initialRenderDelay: 2000,
onViewSourceInDebugger: () => {},
onViewSourceInScratchpad: () => {},
onReady: () => {
onReadyCount++;
},
// A mock source map service.
sourceMapService: {
subscribe: function (url, line, column, callback) {
@ -79,6 +83,8 @@ window.onload = function() {
location: "original.js:22",
tooltip: "View source in Debugger → https://bugzilla.mozilla.org/original.js:22",
});
is(onReadyCount, 1, "onReady was called once");
});
add_task(async function testSlowSourcemapService() {
@ -99,12 +105,16 @@ window.onload = function() {
const sourcemapTimeout = 2000;
const initialRenderDelay = 300;
let onReadyCount = 0;
const props = {
stacktrace,
initialRenderDelay,
onViewSourceInDebugger: () => {},
onViewSourceInScratchpad: () => {},
onReady: () => {
onReadyCount++;
},
// A mock source map service.
sourceMapService: {
subscribe: function (url, line, column, callback) {
@ -123,6 +133,7 @@ window.onload = function() {
let traceEl = ReactDOM.findDOMNode(trace);
ok(!traceEl, "Nothing was rendered at first");
is(onReadyCount, 0, "onReady isn't called if SmartTrace isn't rendered");
info("Wait for the initial delay to be over");
await new Promise(res => setTimeout(res, initialRenderDelay));
@ -149,6 +160,8 @@ window.onload = function() {
tooltip: "View source in Debugger → http://myfile.com/bundle.js:2",
});
is(onReadyCount, 1, "onReady was called once");
info("Check the the sourcemapped version is rendered after the sourcemapTimeout");
await waitFor(() => !!traceEl.querySelector(".group"));
@ -158,6 +171,8 @@ window.onload = function() {
const groups = Array.from(traceEl.querySelectorAll(".group"));
is(groups.length, 1, "SmartTrace has a group");
is(groups[0].textContent, "last2React", "A collapsed React group is displayed");
is(onReadyCount, 1, "onReady was only called once");
});
add_task(async function testFlakySourcemapService() {
@ -184,6 +199,7 @@ window.onload = function() {
const initialRenderDelay = 300;
const onSourceMapResultDebounceDelay = 50;
let onReadyCount = 0;
const props = {
stacktrace,
@ -191,6 +207,9 @@ window.onload = function() {
onSourceMapResultDebounceDelay,
onViewSourceInDebugger: () => {},
onViewSourceInScratchpad: () => {},
onReady: () => {
onReadyCount++;
},
// A mock source map service.
sourceMapService: {
subscribe: function (url, line, column, callback) {
@ -212,6 +231,7 @@ window.onload = function() {
let traceEl = ReactDOM.findDOMNode(trace);
ok(!traceEl, "Nothing was rendered at first");
is(onReadyCount, 0, "onReady isn't called if SmartTrace isn't rendered");
info("Wait for the initial delay + debounce to be over");
await waitFor(() => {
@ -224,7 +244,7 @@ window.onload = function() {
let frameEls = Array.from(traceEl.querySelectorAll(".frame"));
ok(frameEls, "Rendered SmartTrace has frames");
is(frameEls.length, 3, "SmartTrace has 2 frames");
is(frameEls.length, 3, "SmartTrace has 3 frames");
info("Check that the original frames are displayed even if there's no sourcemap " +
"response for some frames");
@ -248,6 +268,8 @@ window.onload = function() {
location: "file-3.js:33",
tooltip: "View source in Debugger → http://myfile.com/file-3.js:33",
});
is(onReadyCount, 1, "onReady was only called once");
});
};

Просмотреть файл

@ -40,10 +40,15 @@ window.onload = function() {
},
];
let onReadyCount = 0;
const props = {
stacktrace,
onViewSourceInDebugger: () => {},
onViewSourceInScratchpad: () => {},
onReady: () => {
onReadyCount++;
}
};
const trace = ReactDOM.render(SmartTrace(props), window.document.body);
@ -70,6 +75,8 @@ window.onload = function() {
location: "http://myfile.com/loadee.js:10",
tooltip: "View source in Debugger → http://myfile.com/loadee.js:10",
});
is(onReadyCount, 1, "onReady was called once");
});
};
</script>

Просмотреть файл

@ -37,6 +37,7 @@ DevToolsModules(
'key-shortcuts.js',
'keycodes.js',
'link.js',
'multi-e10s-helper.js',
'natural-sort.js',
'node-attribute-parser.js',
'options-view.js',

Просмотреть файл

@ -0,0 +1,53 @@
/* 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 Services = require("Services");
/**
* This helper provides info on whether we are in multi e10s mode or not.
* Since this can be changed on the fly, there are subscribe/unsubscribe functions
* to get notified of this.
*
* The logic to handle this is borrowed from the (old) about:debugging code.
*/
const PROCESS_COUNT_PREF = "dom.ipc.processCount";
const MULTI_OPTOUT_PREF = "dom.ipc.multiOptOut";
function addMultiE10sListener(listener) {
// Some notes about these observers:
// - nsIPrefBranch.addObserver observes prefixes. In reality, watching
// PROCESS_COUNT_PREF watches two separate prefs:
// dom.ipc.processCount *and* dom.ipc.processCount.web. Because these
// are the two ways that we control the number of content processes,
// that works perfectly fine.
// - The user might opt in or out of multi by setting the multi opt out
// pref. That affects whether we need to show our warning, so we need to
// update our state when that pref changes.
// - In all cases, we don't have to manually check which pref changed to
// what. The platform code in nsIXULRuntime.maxWebProcessCount does all
// of that for us.
Services.prefs.addObserver(PROCESS_COUNT_PREF, listener);
Services.prefs.addObserver(MULTI_OPTOUT_PREF, listener);
}
function removeMultiE10sListener(listener) {
Services.prefs.removeObserver(PROCESS_COUNT_PREF, listener);
Services.prefs.removeObserver(MULTI_OPTOUT_PREF, listener);
}
function isMultiE10s() {
const isE10s = Services.appinfo.browserTabsRemoteAutostart;
const processCount = Services.appinfo.maxWebProcessCount;
return isE10s && processCount > 1;
}
module.exports = {
addMultiE10sListener,
isMultiE10s,
removeMultiE10sListener,
};

Просмотреть файл

@ -67,6 +67,7 @@ class ConsoleOutput extends Component {
constructor(props) {
super(props);
this.onContextMenu = this.onContextMenu.bind(this);
this.maybeScrollToBottom = this.maybeScrollToBottom.bind(this);
}
componentDidMount() {
@ -125,7 +126,11 @@ class ConsoleOutput extends Component {
}
componentDidUpdate() {
if (this.shouldScrollBottom) {
this.maybeScrollToBottom();
}
maybeScrollToBottom() {
if (this.outputNode && this.shouldScrollBottom) {
scrollToBottom(this.outputNode);
}
}
@ -177,6 +182,7 @@ class ConsoleOutput extends Component {
pausedExecutionPoint,
getMessage: () => messages.get(messageId),
isPaused: pausedMessage && pausedMessage.id == messageId,
maybeScrollToBottom: this.maybeScrollToBottom,
}));
return (

Просмотреть файл

@ -36,6 +36,7 @@ GripMessageBody.propTypes = {
escapeWhitespace: PropTypes.bool,
type: PropTypes.string,
helperType: PropTypes.string,
maybeScrollToBottom: PropTypes.func,
};
GripMessageBody.defaultProps = {
@ -51,6 +52,7 @@ function GripMessageBody(props) {
escapeWhitespace,
mode = MODE.LONG,
dispatch,
maybeScrollToBottom,
} = props;
let styleObject;
@ -61,6 +63,7 @@ function GripMessageBody(props) {
const objectInspectorProps = {
autoExpandDepth: shouldAutoExpandObjectInspector(props) ? 1 : 0,
mode,
maybeScrollToBottom,
// TODO: we disable focus since the tabbing trail is a bit weird in the output (e.g.
// location links are not focused). Let's remove the property below when we found and
// fixed the issue (See Bug 1456060).

Просмотреть файл

@ -70,6 +70,7 @@ class Message extends Component {
frame: PropTypes.any,
})),
isPaused: PropTypes.bool,
maybeScrollToBottom: PropTypes.func,
};
}
@ -210,6 +211,7 @@ class Message extends Component {
onViewSourceInScratchpad: serviceContainer.onViewSourceInScratchpad
|| serviceContainer.onViewSource,
onViewSource: serviceContainer.onViewSource,
onReady: this.props.maybeScrollToBottom,
sourceMapService: serviceContainer.sourceMapService,
}),
);

Просмотреть файл

@ -24,6 +24,7 @@ ConsoleApiCall.propTypes = {
open: PropTypes.bool,
serviceContainer: PropTypes.object.isRequired,
timestampsVisible: PropTypes.bool.isRequired,
maybeScrollToBottom: PropTypes.func,
};
ConsoleApiCall.defaultProps = {
@ -41,6 +42,7 @@ function ConsoleApiCall(props) {
repeat,
pausedExecutionPoint,
isPaused,
maybeScrollToBottom,
} = props;
const {
id: messageId,
@ -66,6 +68,7 @@ function ConsoleApiCall(props) {
userProvidedStyles,
serviceContainer,
type,
maybeScrollToBottom,
};
if (type === "trace") {
@ -137,6 +140,7 @@ function ConsoleApiCall(props) {
timeStamp,
timestampsVisible,
parameters,
maybeScrollToBottom,
});
}
@ -150,6 +154,7 @@ function formatReps(options = {}) {
serviceContainer,
userProvidedStyles,
type,
maybeScrollToBottom,
} = options;
return (
@ -166,6 +171,7 @@ function formatReps(options = {}) {
loadedObjectProperties,
loadedObjectEntries,
type,
maybeScrollToBottom,
}))
// Interleave spaces.
.reduce((arr, v, i) => {

Просмотреть файл

@ -17,6 +17,7 @@ ConsoleCommand.propTypes = {
message: PropTypes.object.isRequired,
timestampsVisible: PropTypes.bool.isRequired,
serviceContainer: PropTypes.object,
maybeScrollToBottom: PropTypes.func,
};
/**
@ -27,6 +28,7 @@ function ConsoleCommand(props) {
message,
timestampsVisible,
serviceContainer,
maybeScrollToBottom,
} = props;
const {
@ -51,6 +53,7 @@ function ConsoleCommand(props) {
indent,
timeStamp,
timestampsVisible,
maybeScrollToBottom,
});
}

Просмотреть файл

@ -19,6 +19,7 @@ EvaluationResult.propTypes = {
message: PropTypes.object.isRequired,
timestampsVisible: PropTypes.bool.isRequired,
serviceContainer: PropTypes.object,
maybeScrollToBottom: PropTypes.func,
};
function EvaluationResult(props) {
@ -27,6 +28,7 @@ function EvaluationResult(props) {
message,
serviceContainer,
timestampsVisible,
maybeScrollToBottom,
} = props;
const {
@ -63,6 +65,7 @@ function EvaluationResult(props) {
escapeWhitespace: false,
type,
helperType,
maybeScrollToBottom,
});
}
@ -83,6 +86,7 @@ function EvaluationResult(props) {
parameters,
notes,
timestampsVisible,
maybeScrollToBottom,
});
}

Просмотреть файл

@ -18,6 +18,7 @@ PageError.propTypes = {
open: PropTypes.bool,
timestampsVisible: PropTypes.bool.isRequired,
serviceContainer: PropTypes.object,
maybeScrollToBottom: PropTypes.func,
};
PageError.defaultProps = {
@ -33,6 +34,7 @@ function PageError(props) {
serviceContainer,
timestampsVisible,
isPaused,
maybeScrollToBottom,
} = props;
const {
id: messageId,
@ -77,6 +79,7 @@ function PageError(props) {
timeStamp,
notes,
timestampsVisible,
maybeScrollToBottom,
});
}

Просмотреть файл

@ -8,9 +8,16 @@
const TEST_URI =
`data:text/html;charset=utf-8,<p>Web Console test for scroll.</p>
<script>
for (let i = 0; i < 100; i++) {
console.log("init-" + i);
}
var a = () => b();
var b = () => c();
var c = () => console.trace("trace in C");
for (let i = 0; i < 100; i++) {
if (i % 10 === 0) {
c();
}
console.log("init-" + i);
}
</script>
`;
add_task(async function() {
@ -23,6 +30,10 @@ add_task(async function() {
ok(hasVerticalOverflow(outputContainer), "There is a vertical overflow");
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Wait until all stacktraces are rendered");
await waitFor(() => outputContainer.querySelectorAll(".frames").length === 10);
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
await refreshTab();
info("Console should be scrolled to bottom after refresh from page logs");
@ -30,39 +41,68 @@ add_task(async function() {
ok(hasVerticalOverflow(outputContainer), "There is a vertical overflow");
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Wait until all stacktraces are rendered");
await waitFor(() => outputContainer.querySelectorAll(".frames").length === 10);
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Scroll up");
outputContainer.scrollTop = 0;
info("Add a message to check that the scroll isn't impacted");
let receievedMessages = waitForMessages({hud, messages: [{
text: "stay",
}]});
info("Add a console.trace message to check that the scroll isn't impacted");
let onMessage = waitForMessage(hud, "trace in C");
ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
content.wrappedJSObject.console.log("stay");
content.wrappedJSObject.c();
});
await receievedMessages;
let message = await onMessage;
ok(hasVerticalOverflow(outputContainer), "There is a vertical overflow");
is(outputContainer.scrollTop, 0, "The console stayed scrolled to the top");
info("Wait until the stacktrace is rendered");
await waitFor(() => message.node.querySelector(".frame"));
is(outputContainer.scrollTop, 0, "The console stayed scrolled to the top");
info("Evaluate a command to check that the console scrolls to the bottom");
receievedMessages = waitForMessages({hud, messages: [{
text: "42",
}]});
onMessage = waitForMessage(hud, "42");
ui.jsterm.execute("21 + 21");
await receievedMessages;
await onMessage;
ok(hasVerticalOverflow(outputContainer), "There is a vertical overflow");
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Add a message to check that the console do scroll since we're at the bottom");
receievedMessages = waitForMessages({hud, messages: [{
text: "scroll",
}]});
onMessage = waitForMessage(hud, "scroll");
ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
content.wrappedJSObject.console.log("scroll");
});
await receievedMessages;
await onMessage;
ok(hasVerticalOverflow(outputContainer), "There is a vertical overflow");
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Evaluate an Error object to check that the console scrolls to the bottom");
onMessage = waitForMessage(hud, "myErrorObject", ".message.result");
ui.jsterm.execute(`
x = new Error("myErrorObject");
x.stack = "a@b/c.js:1:2\\nd@e/f.js:3:4";
x;`
);
message = await onMessage;
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Wait until the stacktrace is rendered and check the console is scrolled");
await waitFor(() => message.node.querySelector(".objectBox-stackTrace .frame"));
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Add a console.trace message to check that the console stays scrolled to bottom");
onMessage = waitForMessage(hud, "trace in C");
ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
content.wrappedJSObject.c();
});
message = await onMessage;
ok(hasVerticalOverflow(outputContainer), "There is a vertical overflow");
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
info("Wait until the stacktrace is rendered");
await waitFor(() => message.node.querySelector(".frame"));
ok(isScrolledToBottom(outputContainer), "The console is scrolled to the bottom");
});
function hasVerticalOverflow(container) {

Просмотреть файл

@ -62,6 +62,7 @@ function getObjectInspector(grip, serviceContainer, override = {}) {
? serviceContainer.onViewSourceInScratchpad || serviceContainer.onViewSource
: null,
onViewSource: serviceContainer.onViewSource,
onReady: override.maybeScrollToBottom,
sourceMapService: serviceContainer ? serviceContainer.sourceMapService : null,
}),
};

Просмотреть файл

@ -1487,8 +1487,9 @@ nsresult nsSHistory::InitiateLoad(nsISHEntry* aFrameEntry,
nsCOMPtr<nsIURI> newURI = aFrameEntry->GetURI();
loadState->SetURI(newURI);
loadState->SetLoadFlags(nsIWebNavigation::LOAD_FLAGS_NONE);
// TODO fix principal here in Bug 1508642
loadState->SetTriggeringPrincipal(nsContentUtils::GetSystemPrincipal());
nsCOMPtr<nsIPrincipal> triggeringPrincipal =
aFrameEntry->GetTriggeringPrincipal();
loadState->SetTriggeringPrincipal(triggeringPrincipal);
loadState->SetFirstParty(false);
// Time to initiate a document load

Просмотреть файл

@ -3008,9 +3008,9 @@ nsIContent* nsFocusManager::GetNextTabbableContentInScope(
// is non-negative
bool skipOwner = aSkipOwner || !aOwner->GetShadowRoot();
if (!skipOwner && (aForward && aOwner == aStartContent)) {
int32_t tabIndex = 0;
aOwner->IsFocusable(&tabIndex);
if (tabIndex >= 0) {
int32_t tabIndex = -1;
nsIFrame* frame = aOwner->GetPrimaryFrame();
if (frame && frame->IsFocusable(&tabIndex, false) && tabIndex >= 0) {
return aOwner;
}
}
@ -3112,9 +3112,9 @@ nsIContent* nsFocusManager::GetNextTabbableContentInScope(
// Return shadow host at last for backward navigation if its tabindex
// is non-negative
if (!skipOwner && !aForward) {
int32_t tabIndex = 0;
aOwner->IsFocusable(&tabIndex);
if (tabIndex >= 0) {
int32_t tabIndex = -1;
nsIFrame* frame = aOwner->GetPrimaryFrame();
if (frame && frame->IsFocusable(&tabIndex, false) && tabIndex >= 0) {
return aOwner;
}
}
@ -3226,59 +3226,82 @@ nsresult nsFocusManager::GetNextTabbableContent(
bool getNextFrame = true;
nsCOMPtr<nsIContent> iterStartContent = aStartContent;
// Iterate tab index to find corresponding contents
while (1) {
nsIFrame* startFrame = iterStartContent->GetPrimaryFrame();
nsIFrame* frame = iterStartContent->GetPrimaryFrame();
// if there is no frame, look for another content node that has a frame
if (!startFrame) {
while (!frame) {
// if the root content doesn't have a frame, just return
if (iterStartContent == aRootContent) return NS_OK;
if (iterStartContent == aRootContent) {
return NS_OK;
}
// look for the next or previous content node in tree order
iterStartContent = aForward ? iterStartContent->GetNextNode()
: iterStartContent->GetPreviousContent();
if (!iterStartContent) {
break;
}
frame = iterStartContent->GetPrimaryFrame();
// Host without frame, enter its scope.
if (!frame && iterStartContent->GetShadowRoot()) {
int32_t tabIndex = HostOrSlotTabIndexValue(iterStartContent);
if (tabIndex >= 0 &&
(aIgnoreTabIndex || aCurrentTabIndex == tabIndex)) {
nsIContent* contentToFocus = GetNextTabbableContentInScope(
iterStartContent, iterStartContent, aOriginalStartContent,
aForward, aForward ? 1 : 0, aIgnoreTabIndex,
aForDocumentNavigation, true /* aSkipOwner */);
if (contentToFocus) {
NS_ADDREF(*aResultContent = contentToFocus);
return NS_OK;
}
}
}
// we've already skipped over the initial focused content, so we
// don't want to traverse frames.
getNextFrame = false;
if (iterStartContent) continue;
// otherwise, as a last attempt, just look at the root content
iterStartContent = aRootContent;
continue;
}
// For tab navigation, pass false for aSkipPopupChecks so that we don't
// iterate into or out of a popup. For document naviation pass true to
// ignore these boundaries.
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
nsresult rv = NS_NewFrameTraversal(
getter_AddRefs(frameTraversal), presContext, startFrame, ePreOrder,
false, // aVisual
false, // aLockInScrollView
true, // aFollowOOFs
aForDocumentNavigation // aSkipPopupChecks
);
NS_ENSURE_SUCCESS(rv, rv);
if (frame) {
// For tab navigation, pass false for aSkipPopupChecks so that we don't
// iterate into or out of a popup. For document naviation pass true to
// ignore these boundaries.
nsresult rv = NS_NewFrameTraversal(
getter_AddRefs(frameTraversal), presContext, frame, ePreOrder,
false, // aVisual
false, // aLockInScrollView
true, // aFollowOOFs
aForDocumentNavigation // aSkipPopupChecks
);
NS_ENSURE_SUCCESS(rv, rv);
if (iterStartContent == aRootContent) {
if (!aForward) {
frameTraversal->Last();
} else if (aRootContent->IsFocusable()) {
frameTraversal->Next();
if (iterStartContent == aRootContent) {
if (!aForward) {
frameTraversal->Last();
} else if (aRootContent->IsFocusable()) {
frameTraversal->Next();
}
frame = static_cast<nsIFrame*>(frameTraversal->CurrentItem());
} else if (getNextFrame &&
(!iterStartContent ||
!iterStartContent->IsHTMLElement(nsGkAtoms::area))) {
// Need to do special check in case we're in an imagemap which has
// multiple content nodes per frame, so don't skip over the starting
// frame.
if (aForward) {
frameTraversal->Next();
} else {
frameTraversal->Prev();
}
frame = static_cast<nsIFrame*>(frameTraversal->CurrentItem());
}
} else if (getNextFrame &&
(!iterStartContent ||
!iterStartContent->IsHTMLElement(nsGkAtoms::area))) {
// Need to do special check in case we're in an imagemap which has
// multiple content nodes per frame, so don't skip over the starting
// frame.
if (aForward)
frameTraversal->Next();
else
frameTraversal->Prev();
}
// Walk frames to find something tabbable matching mCurrentTabIndex
nsIFrame* frame = static_cast<nsIFrame*>(frameTraversal->CurrentItem());
// Walk frames to find something tabbable matching aCurrentTabIndex
while (frame) {
// Try to find the topmost Shadow DOM host, since we want to
// skip Shadow DOM in frame traversal.
@ -3339,9 +3362,9 @@ nsresult nsFocusManager::GetNextTabbableContent(
// and root content, so that we only find content within the panel.
// Note also that we pass false for aForDocumentNavigation since we
// want to locate the first content, not the first document.
rv = GetNextTabbableContent(aPresShell, currentContent, nullptr,
currentContent, true, 1, false, false,
aResultContent);
nsresult rv = GetNextTabbableContent(
aPresShell, currentContent, nullptr, currentContent, true, 1,
false, false, aResultContent);
if (NS_SUCCEEDED(rv) && *aResultContent) {
return rv;
}

Просмотреть файл

@ -244,6 +244,19 @@
var shadowInput2 = sr0.getElementById("shadowInput2");
shadowInput2.onfocus = focusLogger;
var host1 = document.createElement("div");
host1.id = "host";
host1.tabIndex = 0;
host1.setAttribute("style", "display: contents; border: 1px solid black;");
document.body.appendChild(host1);
var sr1 = host1.attachShadow({mode: "open"});
sr1.innerHTML = "<input id='shadowInput1'><input id='shadowInput2'>";
var shadowInput3 = sr1.getElementById("shadowInput1");
shadowInput3.onfocus = focusLogger;
var shadowInput4 = sr1.getElementById("shadowInput2");
shadowInput4.onfocus = focusLogger;
document.body.offsetLeft;
synthesizeKey("KEY_Tab");
@ -252,15 +265,28 @@
synthesizeKey("KEY_Tab");
opener.is(lastFocusTarget, shadowInput2, "Should have focused input element. (2)");
synthesizeKey("KEY_Tab");
opener.is(lastFocusTarget, shadowInput3, "Should have focused input element. (3)");
synthesizeKey("KEY_Tab");
opener.is(lastFocusTarget, shadowInput4, "Should have focused input element. (4)");
// Backwards
synthesizeKey("KEY_Tab", {shiftKey: true});
opener.is(lastFocusTarget, shadowInput1, "Should have focused input element. (3)");
opener.is(lastFocusTarget, shadowInput3, "Should have focused input element. (5)");
synthesizeKey("KEY_Tab", {shiftKey: true});
opener.is(lastFocusTarget, shadowInput2, "Should have focused input element. (6)");
synthesizeKey("KEY_Tab", {shiftKey: true});
opener.is(lastFocusTarget, shadowInput1, "Should have focused input element. (7)");
// Back to beginning, outside of Shadow DOM.
synthesizeKey("KEY_Tab", {shiftKey: true});
opener.is(document.activeElement, document.body.firstChild, "body's first child should have focus. (2)");
host.remove();
host1.remove();
}
function testTabbingThroughLightDOMShadowDOMLightDOM() {

Просмотреть файл

@ -159,11 +159,11 @@ class BackgroundMutableFileParentBase : public PBackgroundMutableFileParent {
PBackgroundFileHandleParent* aActor, const FileMode& aMode) override;
virtual bool DeallocPBackgroundFileHandleParent(
PBackgroundFileHandleParent* aActor) override;
PBackgroundFileHandleParent* aActor) final;
virtual mozilla::ipc::IPCResult RecvDeleteMe() override;
mozilla::ipc::IPCResult RecvDeleteMe() final;
virtual mozilla::ipc::IPCResult RecvGetFileId(int64_t* aFileId) override;
mozilla::ipc::IPCResult RecvGetFileId(int64_t* aFileId) override;
};
} // namespace dom

Просмотреть файл

@ -154,7 +154,7 @@ class FileSystemTaskChildBase : public PFileSystemRequestChild {
// Overrides PFileSystemRequestChild
virtual mozilla::ipc::IPCResult Recv__delete__(
const FileSystemResponseValue& value) override;
const FileSystemResponseValue& value) final;
nsresult mErrorValue;
RefPtr<FileSystemBase> mFileSystem;

Просмотреть файл

@ -3544,6 +3544,8 @@ mozilla::ipc::IPCResult BackgroundCursorChild::RecvResponse(
RefPtr<IDBCursor> cursor;
mStrongCursor.swap(cursor);
RefPtr<IDBTransaction> transaction = mTransaction;
switch (aResponse.type()) {
case CursorResponse::Tnsresult:
HandleResponse(aResponse.get_nsresult());
@ -3573,7 +3575,7 @@ mozilla::ipc::IPCResult BackgroundCursorChild::RecvResponse(
MOZ_CRASH("Should never get here!");
}
mTransaction->OnRequestFinished(/* aActorDestroyedNormally */ true);
transaction->OnRequestFinished(/* aActorDestroyedNormally */ true);
return IPC_OK();
}

Просмотреть файл

@ -6423,12 +6423,12 @@ class MutableFile : public BackgroundMutableFileParentBase {
~MutableFile() override;
PBackgroundFileHandleParent* AllocPBackgroundFileHandleParent(
const FileMode& aMode) override;
const FileMode& aMode) final;
mozilla::ipc::IPCResult RecvPBackgroundFileHandleConstructor(
PBackgroundFileHandleParent* aActor, const FileMode& aMode) override;
PBackgroundFileHandleParent* aActor, const FileMode& aMode) final;
mozilla::ipc::IPCResult RecvGetFileId(int64_t* aFileId) override;
mozilla::ipc::IPCResult RecvGetFileId(int64_t* aFileId) final;
};
class FactoryOp : public DatabaseOperationBase,
@ -6617,7 +6617,7 @@ class FactoryOp : public DatabaseOperationBase,
// IPDL methods.
void ActorDestroy(ActorDestroyReason aWhy) override;
mozilla::ipc::IPCResult RecvPermissionRetry() override;
mozilla::ipc::IPCResult RecvPermissionRetry() final;
virtual void SendBlockedNotification() = 0;
@ -7115,7 +7115,7 @@ class NormalTransactionOp : public TransactionDatabaseOperationBase,
void ActorDestroy(ActorDestroyReason aWhy) override;
mozilla::ipc::IPCResult RecvContinue(
const PreprocessResponse& aResponse) override;
const PreprocessResponse& aResponse) final;
};
class ObjectStoreAddOrPutRequestOp final : public NormalTransactionOp {

Просмотреть файл

@ -1964,9 +1964,9 @@ class LSRequestBase : public DatastoreOperationBase,
void ActorDestroy(ActorDestroyReason aWhy) override;
private:
mozilla::ipc::IPCResult RecvCancel() override;
mozilla::ipc::IPCResult RecvCancel() final;
mozilla::ipc::IPCResult RecvFinish() override;
mozilla::ipc::IPCResult RecvFinish() final;
};
class PrepareDatastoreOp : public LSRequestBase, public OpenDirectoryListener {

Просмотреть файл

@ -592,7 +592,9 @@ int32_t DesktopCaptureImpl::StartCapture(
const VideoCaptureCapability& capability) {
_requestedCapability = capability;
#if defined(_WIN32)
uint32_t maxFPSNeeded = 1000 / _requestedCapability.maxFPS;
uint32_t maxFPSNeeded = _requestedCapability.maxFPS > 0
? 1000 / _requestedCapability.maxFPS
: 1000;
capturer_thread_->RequestCallbackTimer(maxFPSNeeded);
#endif
@ -674,7 +676,9 @@ void DesktopCaptureImpl::process() {
((uint32_t)(rtc::TimeNanos() - startProcessTime)) /
rtc::kNumNanosecsPerMillisec;
// Use at most x% CPU or limit framerate
const uint32_t maxFPSNeeded = 1000 / _requestedCapability.maxFPS;
const uint32_t maxFPSNeeded = _requestedCapability.maxFPS > 0
? 1000 / _requestedCapability.maxFPS
: 1000;
const float sleepTimeFactor = (100.0f / kMaxDesktopCaptureCpuUsage) - 1.0f;
const uint32_t sleepTime = sleepTimeFactor * processTime;
time_event_->Wait(std::max<uint32_t>(maxFPSNeeded, sleepTime));

Просмотреть файл

@ -1,4 +1,6 @@
[DEFAULT]
prefs =
dom.payments.request.enabled=true
# skip-if !e10s will be removed once non-e10s is supported
skip-if = !e10s || !nightly_build
support-files =

Просмотреть файл

@ -1,4 +1,6 @@
[DEFAULT]
prefs =
dom.payments.request.enabled=true
# skip-if !e10s will be removed once non-e10s is supported
skip-if = !e10s || !nightly_build
scheme = https

Просмотреть файл

@ -989,7 +989,7 @@ class QuotaUsageRequestBase : public NormalOriginOperationBase,
// IPDL methods.
void ActorDestroy(ActorDestroyReason aWhy) override;
mozilla::ipc::IPCResult RecvCancel() override;
mozilla::ipc::IPCResult RecvCancel() final;
};
class GetUsageOp final : public QuotaUsageRequestBase {

Просмотреть файл

@ -666,7 +666,7 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MediaStreamTrack", insecureContext: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MerchantValidationEvent", insecureContext: false, desktop: true, nightly: true, linux: false},
{name: "MerchantValidationEvent", insecureContext: false, desktop: true, nightly: true, linux: false, disabled: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MessageChannel", insecureContext: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -748,15 +748,15 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "Path2D", insecureContext: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "PaymentAddress", insecureContext: false, desktop: true, nightly: true, linux: false},
{name: "PaymentAddress", insecureContext: false, desktop: true, nightly: true, linux: false, disabled: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "PaymentMethodChangeEvent", insecureContext: false, desktop: true, nightly: true, linux: false},
{name: "PaymentMethodChangeEvent", insecureContext: false, desktop: true, nightly: true, linux: false, disabled: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "PaymentRequest", insecureContext: false, desktop: true, nightly: true, linux: false},
{name: "PaymentRequest", insecureContext: false, desktop: true, nightly: true, linux: false, disabled: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "PaymentRequestUpdateEvent", insecureContext: false, desktop: true, nightly: true, linux: false},
{name: "PaymentRequestUpdateEvent", insecureContext: false, desktop: true, nightly: true, linux: false, disabled: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "PaymentResponse", insecureContext: false, desktop: true, nightly: true, linux: false},
{name: "PaymentResponse", insecureContext: false, desktop: true, nightly: true, linux: false, disabled: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "Performance", insecureContext: true},
// IMPORTANT: Do not change this list without review from a DOM peer!

Просмотреть файл

@ -31,7 +31,7 @@ class ParentActor : public Protocol {
// Override this rather than ActorDestroy
virtual void Destroy() {}
virtual mozilla::ipc::IPCResult RecvDestroy() override {
mozilla::ipc::IPCResult RecvDestroy() final {
DestroyIfNeeded();
Unused << Protocol::Send__delete__(this);
return IPC_OK();

Просмотреть файл

@ -86,7 +86,7 @@ class TextureParent : public ParentActor<PTextureParent> {
void NotifyNotUsed(uint64_t aTransactionId);
virtual mozilla::ipc::IPCResult RecvRecycleTexture(
const TextureFlags& aTextureFlags) override;
const TextureFlags& aTextureFlags) final;
TextureHost* GetTextureHost() { return mTextureHost; }

Просмотреть файл

@ -1 +1 @@
75ab41278fe7e24c45b22fa1af6879801d6f8ebc
57379d1fec269ea70cbab28d4353614fd9c58122

Просмотреть файл

@ -1325,7 +1325,14 @@ impl<'a> DisplayListFlattener<'a> {
parent_sc,
self.clip_scroll_tree,
) {
parent_sc.primitives.extend(stacking_context.primitives);
// If the parent context primitives list is empty, it's faster
// to assign the storage of the popped context instead of paying
// the copying cost for extend.
if parent_sc.primitives.is_empty() {
parent_sc.primitives = stacking_context.primitives;
} else {
parent_sc.primitives.extend(stacking_context.primitives);
}
return;
}
}

Просмотреть файл

@ -308,16 +308,26 @@ class JS_PUBLIC_API Dispatchable {
};
/**
* DispatchToEventLoopCallback may be called from any thread, being passed the
* same 'closure' passed to InitDispatchToEventLoop() and Dispatchable from the
* same JSRuntime. If the embedding returns 'true', the embedding must call
* Dispatchable::run() on an active JSContext thread for the same JSRuntime on
* which 'closure' was registered. If DispatchToEventLoopCallback returns
* 'false', SpiderMonkey will assume a shutdown of the JSRuntime is in progress.
* This contract implies that, by the time the final JSContext is destroyed in
* the JSRuntime, the embedding must have (1) run all Dispatchables for which
* DispatchToEventLoopCallback returned true, (2) already started returning
* false from calls to DispatchToEventLoopCallback.
* Callback to dispatch a JS::Dispatchable to a JSContext's thread's event loop.
*
* The DispatchToEventLoopCallback set on a particular JSContext must accept
* JS::Dispatchable instances and arrange for their `run` methods to be called
* eventually on the JSContext's thread. This is used for cross-thread dispatch,
* so the callback itself must be safe to call from any thread.
*
* If the callback returns `true`, it must eventually run the given
* Dispatchable; otherwise, SpiderMonkey may leak memory or hang.
*
* The callback may return `false` to indicate that the JSContext's thread is
* shutting down and is no longer accepting runnables. Shutting down is a
* one-way transition: once the callback has rejected a runnable, it must reject
* all subsequently submitted runnables as well.
*
* To establish a DispatchToEventLoopCallback, the embedding may either call
* InitDispatchToEventLoop to provide its own, or call js::UseInternalJobQueues
* to select a default implementation built into SpiderMonkey. This latter
* depends on the embedding to call js::RunJobs on the JavaScript thread to
* process queued Dispatchables at appropriate times.
*/
typedef bool (*DispatchToEventLoopCallback)(void* closure,

Просмотреть файл

@ -4969,12 +4969,11 @@ void OffThreadPromiseTask::dispatchResolveAndDestroy() {
return;
}
// We assume, by interface contract, that if the dispatch fails, it's
// because the embedding is in the process of shutting down the JSRuntime.
// Since JSRuntime destruction calls shutdown(), we can rely on shutdown()
// to delete the task on its active JSContext thread. shutdown() waits for
// numCanceled_ == live_.length, so we notify when this condition is
// reached.
// The DispatchToEventLoopCallback has rejected this task, indicating that
// shutdown has begun. Count the number of rejected tasks that have called
// dispatchResolveAndDestroy, and when they account for the entire contents of
// live_, notify OffThreadPromiseRuntimeState::shutdown that it is safe to
// destruct them.
LockGuard<Mutex> lock(state.mutex_);
state.numCanceled_++;
if (state.numCanceled_ == state.live_.count()) {
@ -5105,8 +5104,22 @@ void OffThreadPromiseRuntimeState::shutdown(JSContext* cx) {
}
{
// Wait until all live OffThreadPromiseRuntimeState have been confirmed
// canceled by OffThreadPromiseTask::dispatchResolve().
// An OffThreadPromiseTask may only be safely deleted on its JSContext's
// thread (since it contains a PersistentRooted holding its promise), and
// only after it has called dispatchResolveAndDestroy (since that is our
// only indication that its owner is done writing into it).
//
// OffThreadPromiseTasks accepted by the DispatchToEventLoopCallback are
// deleted by their 'run' methods. Only dispatchResolveAndDestroy invokes
// the callback, and the point of the callback is to call 'run' on the
// JSContext's thread, so the conditions above are met.
//
// But although the embedding's DispatchToEventLoopCallback promises to run
// every task it accepts before shutdown, when shutdown does begin it starts
// rejecting tasks; we cannot count on 'run' to clean those up for us.
// Instead, dispatchResolveAndDestroy keeps a count of rejected ('canceled')
// tasks; once that count covers everything in live_, this function itself
// runs only on the JSContext's thread, so we can delete them all here.
LockGuard<Mutex> lock(mutex_);
while (live_.count() != numCanceled_) {
MOZ_ASSERT(numCanceled_ < live_.count());
@ -5114,13 +5127,14 @@ void OffThreadPromiseRuntimeState::shutdown(JSContext* cx) {
}
}
// Now that all the tasks have stopped concurrent execution, we can just
// delete everything. We don't want each OffThreadPromiseTask to unregister
// itself (which would mutate live_ while we are iterating over it) so reset
// the tasks' internal registered_ flag.
// Now that live_ contains only cancelled tasks, we can just delete
// everything.
for (OffThreadPromiseTaskSet::Range r = live_.all(); !r.empty();
r.popFront()) {
OffThreadPromiseTask* task = r.front();
// We don't want 'task' to unregister itself (which would mutate live_ while
// we are iterating over it) so reset its internal registered_ flag.
MOZ_ASSERT(task->registered_);
task->registered_ = false;
js_delete(task);

Просмотреть файл

@ -419,13 +419,70 @@ class MOZ_NON_TEMPORARY_CLASS PromiseLookup final {
}
};
// An OffThreadPromiseTask holds a rooted Promise JSObject while executing an
// off-thread task (defined by the subclass) that needs to resolve the Promise
// on completion. Because OffThreadPromiseTask contains a PersistentRooted, it
// must be destroyed on an active JSContext thread of the Promise's JSRuntime.
// OffThreadPromiseTasks may be run off-thread in various ways (e.g., see
// PromiseHelperTask). At any time, the task can be dispatched to an active
// JSContext of the Promise's JSRuntime by calling dispatchResolve().
// [SMDOC] OffThreadPromiseTask: an off-main-thread task that resolves a promise
//
// An OffThreadPromiseTask is an abstract base class holding a JavaScript
// promise that will be resolved (fulfilled or rejected) with the results of a
// task possibly performed by some other thread.
//
// An OffThreadPromiseTask's lifecycle is as follows:
//
// - Some JavaScript native wishes to return a promise of the result of some
// computation that might be performed by other threads (say, helper threads
// or the embedding's I/O threads), so it creates a PromiseObject to represent
// the result, and an OffThreadPromiseTask referring to it. After handing the
// OffThreadPromiseTask to the code doing the actual work, the native is free
// to return the PromiseObject to its caller.
//
// - When the computation is done, successfully or otherwise, it populates the
// OffThreadPromiseTask—which is actually an instance of some concrete
// subclass specific to the task—with the information needed to resolve the
// promise, and calls OffThreadPromiseTask::dispatchResolveAndDestroy. This
// enqueues a runnable on the JavaScript thread to which the promise belongs.
//
// - When it gets around to the runnable, the JavaScript thread calls the
// OffThreadPromiseTask's `resolve` method, which the concrete subclass has
// overriden to resolve the promise appropriately. This probably enqueues a
// promise reaction job.
//
// - The JavaScript thread then deletes the OffThreadPromiseTask.
//
// During shutdown, the process is slightly different. Enqueuing runnables to
// the JavaScript thread begins to fail. JSRuntime shutdown waits for all
// outstanding tasks to call dispatchResolveAndDestroy, and then deletes them on
// the main thread, without calling `resolve`.
//
// For example, the JavaScript function WebAssembly.compile uses
// OffThreadPromiseTask to manage the result of a helper thread task, accepting
// binary WebAssembly code and returning a promise of a compiled
// WebAssembly.Module. It would like to do this compilation work on a helper
// thread. When called by JavaScript, WebAssembly.compile creates a promise,
// builds a CompileBufferTask (the OffThreadPromiseTask concrete subclass) to
// keep track of it, and then hands that to a helper thread. When the helper
// thread is done, successfully or otherwise, it calls the CompileBufferTask's
// dispatchResolveAndDestroy method, which enqueues a runnable to the JavaScript
// thread to resolve the promise and delete the CompileBufferTask.
// (CompileBufferTask actually implements PromiseHelperTask, which implements
// OffThreadPromiseTask; PromiseHelperTask is what our helper thread scheduler
// requires.)
//
// OffThreadPromiseTasks are not limited to use with helper threads. For
// example, a function returning a promise of the result of a network operation
// could provide the code collecting the incoming data with an
// OffThreadPromiseTask for the promise, and let the embedding's network I/O
// threads call dispatchResolveAndDestroy.
//
// An OffThreadPromiseTask has a JSContext, and must be constructed and have its
// 'init' method called on that JSContext's thread. Once initialized, its
// dispatchResolveAndDestroy method may be called from any thread. This is the
// only safe way to destruct an OffThreadPromiseTask; doing so ensures the
// OffThreadPromiseTask's destructor will run on the JSContext's thread, either
// from the event loop or during shutdown.
//
// OffThreadPromiseTask::dispatchResolveAndDestroy uses the
// JS::DispatchToEventLoopCallback provided by the embedding to enqueue
// runnables on the JavaScript thread. See the comments for
// DispatchToEventLoopCallback for details.
class OffThreadPromiseTask : public JS::Dispatchable {
friend class OffThreadPromiseRuntimeState;

Просмотреть файл

@ -519,10 +519,22 @@ void CancelOffThreadWasmTier2Generator();
* If helper threads are available, call execute() then dispatchResolve() on the
* given task in a helper thread. If no helper threads are available, the given
* task is executed and resolved synchronously.
*
* This function takes ownership of task unconditionally; if it fails, task is
* deleted.
*/
bool StartOffThreadPromiseHelperTask(JSContext* cx,
UniquePtr<PromiseHelperTask> task);
/*
* Like the JSContext-accepting version, but only safe to use when helper
* threads are available, so we can be sure we'll never need to fall back on
* synchronous execution.
*
* This function can be called from any thread, but takes ownership of the task
* only on success. On OOM, it is the caller's responsibility to arrange for the
* task to be cleaned up properly.
*/
bool StartOffThreadPromiseHelperTask(PromiseHelperTask* task);
/*
@ -838,8 +850,13 @@ class SourceCompressionTask {
};
// A PromiseHelperTask is an OffThreadPromiseTask that executes a single job on
// a helper thread. Derived classes do their helper-thread work by implementing
// execute().
// a helper thread. Call js::StartOffThreadPromiseHelperTask to submit a
// PromiseHelperTask for execution.
//
// Concrete subclasses must implement execute and OffThreadPromiseTask::resolve.
// The helper thread will call execute() to do the main work. Then, the thread
// of the JSContext used to create the PromiseHelperTask will call resolve() to
// resolve promise according to those results.
struct PromiseHelperTask : OffThreadPromiseTask {
PromiseHelperTask(JSContext* cx, Handle<PromiseObject*> promise)
: OffThreadPromiseTask(cx, promise) {}

Просмотреть файл

@ -8,22 +8,16 @@ package org.mozilla.geckoview {
}
@android.support.annotation.UiThread public class BasicSelectionActionDelegate implements android.view.ActionMode.Callback org.mozilla.geckoview.GeckoSession.SelectionActionDelegate {
ctor public BasicSelectionActionDelegate(android.app.Activity);
ctor public BasicSelectionActionDelegate(android.app.Activity, boolean);
ctor public BasicSelectionActionDelegate(@android.support.annotation.NonNull android.app.Activity);
ctor public BasicSelectionActionDelegate(@android.support.annotation.NonNull android.app.Activity, boolean);
method public boolean areExternalActionsEnabled();
method public void enableExternalActions(boolean);
method public boolean onActionItemClicked(android.view.ActionMode, android.view.MenuItem);
method public boolean onCreateActionMode(android.view.ActionMode, android.view.Menu);
method public void onDestroyActionMode(android.view.ActionMode);
method public void onGetContentRect(android.view.ActionMode, android.view.View, android.graphics.Rect);
method public void onHideAction(org.mozilla.geckoview.GeckoSession, int);
method public boolean onPrepareActionMode(android.view.ActionMode, android.view.Menu);
method public void onShowActionRequest(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.GeckoSession.SelectionActionDelegate.Selection, java.lang.String[], org.mozilla.geckoview.GeckoResponse<java.lang.String>);
method public void onGetContentRect(@android.support.annotation.Nullable android.view.ActionMode, @android.support.annotation.Nullable android.view.View, @android.support.annotation.NonNull android.graphics.Rect);
method protected void clearSelection();
method protected java.lang.String[] getAllActions();
method protected boolean isActionAvailable(java.lang.String);
method protected boolean performAction(java.lang.String, android.view.MenuItem);
method protected void prepareAction(java.lang.String, android.view.MenuItem);
method @android.support.annotation.NonNull protected java.lang.String[] getAllActions();
method protected boolean isActionAvailable(@android.support.annotation.NonNull java.lang.String);
method protected boolean performAction(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.NonNull android.view.MenuItem);
method protected void prepareAction(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.NonNull android.view.MenuItem);
field protected static final java.lang.String ACTION_PROCESS_TEXT = "android.intent.action.PROCESS_TEXT";
field protected android.view.ActionMode mActionMode;
field protected java.util.List<java.lang.String> mActions;
@ -38,35 +32,35 @@ package org.mozilla.geckoview {
}
@android.support.annotation.UiThread public final class CompositorController {
method public void addDrawCallback(java.lang.Runnable);
method public void addDrawCallback(@android.support.annotation.NonNull java.lang.Runnable);
method public int getClearColor();
method public java.lang.Runnable getFirstPaintCallback();
method public void getPixels(org.mozilla.geckoview.CompositorController.GetPixelsCallback);
method public void removeDrawCallback(java.lang.Runnable);
method @android.support.annotation.Nullable public java.lang.Runnable getFirstPaintCallback();
method public void getPixels(@android.support.annotation.NonNull org.mozilla.geckoview.CompositorController.GetPixelsCallback);
method public void removeDrawCallback(@android.support.annotation.NonNull java.lang.Runnable);
method public void setClearColor(int);
method public void setFirstPaintCallback(java.lang.Runnable);
method public void setFirstPaintCallback(@android.support.annotation.Nullable java.lang.Runnable);
}
public static interface CompositorController.GetPixelsCallback {
method @android.support.annotation.UiThread public void onPixelsResult(int, int, java.nio.IntBuffer);
method @android.support.annotation.UiThread public void onPixelsResult(int, int, @android.support.annotation.Nullable java.nio.IntBuffer);
}
public class CrashReporter {
ctor public CrashReporter();
method @android.support.annotation.AnyThread public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(android.content.Context, android.content.Intent, java.lang.String);
method @android.support.annotation.AnyThread public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(android.content.Context, android.os.Bundle, java.lang.String);
method @android.support.annotation.AnyThread public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(android.content.Context, java.io.File, java.io.File, boolean, java.lang.String);
method @android.support.annotation.AnyThread public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(android.content.Context, java.io.File, java.util.Map<java.lang.String,java.lang.String>, boolean, java.lang.String);
method @android.support.annotation.AnyThread public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(@android.support.annotation.NonNull android.content.Context, @android.support.annotation.NonNull android.content.Intent, @android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(@android.support.annotation.NonNull android.content.Context, @android.support.annotation.NonNull android.os.Bundle, @android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(@android.support.annotation.NonNull android.content.Context, @android.support.annotation.NonNull java.io.File, @android.support.annotation.NonNull java.io.File, boolean, @android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public static org.mozilla.geckoview.GeckoResult<java.lang.String> sendCrashReport(@android.support.annotation.NonNull android.content.Context, @android.support.annotation.NonNull java.io.File, @android.support.annotation.NonNull java.util.Map<java.lang.String,java.lang.String>, boolean, @android.support.annotation.NonNull java.lang.String);
}
@android.support.annotation.UiThread public final class DynamicToolbarAnimator {
method public org.mozilla.geckoview.DynamicToolbarAnimator.ToolbarChromeProxy getToolbarChromeProxy();
method @android.support.annotation.Nullable public org.mozilla.geckoview.DynamicToolbarAnimator.ToolbarChromeProxy getToolbarChromeProxy();
method public void hideToolbar(boolean);
method public boolean isPinned();
method public boolean isPinnedBy(org.mozilla.geckoview.DynamicToolbarAnimator.PinReason);
method public boolean isPinnedBy(@android.support.annotation.NonNull org.mozilla.geckoview.DynamicToolbarAnimator.PinReason);
method public void setMaxToolbarHeight(int);
method public void setPinned(boolean, org.mozilla.geckoview.DynamicToolbarAnimator.PinReason);
method public void setToolbarChromeProxy(org.mozilla.geckoview.DynamicToolbarAnimator.ToolbarChromeProxy);
method public void setPinned(boolean, @android.support.annotation.NonNull org.mozilla.geckoview.DynamicToolbarAnimator.PinReason);
method public void setToolbarChromeProxy(@android.support.annotation.Nullable org.mozilla.geckoview.DynamicToolbarAnimator.ToolbarChromeProxy);
method public void showToolbar(boolean);
}
@ -84,7 +78,7 @@ package org.mozilla.geckoview {
}
public static interface DynamicToolbarAnimator.ToolbarChromeProxy {
method @android.support.annotation.UiThread public android.graphics.Bitmap getBitmapOfToolbarChrome();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public android.graphics.Bitmap getBitmapOfToolbarChrome();
method @android.support.annotation.UiThread public boolean isToolbarChromeVisible();
method @android.support.annotation.UiThread public void toggleToolbarChrome(boolean);
}
@ -93,42 +87,40 @@ package org.mozilla.geckoview {
ctor protected GeckoDisplay(org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void screenOriginChanged(int, int);
method @android.support.annotation.UiThread public boolean shouldPinOnScreen();
method @android.support.annotation.UiThread public void surfaceChanged(android.view.Surface, int, int);
method @android.support.annotation.UiThread public void surfaceChanged(android.view.Surface, int, int, int, int);
method @android.support.annotation.UiThread public void surfaceChanged(@android.support.annotation.NonNull android.view.Surface, int, int);
method @android.support.annotation.UiThread public void surfaceChanged(@android.support.annotation.NonNull android.view.Surface, int, int, int, int);
method @android.support.annotation.UiThread public void surfaceDestroyed();
}
public interface GeckoResponse<T> {
method @android.support.annotation.AnyThread public void respond(T);
method @android.support.annotation.AnyThread public void respond(@android.support.annotation.Nullable T);
}
@android.support.annotation.AnyThread public class GeckoResult<T> {
ctor public GeckoResult();
ctor public GeckoResult(android.os.Handler);
ctor public GeckoResult(org.mozilla.geckoview.GeckoResult<T>);
method public synchronized void complete(T);
method public synchronized void completeExceptionally(java.lang.Throwable);
method public synchronized boolean equals(java.lang.Object);
method public <U> org.mozilla.geckoview.GeckoResult<U> exceptionally(org.mozilla.geckoview.GeckoResult.OnExceptionListener<U>);
method public static <T> org.mozilla.geckoview.GeckoResult<T> fromException(java.lang.Throwable);
method public static <U> org.mozilla.geckoview.GeckoResult<U> fromValue(U);
method public android.os.Looper getLooper();
method public synchronized int hashCode();
method public synchronized T poll();
method public synchronized T poll(long);
method public <U> org.mozilla.geckoview.GeckoResult<U> then(org.mozilla.geckoview.GeckoResult.OnValueListener<T,U>);
method public <U> org.mozilla.geckoview.GeckoResult<U> then(org.mozilla.geckoview.GeckoResult.OnValueListener<T,U>, org.mozilla.geckoview.GeckoResult.OnExceptionListener<U>);
method public org.mozilla.geckoview.GeckoResult<T> withHandler(android.os.Handler);
method public synchronized void complete(@android.support.annotation.Nullable T);
method public synchronized void completeExceptionally(@android.support.annotation.NonNull java.lang.Throwable);
method @android.support.annotation.NonNull public <U> org.mozilla.geckoview.GeckoResult<U> exceptionally(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoResult.OnExceptionListener<U>);
method @android.support.annotation.NonNull public static <T> org.mozilla.geckoview.GeckoResult<T> fromException(@android.support.annotation.NonNull java.lang.Throwable);
method @android.support.annotation.NonNull public static <U> org.mozilla.geckoview.GeckoResult<U> fromValue(@android.support.annotation.Nullable U);
method @android.support.annotation.Nullable public android.os.Looper getLooper();
method @android.support.annotation.Nullable public synchronized T poll();
method @android.support.annotation.Nullable public synchronized T poll(long);
method @android.support.annotation.NonNull public <U> org.mozilla.geckoview.GeckoResult<U> then(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoResult.OnValueListener<T,U>);
method @android.support.annotation.NonNull public <U> org.mozilla.geckoview.GeckoResult<U> then(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoResult.OnValueListener<T,U>, @android.support.annotation.Nullable org.mozilla.geckoview.GeckoResult.OnExceptionListener<U>);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoResult<T> withHandler(@android.support.annotation.Nullable android.os.Handler);
field public static final org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.AllowOrDeny> ALLOW;
field public static final org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.AllowOrDeny> DENY;
}
public static interface GeckoResult.OnExceptionListener<V> {
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoResult<V> onException(java.lang.Throwable);
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoResult<V> onException(@android.support.annotation.NonNull java.lang.Throwable);
}
public static interface GeckoResult.OnValueListener<T,U> {
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoResult<U> onValue(T);
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoResult<U> onValue(@android.support.annotation.Nullable T);
}
public static final class GeckoResult.UncaughtException extends java.lang.RuntimeException {
@ -137,21 +129,19 @@ package org.mozilla.geckoview {
public final class GeckoRuntime implements android.os.Parcelable {
ctor public GeckoRuntime();
method @android.support.annotation.UiThread public void attachTo(android.content.Context);
method @android.support.annotation.UiThread public static org.mozilla.geckoview.GeckoRuntime create(android.content.Context);
method @android.support.annotation.UiThread public static org.mozilla.geckoview.GeckoRuntime create(android.content.Context, org.mozilla.geckoview.GeckoRuntimeSettings);
method @android.support.annotation.AnyThread public int describeContents();
method @android.support.annotation.UiThread public static synchronized org.mozilla.geckoview.GeckoRuntime getDefault(android.content.Context);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoRuntime.Delegate getDelegate();
method @android.support.annotation.UiThread public java.io.File getProfileDir();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoRuntimeSettings getSettings();
method @android.support.annotation.UiThread public org.mozilla.geckoview.RuntimeTelemetry getTelemetry();
method @android.support.annotation.UiThread public void attachTo(@android.support.annotation.NonNull android.content.Context);
method @android.support.annotation.UiThread @android.support.annotation.NonNull public static org.mozilla.geckoview.GeckoRuntime create(@android.support.annotation.NonNull android.content.Context);
method @android.support.annotation.UiThread @android.support.annotation.NonNull public static org.mozilla.geckoview.GeckoRuntime create(@android.support.annotation.NonNull android.content.Context, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoRuntimeSettings);
method @android.support.annotation.UiThread @android.support.annotation.NonNull public static synchronized org.mozilla.geckoview.GeckoRuntime getDefault(@android.support.annotation.NonNull android.content.Context);
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoRuntime.Delegate getDelegate();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public java.io.File getProfileDir();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoRuntimeSettings getSettings();
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.RuntimeTelemetry getTelemetry();
method @android.support.annotation.UiThread public void orientationChanged();
method @android.support.annotation.UiThread public void orientationChanged(int);
method @android.support.annotation.AnyThread public void readFromParcel(android.os.Parcel);
method @android.support.annotation.UiThread public void setDelegate(org.mozilla.geckoview.GeckoRuntime.Delegate);
method @android.support.annotation.AnyThread public void readFromParcel(@android.support.annotation.NonNull android.os.Parcel);
method @android.support.annotation.UiThread public void setDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoRuntime.Delegate);
method @android.support.annotation.AnyThread public void shutdown();
method @android.support.annotation.AnyThread public void writeToParcel(android.os.Parcel, int);
field public static final java.lang.String ACTION_CRASHED = "org.mozilla.gecko.ACTION_CRASHED";
field public static final android.os.Parcelable.Creator<org.mozilla.geckoview.GeckoRuntime> CREATOR;
field public static final java.lang.String EXTRA_CRASH_FATAL = "fatal";
@ -165,38 +155,36 @@ package org.mozilla.geckoview {
}
@android.support.annotation.AnyThread public final class GeckoRuntimeSettings implements android.os.Parcelable {
method public int describeContents();
method public java.lang.String[] getArguments();
method @android.support.annotation.NonNull public java.lang.String[] getArguments();
method public boolean getBlockMalware();
method public boolean getBlockPhishing();
method public boolean getConsoleOutputEnabled();
method public int getCookieBehavior();
method public int getCookieLifetime();
method public java.lang.Class<?> getCrashHandler();
method public java.lang.Float getDisplayDensityOverride();
method public java.lang.Integer getDisplayDpiOverride();
method public android.os.Bundle getExtras();
method @android.support.annotation.Nullable public java.lang.Class<?> getCrashHandler();
method @android.support.annotation.Nullable public java.lang.Float getDisplayDensityOverride();
method @android.support.annotation.Nullable public java.lang.Integer getDisplayDpiOverride();
method @android.support.annotation.NonNull public android.os.Bundle getExtras();
method public boolean getJavaScriptEnabled();
method public java.lang.String[] getLocales();
method @android.support.annotation.Nullable public java.lang.String[] getLocales();
method public boolean getPauseForDebuggerEnabled();
method public boolean getRemoteDebuggingEnabled();
method public android.graphics.Rect getScreenSizeOverride();
method @android.support.annotation.Nullable public android.graphics.Rect getScreenSizeOverride();
method public int getTrackingProtectionCategories();
method public boolean getUseContentProcessHint();
method public boolean getUseMaxScreenDepth();
method public boolean getWebFontsEnabled();
method public void readFromParcel(android.os.Parcel);
method public org.mozilla.geckoview.GeckoRuntimeSettings setBlockMalware(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings setBlockPhishing(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings setConsoleOutputEnabled(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings setCookieBehavior(int);
method public org.mozilla.geckoview.GeckoRuntimeSettings setCookieLifetime(int);
method public org.mozilla.geckoview.GeckoRuntimeSettings setJavaScriptEnabled(boolean);
method public void setLocales(java.lang.String[]);
method public org.mozilla.geckoview.GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings setTrackingProtectionCategories(int);
method public org.mozilla.geckoview.GeckoRuntimeSettings setWebFontsEnabled(boolean);
method public void writeToParcel(android.os.Parcel, int);
method public void readFromParcel(@android.support.annotation.NonNull android.os.Parcel);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setBlockMalware(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setBlockPhishing(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setConsoleOutputEnabled(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setCookieBehavior(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setCookieLifetime(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setJavaScriptEnabled(boolean);
method public void setLocales(@android.support.annotation.Nullable java.lang.String[]);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setTrackingProtectionCategories(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings setWebFontsEnabled(boolean);
field public static final int COOKIE_ACCEPT_ALL = 0;
field public static final int COOKIE_ACCEPT_FIRST_PARTY = 1;
field public static final int COOKIE_ACCEPT_NONE = 2;
@ -211,96 +199,92 @@ package org.mozilla.geckoview {
@android.support.annotation.AnyThread public static final class GeckoRuntimeSettings.Builder {
ctor public Builder();
ctor public Builder(org.mozilla.geckoview.GeckoRuntimeSettings);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder arguments(java.lang.String[]);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder blockMalware(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder blockPhishing(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings build();
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder consoleOutput(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder cookieBehavior(int);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder cookieLifetime(int);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder crashHandler(java.lang.Class<?>);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder displayDensityOverride(float);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder displayDpiOverride(int);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder extras(android.os.Bundle);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder javaScriptEnabled(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder locales(java.lang.String[]);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder pauseForDebugger(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder trackingProtectionCategories(int);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder useContentProcessHint(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
method public org.mozilla.geckoview.GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder arguments(@android.support.annotation.NonNull java.lang.String[]);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder blockMalware(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder blockPhishing(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings build();
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder consoleOutput(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder cookieBehavior(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder cookieLifetime(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder crashHandler(java.lang.Class<?>);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder displayDensityOverride(float);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder displayDpiOverride(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder extras(@android.support.annotation.NonNull android.os.Bundle);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder javaScriptEnabled(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder locales(java.lang.String[]);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder pauseForDebugger(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder trackingProtectionCategories(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder useContentProcessHint(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
}
public class GeckoSession implements android.os.Parcelable {
ctor public GeckoSession();
ctor public GeckoSession(org.mozilla.geckoview.GeckoSessionSettings);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoDisplay acquireDisplay();
ctor public GeckoSession(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSessionSettings);
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoDisplay acquireDisplay();
method @android.support.annotation.UiThread public void close();
method @android.support.annotation.AnyThread public static java.lang.String createDataUri(byte[], java.lang.String);
method @android.support.annotation.AnyThread public static java.lang.String createDataUri(java.lang.String, java.lang.String);
method @android.support.annotation.AnyThread public int describeContents();
method @android.support.annotation.AnyThread public boolean equals(java.lang.Object);
method @android.support.annotation.AnyThread public static java.lang.String createDataUri(@android.support.annotation.NonNull byte[], @android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.AnyThread public static java.lang.String createDataUri(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.AnyThread public void exitFullScreen();
method @android.support.annotation.UiThread public org.mozilla.geckoview.SessionAccessibility getAccessibility();
method @android.support.annotation.UiThread public void getClientBounds(android.graphics.RectF);
method @android.support.annotation.UiThread public void getClientToScreenMatrix(android.graphics.Matrix);
method @android.support.annotation.UiThread public void getClientToSurfaceMatrix(android.graphics.Matrix);
method @android.support.annotation.UiThread public org.mozilla.geckoview.CompositorController getCompositorController();
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoSession.ContentDelegate getContentDelegate();
method @android.support.annotation.UiThread public org.mozilla.geckoview.DynamicToolbarAnimator getDynamicToolbarAnimator();
method @android.support.annotation.AnyThread public org.mozilla.gecko.EventDispatcher getEventDispatcher();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.SessionFinder getFinder();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoSession.HistoryDelegate getHistoryDelegate();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoSession.MediaDelegate getMediaDelegate();
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoSession.NavigationDelegate getNavigationDelegate();
method @android.support.annotation.UiThread public org.mozilla.geckoview.OverscrollEdgeEffect getOverscrollEdgeEffect();
method @android.support.annotation.UiThread public void getPageToScreenMatrix(android.graphics.Matrix);
method @android.support.annotation.UiThread public void getPageToSurfaceMatrix(android.graphics.Matrix);
method @android.support.annotation.UiThread public org.mozilla.geckoview.PanZoomController getPanZoomController();
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoSession.PermissionDelegate getPermissionDelegate();
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoSession.ProgressDelegate getProgressDelegate();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoSession.PromptDelegate getPromptDelegate();
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoSession.ScrollDelegate getScrollDelegate();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoSession.SelectionActionDelegate getSelectionActionDelegate();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoSessionSettings getSettings();
method @android.support.annotation.UiThread public void getSurfaceBounds(android.graphics.Rect);
method @android.support.annotation.AnyThread public org.mozilla.geckoview.SessionTextInput getTextInput();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoSession.TrackingProtectionDelegate getTrackingProtectionDelegate();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoResult<java.lang.String> getUserAgent();
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.SessionAccessibility getAccessibility();
method @android.support.annotation.UiThread public void getClientBounds(@android.support.annotation.NonNull android.graphics.RectF);
method @android.support.annotation.UiThread public void getClientToScreenMatrix(@android.support.annotation.NonNull android.graphics.Matrix);
method @android.support.annotation.UiThread public void getClientToSurfaceMatrix(@android.support.annotation.NonNull android.graphics.Matrix);
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.CompositorController getCompositorController();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.ContentDelegate getContentDelegate();
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.DynamicToolbarAnimator getDynamicToolbarAnimator();
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.gecko.EventDispatcher getEventDispatcher();
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.geckoview.SessionFinder getFinder();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.HistoryDelegate getHistoryDelegate();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.MediaDelegate getMediaDelegate();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.NavigationDelegate getNavigationDelegate();
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.OverscrollEdgeEffect getOverscrollEdgeEffect();
method @android.support.annotation.UiThread public void getPageToScreenMatrix(@android.support.annotation.NonNull android.graphics.Matrix);
method @android.support.annotation.UiThread public void getPageToSurfaceMatrix(@android.support.annotation.NonNull android.graphics.Matrix);
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.PanZoomController getPanZoomController();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.PermissionDelegate getPermissionDelegate();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.ProgressDelegate getProgressDelegate();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.PromptDelegate getPromptDelegate();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.ScrollDelegate getScrollDelegate();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.SelectionActionDelegate getSelectionActionDelegate();
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoSessionSettings getSettings();
method @android.support.annotation.UiThread public void getSurfaceBounds(@android.support.annotation.NonNull android.graphics.Rect);
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.geckoview.SessionTextInput getTextInput();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession.TrackingProtectionDelegate getTrackingProtectionDelegate();
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoResult<java.lang.String> getUserAgent();
method @android.support.annotation.AnyThread public void goBack();
method @android.support.annotation.AnyThread public void goForward();
method @android.support.annotation.AnyThread public int hashCode();
method @android.support.annotation.AnyThread public boolean isOpen();
method @android.support.annotation.AnyThread public void loadData(byte[], java.lang.String);
method @android.support.annotation.AnyThread public void loadString(java.lang.String, java.lang.String);
method @android.support.annotation.AnyThread public void loadUri(java.lang.String);
method @android.support.annotation.AnyThread public void loadUri(java.lang.String, int);
method @android.support.annotation.AnyThread public void loadUri(java.lang.String, java.lang.String, int);
method @android.support.annotation.AnyThread public void loadUri(android.net.Uri);
method @android.support.annotation.AnyThread public void loadUri(android.net.Uri, int);
method @android.support.annotation.AnyThread public void loadUri(android.net.Uri, android.net.Uri, int);
method @android.support.annotation.UiThread public void open(org.mozilla.geckoview.GeckoRuntime);
method @android.support.annotation.AnyThread public void readFromParcel(android.os.Parcel);
method @android.support.annotation.UiThread public void releaseDisplay(org.mozilla.geckoview.GeckoDisplay);
method @android.support.annotation.AnyThread public void loadData(@android.support.annotation.NonNull byte[], @android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.AnyThread public void loadString(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.AnyThread public void loadUri(@android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.AnyThread public void loadUri(@android.support.annotation.NonNull java.lang.String, int);
method @android.support.annotation.AnyThread public void loadUri(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.Nullable java.lang.String, int);
method @android.support.annotation.AnyThread public void loadUri(@android.support.annotation.NonNull android.net.Uri);
method @android.support.annotation.AnyThread public void loadUri(@android.support.annotation.NonNull android.net.Uri, int);
method @android.support.annotation.AnyThread public void loadUri(@android.support.annotation.NonNull android.net.Uri, @android.support.annotation.Nullable android.net.Uri, int);
method @android.support.annotation.UiThread public void open(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoRuntime);
method @android.support.annotation.AnyThread public void readFromParcel(@android.support.annotation.NonNull android.os.Parcel);
method @android.support.annotation.UiThread public void releaseDisplay(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoDisplay);
method @android.support.annotation.AnyThread public void reload();
method @android.support.annotation.AnyThread public void restoreState(org.mozilla.geckoview.GeckoSession.SessionState);
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.GeckoSession.SessionState> saveState();
method @android.support.annotation.AnyThread public void restoreState(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.SessionState);
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.GeckoSession.SessionState> saveState();
method @android.support.annotation.AnyThread public void setActive(boolean);
method @android.support.annotation.UiThread public void setContentDelegate(org.mozilla.geckoview.GeckoSession.ContentDelegate);
method @android.support.annotation.UiThread public void setContentDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.ContentDelegate);
method @android.support.annotation.AnyThread public void setFocused(boolean);
method @android.support.annotation.AnyThread public void setHistoryDelegate(org.mozilla.geckoview.GeckoSession.HistoryDelegate);
method @android.support.annotation.AnyThread public void setMediaDelegate(org.mozilla.geckoview.GeckoSession.MediaDelegate);
method @android.support.annotation.UiThread public void setNavigationDelegate(org.mozilla.geckoview.GeckoSession.NavigationDelegate);
method @android.support.annotation.UiThread public void setPermissionDelegate(org.mozilla.geckoview.GeckoSession.PermissionDelegate);
method @android.support.annotation.UiThread public void setProgressDelegate(org.mozilla.geckoview.GeckoSession.ProgressDelegate);
method @android.support.annotation.AnyThread public void setPromptDelegate(org.mozilla.geckoview.GeckoSession.PromptDelegate);
method @android.support.annotation.UiThread public void setScrollDelegate(org.mozilla.geckoview.GeckoSession.ScrollDelegate);
method @android.support.annotation.UiThread public void setSelectionActionDelegate(org.mozilla.geckoview.GeckoSession.SelectionActionDelegate);
method @android.support.annotation.AnyThread public void setTrackingProtectionDelegate(org.mozilla.geckoview.GeckoSession.TrackingProtectionDelegate);
method @android.support.annotation.AnyThread public void setHistoryDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.HistoryDelegate);
method @android.support.annotation.AnyThread public void setMediaDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.MediaDelegate);
method @android.support.annotation.UiThread public void setNavigationDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.NavigationDelegate);
method @android.support.annotation.UiThread public void setPermissionDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.PermissionDelegate);
method @android.support.annotation.UiThread public void setProgressDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.ProgressDelegate);
method @android.support.annotation.AnyThread public void setPromptDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.PromptDelegate);
method @android.support.annotation.UiThread public void setScrollDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.ScrollDelegate);
method @android.support.annotation.UiThread public void setSelectionActionDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.SelectionActionDelegate);
method @android.support.annotation.AnyThread public void setTrackingProtectionDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.TrackingProtectionDelegate);
method @android.support.annotation.AnyThread public void stop();
method @android.support.annotation.AnyThread public void writeToParcel(android.os.Parcel, int);
method @android.support.annotation.UiThread protected void setShouldPinOnScreen(boolean);
field public static final android.os.Parcelable.Creator<org.mozilla.geckoview.GeckoSession> CREATOR;
field public static final int FINDER_DISPLAY_DIM_PAGE = 2;
@ -320,44 +304,44 @@ package org.mozilla.geckoview {
}
public static interface GeckoSession.ContentDelegate {
method @android.support.annotation.UiThread public void onCloseRequest(org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onContextMenu(org.mozilla.geckoview.GeckoSession, int, int, org.mozilla.geckoview.GeckoSession.ContentDelegate.ContextElement);
method @android.support.annotation.UiThread public void onCrash(org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onExternalResponse(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.GeckoSession.WebResponseInfo);
method @android.support.annotation.UiThread public void onFirstComposite(org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onFocusRequest(org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onFullScreen(org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread public void onTitleChange(org.mozilla.geckoview.GeckoSession, java.lang.String);
method @android.support.annotation.UiThread public void onCloseRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onContextMenu(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, int, int, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.ContentDelegate.ContextElement);
method @android.support.annotation.UiThread public void onCrash(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onExternalResponse(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.WebResponseInfo);
method @android.support.annotation.UiThread public void onFirstComposite(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onFocusRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void onFullScreen(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread public void onTitleChange(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String);
}
public static class GeckoSession.ContentDelegate.ContextElement {
ctor protected ContextElement(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
ctor protected ContextElement(@android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.NonNull java.lang.String, @android.support.annotation.Nullable java.lang.String);
field public static final int TYPE_AUDIO = 3;
field public static final int TYPE_IMAGE = 1;
field public static final int TYPE_NONE = 0;
field public static final int TYPE_VIDEO = 2;
field public final java.lang.String altText;
field public final java.lang.String linkUri;
field public final java.lang.String srcUri;
field public final java.lang.String title;
field @android.support.annotation.Nullable public final java.lang.String altText;
field @android.support.annotation.Nullable public final java.lang.String linkUri;
field @android.support.annotation.Nullable public final java.lang.String srcUri;
field @android.support.annotation.Nullable public final java.lang.String title;
field public final int type;
}
@android.support.annotation.AnyThread public static class GeckoSession.FinderResult {
ctor protected FinderResult();
field public final android.graphics.RectF clientRect;
field @android.support.annotation.Nullable public final android.graphics.RectF clientRect;
field public final int current;
field public final int flags;
field public final boolean found;
field public final java.lang.String linkUri;
field public final java.lang.String searchString;
field @android.support.annotation.Nullable public final java.lang.String linkUri;
field @android.support.annotation.NonNull public final java.lang.String searchString;
field public final int total;
field public final boolean wrapped;
}
public static interface GeckoSession.HistoryDelegate {
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoResult<boolean[]> getVisited(org.mozilla.geckoview.GeckoSession, java.lang.String[]);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoResult<java.lang.Boolean> onVisited(org.mozilla.geckoview.GeckoSession, java.lang.String, java.lang.String, int);
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoResult<boolean[]> getVisited(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull java.lang.String[]);
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoResult<java.lang.Boolean> onVisited(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull java.lang.String, @android.support.annotation.Nullable java.lang.String, int);
field public static final int VISIT_REDIRECT_PERMANENT = 4;
field public static final int VISIT_REDIRECT_SOURCE = 8;
field public static final int VISIT_REDIRECT_SOURCE_PERMANENT = 16;
@ -370,17 +354,17 @@ package org.mozilla.geckoview {
}
public static interface GeckoSession.MediaDelegate {
method @android.support.annotation.UiThread public void onMediaAdd(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.MediaElement);
method @android.support.annotation.UiThread public void onMediaRemove(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.MediaElement);
method @android.support.annotation.UiThread public void onMediaAdd(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull org.mozilla.geckoview.MediaElement);
method @android.support.annotation.UiThread public void onMediaRemove(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull org.mozilla.geckoview.MediaElement);
}
public static interface GeckoSession.NavigationDelegate {
method @android.support.annotation.UiThread public void onCanGoBack(org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread public void onCanGoForward(org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoResult<java.lang.String> onLoadError(org.mozilla.geckoview.GeckoSession, java.lang.String, org.mozilla.geckoview.WebRequestError);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.AllowOrDeny> onLoadRequest(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.GeckoSession.NavigationDelegate.LoadRequest);
method @android.support.annotation.UiThread public void onLocationChange(org.mozilla.geckoview.GeckoSession, java.lang.String);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.GeckoSession> onNewSession(org.mozilla.geckoview.GeckoSession, java.lang.String);
method @android.support.annotation.UiThread public void onCanGoBack(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread public void onCanGoForward(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoResult<java.lang.String> onLoadError(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.NonNull org.mozilla.geckoview.WebRequestError);
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.AllowOrDeny> onLoadRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.NavigationDelegate.LoadRequest);
method @android.support.annotation.UiThread public void onLocationChange(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.UiThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.GeckoSession> onNewSession(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull java.lang.String);
field public static final int LOAD_REQUEST_IS_REDIRECT = 8388608;
field public static final int TARGET_WINDOW_CURRENT = 1;
field public static final int TARGET_WINDOW_NEW = 2;
@ -391,17 +375,17 @@ package org.mozilla.geckoview {
ctor protected LoadRequest();
field public final boolean isRedirect;
field public final int target;
field public final java.lang.String triggerUri;
field public final java.lang.String uri;
field @android.support.annotation.Nullable public final java.lang.String triggerUri;
field @android.support.annotation.NonNull public final java.lang.String uri;
}
public static interface GeckoSession.NavigationDelegate.TargetWindow implements java.lang.annotation.Annotation {
}
public static interface GeckoSession.PermissionDelegate {
method @android.support.annotation.UiThread public void onAndroidPermissionsRequest(org.mozilla.geckoview.GeckoSession, java.lang.String[], org.mozilla.geckoview.GeckoSession.PermissionDelegate.Callback);
method @android.support.annotation.UiThread public void onContentPermissionRequest(org.mozilla.geckoview.GeckoSession, java.lang.String, int, org.mozilla.geckoview.GeckoSession.PermissionDelegate.Callback);
method @android.support.annotation.UiThread public void onMediaPermissionRequest(org.mozilla.geckoview.GeckoSession, java.lang.String, org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource[], org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource[], org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaCallback);
method @android.support.annotation.UiThread public void onAndroidPermissionsRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String[], @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PermissionDelegate.Callback);
method @android.support.annotation.UiThread public void onContentPermissionRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, int, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PermissionDelegate.Callback);
method @android.support.annotation.UiThread public void onMediaPermissionRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull java.lang.String, @android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource[], @android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource[], @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaCallback);
field public static final int PERMISSION_AUTOPLAY_MEDIA = 2;
field public static final int PERMISSION_DESKTOP_NOTIFICATION = 1;
field public static final int PERMISSION_GEOLOCATION = 0;
@ -413,8 +397,8 @@ package org.mozilla.geckoview {
}
public static interface GeckoSession.PermissionDelegate.MediaCallback {
method @android.support.annotation.UiThread public void grant(java.lang.String, java.lang.String);
method @android.support.annotation.UiThread public void grant(org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource, org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource);
method @android.support.annotation.UiThread public void grant(@android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.UiThread public void grant(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource, @android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource);
method @android.support.annotation.UiThread public void reject();
}
@ -441,10 +425,10 @@ package org.mozilla.geckoview {
}
public static interface GeckoSession.ProgressDelegate {
method @android.support.annotation.UiThread public void onPageStart(org.mozilla.geckoview.GeckoSession, java.lang.String);
method @android.support.annotation.UiThread public void onPageStop(org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread public void onProgressChange(org.mozilla.geckoview.GeckoSession, int);
method @android.support.annotation.UiThread public void onSecurityChange(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.GeckoSession.ProgressDelegate.SecurityInformation);
method @android.support.annotation.UiThread public void onPageStart(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.UiThread public void onPageStop(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, boolean);
method @android.support.annotation.UiThread public void onProgressChange(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, int);
method @android.support.annotation.UiThread public void onSecurityChange(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.ProgressDelegate.SecurityInformation);
}
public static class GeckoSession.ProgressDelegate.SecurityInformation {
@ -470,15 +454,15 @@ package org.mozilla.geckoview {
}
public static interface GeckoSession.PromptDelegate {
method @android.support.annotation.UiThread public void onAlert(org.mozilla.geckoview.GeckoSession, java.lang.String, java.lang.String, org.mozilla.geckoview.GeckoSession.PromptDelegate.AlertCallback);
method @android.support.annotation.UiThread public void onAuthPrompt(org.mozilla.geckoview.GeckoSession, java.lang.String, java.lang.String, org.mozilla.geckoview.GeckoSession.PromptDelegate.AuthOptions, org.mozilla.geckoview.GeckoSession.PromptDelegate.AuthCallback);
method @android.support.annotation.UiThread public void onButtonPrompt(org.mozilla.geckoview.GeckoSession, java.lang.String, java.lang.String, java.lang.String[], org.mozilla.geckoview.GeckoSession.PromptDelegate.ButtonCallback);
method @android.support.annotation.UiThread public void onChoicePrompt(org.mozilla.geckoview.GeckoSession, java.lang.String, java.lang.String, int, org.mozilla.geckoview.GeckoSession.PromptDelegate.Choice[], org.mozilla.geckoview.GeckoSession.PromptDelegate.ChoiceCallback);
method @android.support.annotation.UiThread public void onColorPrompt(org.mozilla.geckoview.GeckoSession, java.lang.String, java.lang.String, org.mozilla.geckoview.GeckoSession.PromptDelegate.TextCallback);
method @android.support.annotation.UiThread public void onDateTimePrompt(org.mozilla.geckoview.GeckoSession, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, org.mozilla.geckoview.GeckoSession.PromptDelegate.TextCallback);
method @android.support.annotation.UiThread public void onFilePrompt(org.mozilla.geckoview.GeckoSession, java.lang.String, int, java.lang.String[], org.mozilla.geckoview.GeckoSession.PromptDelegate.FileCallback);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.AllowOrDeny> onPopupRequest(org.mozilla.geckoview.GeckoSession, java.lang.String);
method @android.support.annotation.UiThread public void onTextPrompt(org.mozilla.geckoview.GeckoSession, java.lang.String, java.lang.String, java.lang.String, org.mozilla.geckoview.GeckoSession.PromptDelegate.TextCallback);
method @android.support.annotation.UiThread public void onAlert(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.AlertCallback);
method @android.support.annotation.UiThread public void onAuthPrompt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.AuthOptions, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.AuthCallback);
method @android.support.annotation.UiThread public void onButtonPrompt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String[], @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.ButtonCallback);
method @android.support.annotation.UiThread public void onChoicePrompt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, int, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.Choice[], @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.ChoiceCallback);
method @android.support.annotation.UiThread public void onColorPrompt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.TextCallback);
method @android.support.annotation.UiThread public void onDateTimePrompt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, int, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.TextCallback);
method @android.support.annotation.UiThread public void onFilePrompt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, int, @android.support.annotation.Nullable java.lang.String[], @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.FileCallback);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.AllowOrDeny> onPopupRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.UiThread public void onTextPrompt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.Nullable java.lang.String, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.TextCallback);
field public static final int BUTTON_TYPE_NEGATIVE = 2;
field public static final int BUTTON_TYPE_NEUTRAL = 1;
field public static final int BUTTON_TYPE_POSITIVE = 0;
@ -493,15 +477,15 @@ package org.mozilla.geckoview {
public static interface GeckoSession.PromptDelegate.AlertCallback {
method @android.support.annotation.UiThread public void dismiss();
method @android.support.annotation.UiThread public java.lang.String getCheckboxMessage();
method @android.support.annotation.UiThread @android.support.annotation.Nullable public java.lang.String getCheckboxMessage();
method @android.support.annotation.UiThread public boolean getCheckboxValue();
method @android.support.annotation.UiThread public boolean hasCheckbox();
method @android.support.annotation.UiThread public void setCheckboxValue(boolean);
}
public static interface GeckoSession.PromptDelegate.AuthCallback implements org.mozilla.geckoview.GeckoSession.PromptDelegate.AlertCallback {
method @android.support.annotation.UiThread public void confirm(java.lang.String);
method @android.support.annotation.UiThread public void confirm(java.lang.String, java.lang.String);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.NonNull java.lang.String);
}
public static class GeckoSession.PromptDelegate.AuthOptions {
@ -540,34 +524,34 @@ package org.mozilla.geckoview {
}
public static interface GeckoSession.PromptDelegate.ChoiceCallback implements org.mozilla.geckoview.GeckoSession.PromptDelegate.AlertCallback {
method @android.support.annotation.UiThread public void confirm(java.lang.String);
method @android.support.annotation.UiThread public void confirm(java.lang.String[]);
method @android.support.annotation.UiThread public void confirm(org.mozilla.geckoview.GeckoSession.PromptDelegate.Choice);
method @android.support.annotation.UiThread public void confirm(org.mozilla.geckoview.GeckoSession.PromptDelegate.Choice[]);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.Nullable java.lang.String);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.NonNull java.lang.String[]);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.PromptDelegate.Choice);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.PromptDelegate.Choice[]);
}
public static interface GeckoSession.PromptDelegate.DatetimeType implements java.lang.annotation.Annotation {
}
public static interface GeckoSession.PromptDelegate.FileCallback implements org.mozilla.geckoview.GeckoSession.PromptDelegate.AlertCallback {
method @android.support.annotation.UiThread public void confirm(android.content.Context, android.net.Uri);
method @android.support.annotation.UiThread public void confirm(android.content.Context, android.net.Uri[]);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.Nullable android.content.Context, @android.support.annotation.Nullable android.net.Uri);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.Nullable android.content.Context, @android.support.annotation.Nullable android.net.Uri[]);
}
public static interface GeckoSession.PromptDelegate.FileType implements java.lang.annotation.Annotation {
}
public static interface GeckoSession.PromptDelegate.TextCallback implements org.mozilla.geckoview.GeckoSession.PromptDelegate.AlertCallback {
method @android.support.annotation.UiThread public void confirm(java.lang.String);
method @android.support.annotation.UiThread public void confirm(@android.support.annotation.Nullable java.lang.String);
}
public static interface GeckoSession.ScrollDelegate {
method @android.support.annotation.UiThread public void onScrollChanged(org.mozilla.geckoview.GeckoSession, int, int);
method @android.support.annotation.UiThread public void onScrollChanged(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, int, int);
}
public static interface GeckoSession.SelectionActionDelegate {
method @android.support.annotation.UiThread public void onHideAction(org.mozilla.geckoview.GeckoSession, int);
method @android.support.annotation.UiThread public void onShowActionRequest(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.GeckoSession.SelectionActionDelegate.Selection, java.lang.String[], org.mozilla.geckoview.GeckoResponse<java.lang.String>);
method @android.support.annotation.UiThread public void onHideAction(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, int);
method @android.support.annotation.UiThread public void onShowActionRequest(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession.SelectionActionDelegate.Selection, java.lang.String[], @android.support.annotation.NonNull org.mozilla.geckoview.GeckoResponse<java.lang.String>);
field public static final java.lang.String ACTION_COLLAPSE_TO_END = "org.mozilla.geckoview.COLLAPSE_TO_END";
field public static final java.lang.String ACTION_COLLAPSE_TO_START = "org.mozilla.geckoview.COLLAPSE_TO_START";
field public static final java.lang.String ACTION_COPY = "org.mozilla.geckoview.COPY";
@ -604,21 +588,18 @@ package org.mozilla.geckoview {
@android.support.annotation.AnyThread public static class GeckoSession.SessionState implements android.os.Parcelable {
ctor public SessionState(java.lang.String);
method public int describeContents();
method public void readFromParcel(android.os.Parcel);
method public java.lang.String toString();
method public void writeToParcel(android.os.Parcel, int);
method public void readFromParcel(@android.support.annotation.NonNull android.os.Parcel);
field public static final android.os.Parcelable.Creator<org.mozilla.geckoview.GeckoSession.SessionState> CREATOR;
}
public static interface GeckoSession.TextInputDelegate {
method @android.support.annotation.UiThread public void hideSoftInput(org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void notifyAutoFill(org.mozilla.geckoview.GeckoSession, int, int);
method @android.support.annotation.UiThread public void restartInput(org.mozilla.geckoview.GeckoSession, int);
method @android.support.annotation.UiThread public void showSoftInput(org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void updateCursorAnchorInfo(org.mozilla.geckoview.GeckoSession, android.view.inputmethod.CursorAnchorInfo);
method @android.support.annotation.UiThread public void updateExtractedText(org.mozilla.geckoview.GeckoSession, android.view.inputmethod.ExtractedTextRequest, android.view.inputmethod.ExtractedText);
method @android.support.annotation.UiThread public void updateSelection(org.mozilla.geckoview.GeckoSession, int, int, int, int);
method @android.support.annotation.UiThread public void hideSoftInput(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void notifyAutoFill(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, int, int);
method @android.support.annotation.UiThread public void restartInput(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, int);
method @android.support.annotation.UiThread public void showSoftInput(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
method @android.support.annotation.UiThread public void updateCursorAnchorInfo(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull android.view.inputmethod.CursorAnchorInfo);
method @android.support.annotation.UiThread public void updateExtractedText(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.NonNull android.view.inputmethod.ExtractedTextRequest, @android.support.annotation.NonNull android.view.inputmethod.ExtractedText);
method @android.support.annotation.UiThread public void updateSelection(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, int, int, int, int);
field public static final int AUTO_FILL_NOTIFY_CANCELED = 2;
field public static final int AUTO_FILL_NOTIFY_COMMITTED = 1;
field public static final int AUTO_FILL_NOTIFY_STARTED = 0;
@ -639,7 +620,7 @@ package org.mozilla.geckoview {
}
public static interface GeckoSession.TrackingProtectionDelegate {
method @android.support.annotation.UiThread public void onTrackerBlocked(org.mozilla.geckoview.GeckoSession, java.lang.String, int);
method @android.support.annotation.UiThread public void onTrackerBlocked(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable java.lang.String, int);
field public static final int CATEGORY_AD = 1;
field public static final int CATEGORY_ALL = 31;
field public static final int CATEGORY_ANALYTIC = 2;
@ -654,27 +635,22 @@ package org.mozilla.geckoview {
@android.support.annotation.AnyThread public static class GeckoSession.WebResponseInfo {
ctor protected WebResponseInfo();
field public final long contentLength;
field public final java.lang.String contentType;
field public final java.lang.String filename;
field public final java.lang.String uri;
field @android.support.annotation.Nullable public final long contentLength;
field @android.support.annotation.Nullable public final java.lang.String contentType;
field @android.support.annotation.Nullable public final java.lang.String filename;
field @android.support.annotation.NonNull public final java.lang.String uri;
}
@android.support.annotation.AnyThread public final class GeckoSessionSettings implements android.os.Parcelable {
ctor public GeckoSessionSettings();
ctor public GeckoSessionSettings(org.mozilla.geckoview.GeckoSessionSettings);
method public int describeContents();
method public boolean equals(java.lang.Object);
method public boolean getBoolean(org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Boolean>);
method public int getInt(org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Integer>);
method public java.lang.String getString(org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.String>);
method public int hashCode();
method public void readFromParcel(android.os.Parcel);
method public void setBoolean(org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Boolean>, boolean);
method public void setInt(org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Integer>, int);
method public void setString(org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.String>, java.lang.String);
method public java.lang.String toString();
method public void writeToParcel(android.os.Parcel, int);
ctor public GeckoSessionSettings(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSessionSettings);
method public boolean getBoolean(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Boolean>);
method public int getInt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Integer>);
method public java.lang.String getString(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.String>);
method public void readFromParcel(@android.support.annotation.NonNull android.os.Parcel);
method public void setBoolean(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Boolean>, boolean);
method public void setInt(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Integer>, int);
method public void setString(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.String>, @android.support.annotation.Nullable java.lang.String);
field public static final org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.Boolean> ALLOW_JAVASCRIPT;
field public static final org.mozilla.geckoview.GeckoSessionSettings.Key<java.lang.String> CHROME_URI;
field public static final android.os.Parcelable.Creator<org.mozilla.geckoview.GeckoSessionSettings> CREATOR;
@ -702,36 +678,15 @@ package org.mozilla.geckoview {
@android.support.annotation.UiThread public class GeckoView extends android.widget.FrameLayout {
ctor public GeckoView(android.content.Context);
ctor public GeckoView(android.content.Context, android.util.AttributeSet);
method public void autofill(android.util.SparseArray<android.view.autofill.AutofillValue>);
method public void coverUntilFirstPaint(int);
method public void dispatchDraw(android.graphics.Canvas);
method public boolean gatherTransparentRegion(android.graphics.Region);
method public org.mozilla.geckoview.DynamicToolbarAnimator getDynamicToolbarAnimator();
method @android.support.annotation.AnyThread public org.mozilla.gecko.EventDispatcher getEventDispatcher();
method public android.os.Handler getHandler();
method public org.mozilla.geckoview.PanZoomController getPanZoomController();
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoSession getSession();
method public void onAttachedToWindow();
method public android.view.inputmethod.InputConnection onCreateInputConnection(android.view.inputmethod.EditorInfo);
method public void onDetachedFromWindow();
method public boolean onGenericMotionEvent(android.view.MotionEvent);
method public boolean onKeyDown(int, android.view.KeyEvent);
method public boolean onKeyLongPress(int, android.view.KeyEvent);
method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
method public boolean onKeyPreIme(int, android.view.KeyEvent);
method public boolean onKeyUp(int, android.view.KeyEvent);
method public void onProvideAutofillVirtualStructure(android.view.ViewStructure, int);
method public boolean onTouchEvent(android.view.MotionEvent);
method public void onWindowFocusChanged(boolean);
method public org.mozilla.geckoview.GeckoSession releaseSession();
method public void setSession(org.mozilla.geckoview.GeckoSession);
method public void setSession(org.mozilla.geckoview.GeckoSession, org.mozilla.geckoview.GeckoRuntime);
method @android.support.annotation.NonNull public org.mozilla.geckoview.DynamicToolbarAnimator getDynamicToolbarAnimator();
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.gecko.EventDispatcher getEventDispatcher();
method @android.support.annotation.NonNull public org.mozilla.geckoview.PanZoomController getPanZoomController();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession getSession();
method @android.support.annotation.Nullable public org.mozilla.geckoview.GeckoSession releaseSession();
method public void setSession(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession);
method public void setSession(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoSession, @android.support.annotation.Nullable org.mozilla.geckoview.GeckoRuntime);
method public boolean shouldPinOnScreen();
method protected void onConfigurationChanged(android.content.res.Configuration);
method protected void onFocusChanged(boolean, int, android.graphics.Rect);
method protected void onRestoreInstanceState(android.os.Parcelable);
method protected android.os.Parcelable onSaveInstanceState();
method protected void onWindowVisibilityChanged(int);
field protected final org.mozilla.geckoview.GeckoView.Display mDisplay;
field protected org.mozilla.geckoview.GeckoRuntime mRuntime;
field protected org.mozilla.geckoview.GeckoSession mSession;
@ -739,11 +694,11 @@ package org.mozilla.geckoview {
}
@android.support.annotation.AnyThread public class GeckoWebExecutor {
ctor public GeckoWebExecutor(org.mozilla.geckoview.GeckoRuntime);
method public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.WebResponse> fetch(org.mozilla.geckoview.WebRequest);
method public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.WebResponse> fetch(org.mozilla.geckoview.WebRequest, int);
method public org.mozilla.geckoview.GeckoResult<java.net.InetAddress[]> resolve(java.lang.String);
method public void speculativeConnect(java.lang.String);
ctor public GeckoWebExecutor(@android.support.annotation.NonNull org.mozilla.geckoview.GeckoRuntime);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.WebResponse> fetch(@android.support.annotation.NonNull org.mozilla.geckoview.WebRequest);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.WebResponse> fetch(@android.support.annotation.NonNull org.mozilla.geckoview.WebRequest, int);
method public org.mozilla.geckoview.GeckoResult<java.net.InetAddress[]> resolve(@android.support.annotation.NonNull java.lang.String);
method public void speculativeConnect(@android.support.annotation.NonNull java.lang.String);
field public static final int FETCH_FLAGS_ANONYMOUS = 1;
field public static final int FETCH_FLAGS_NONE = 0;
}
@ -752,11 +707,11 @@ package org.mozilla.geckoview {
}
@android.support.annotation.AnyThread public class MediaElement {
method public org.mozilla.geckoview.MediaElement.Delegate getDelegate();
method @android.support.annotation.Nullable public org.mozilla.geckoview.MediaElement.Delegate getDelegate();
method public void pause();
method public void play();
method public void seek(double);
method public void setDelegate(org.mozilla.geckoview.MediaElement.Delegate);
method public void setDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.MediaElement.Delegate);
method public void setMuted(boolean);
method public void setPlaybackRate(double);
method public void setVolume(double);
@ -787,20 +742,20 @@ package org.mozilla.geckoview {
}
public static interface MediaElement.Delegate {
method @android.support.annotation.UiThread public void onError(org.mozilla.geckoview.MediaElement, int);
method @android.support.annotation.UiThread public void onFullscreenChange(org.mozilla.geckoview.MediaElement, boolean);
method @android.support.annotation.UiThread public void onLoadProgress(org.mozilla.geckoview.MediaElement, org.mozilla.geckoview.MediaElement.LoadProgressInfo);
method @android.support.annotation.UiThread public void onMetadataChange(org.mozilla.geckoview.MediaElement, org.mozilla.geckoview.MediaElement.Metadata);
method @android.support.annotation.UiThread public void onPlaybackRateChange(org.mozilla.geckoview.MediaElement, double);
method @android.support.annotation.UiThread public void onPlaybackStateChange(org.mozilla.geckoview.MediaElement, int);
method @android.support.annotation.UiThread public void onReadyStateChange(org.mozilla.geckoview.MediaElement, int);
method @android.support.annotation.UiThread public void onTimeChange(org.mozilla.geckoview.MediaElement, double);
method @android.support.annotation.UiThread public void onVolumeChange(org.mozilla.geckoview.MediaElement, double, boolean);
method @android.support.annotation.UiThread public void onError(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, int);
method @android.support.annotation.UiThread public void onFullscreenChange(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, boolean);
method @android.support.annotation.UiThread public void onLoadProgress(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, @android.support.annotation.NonNull org.mozilla.geckoview.MediaElement.LoadProgressInfo);
method @android.support.annotation.UiThread public void onMetadataChange(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, @android.support.annotation.NonNull org.mozilla.geckoview.MediaElement.Metadata);
method @android.support.annotation.UiThread public void onPlaybackRateChange(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, double);
method @android.support.annotation.UiThread public void onPlaybackStateChange(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, int);
method @android.support.annotation.UiThread public void onReadyStateChange(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, int);
method @android.support.annotation.UiThread public void onTimeChange(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, double);
method @android.support.annotation.UiThread public void onVolumeChange(@android.support.annotation.NonNull org.mozilla.geckoview.MediaElement, double, boolean);
}
public static class MediaElement.LoadProgressInfo {
ctor protected LoadProgressInfo();
field public final org.mozilla.geckoview.MediaElement.LoadProgressInfo.TimeRange[] buffered;
field @android.support.annotation.Nullable public final org.mozilla.geckoview.MediaElement.LoadProgressInfo.TimeRange[] buffered;
field public final long loadedBytes;
field public final long totalBytes;
}
@ -823,73 +778,71 @@ package org.mozilla.geckoview {
}
@android.support.annotation.UiThread public final class OverscrollEdgeEffect {
method public void draw(android.graphics.Canvas);
method public java.lang.Runnable getInvalidationCallback();
method public void setInvalidationCallback(java.lang.Runnable);
method public void setTheme(android.content.Context);
method public void draw(@android.support.annotation.NonNull android.graphics.Canvas);
method @android.support.annotation.Nullable public java.lang.Runnable getInvalidationCallback();
method public void setInvalidationCallback(@android.support.annotation.Nullable java.lang.Runnable);
method public void setTheme(@android.support.annotation.NonNull android.content.Context);
}
@android.support.annotation.UiThread public class PanZoomController extends org.mozilla.gecko.mozglue.JNIObject {
ctor protected PanZoomController(org.mozilla.geckoview.GeckoSession);
method public float getScrollFactor();
method public boolean onMotionEvent(android.view.MotionEvent);
method public boolean onMouseEvent(android.view.MotionEvent);
method public boolean onTouchEvent(android.view.MotionEvent);
method public boolean onMotionEvent(@android.support.annotation.NonNull android.view.MotionEvent);
method public boolean onMouseEvent(@android.support.annotation.NonNull android.view.MotionEvent);
method public boolean onTouchEvent(@android.support.annotation.NonNull android.view.MotionEvent);
method public void setIsLongpressEnabled(boolean);
method public void setScrollFactor(float);
method protected void disposeNative();
method protected void finalize();
}
public final class RuntimeTelemetry {
method @android.support.annotation.AnyThread public org.mozilla.geckoview.GeckoResult<org.mozilla.gecko.util.GeckoBundle> getSnapshots(boolean);
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoResult<org.mozilla.gecko.util.GeckoBundle> getSnapshots(boolean);
}
@android.support.annotation.UiThread public class SessionAccessibility {
method public android.view.View getView();
method public boolean onMotionEvent(android.view.MotionEvent);
method @android.support.annotation.UiThread public void setView(android.view.View);
method @android.support.annotation.Nullable public android.view.View getView();
method public boolean onMotionEvent(@android.support.annotation.NonNull android.view.MotionEvent);
method @android.support.annotation.UiThread public void setView(@android.support.annotation.Nullable android.view.View);
}
@android.support.annotation.AnyThread public final class SessionFinder {
method public void clear();
method public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.GeckoSession.FinderResult> find(java.lang.String, int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoResult<org.mozilla.geckoview.GeckoSession.FinderResult> find(@android.support.annotation.Nullable java.lang.String, int);
method public int getDisplayFlags();
method public void setDisplayFlags(int);
}
public final class SessionTextInput {
method @android.support.annotation.UiThread public void autofill(android.util.SparseArray<java.lang.CharSequence>);
method @android.support.annotation.UiThread public org.mozilla.geckoview.GeckoSession.TextInputDelegate getDelegate();
method @android.support.annotation.AnyThread public synchronized android.os.Handler getHandler(android.os.Handler);
method @android.support.annotation.UiThread public android.view.View getView();
method @android.support.annotation.AnyThread public synchronized android.view.inputmethod.InputConnection onCreateInputConnection(android.view.inputmethod.EditorInfo);
method @android.support.annotation.UiThread public boolean onKeyDown(int, android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyLongPress(int, android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyMultiple(int, int, android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyPreIme(int, android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyUp(int, android.view.KeyEvent);
method @android.support.annotation.UiThread public void onProvideAutofillVirtualStructure(android.view.ViewStructure, int);
method @android.support.annotation.UiThread public void setDelegate(org.mozilla.geckoview.GeckoSession.TextInputDelegate);
method @android.support.annotation.UiThread public synchronized void setView(android.view.View);
method @android.support.annotation.UiThread public void autofill(@android.support.annotation.NonNull android.util.SparseArray<java.lang.CharSequence>);
method @android.support.annotation.UiThread @android.support.annotation.NonNull public org.mozilla.geckoview.GeckoSession.TextInputDelegate getDelegate();
method @android.support.annotation.AnyThread @android.support.annotation.NonNull public synchronized android.os.Handler getHandler(@android.support.annotation.NonNull android.os.Handler);
method @android.support.annotation.UiThread @android.support.annotation.Nullable public android.view.View getView();
method @android.support.annotation.AnyThread @android.support.annotation.Nullable public synchronized android.view.inputmethod.InputConnection onCreateInputConnection(@android.support.annotation.NonNull android.view.inputmethod.EditorInfo);
method @android.support.annotation.UiThread public boolean onKeyDown(int, @android.support.annotation.NonNull android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyLongPress(int, @android.support.annotation.NonNull android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyMultiple(int, int, @android.support.annotation.NonNull android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyPreIme(int, @android.support.annotation.NonNull android.view.KeyEvent);
method @android.support.annotation.UiThread public boolean onKeyUp(int, @android.support.annotation.NonNull android.view.KeyEvent);
method @android.support.annotation.UiThread public void onProvideAutofillVirtualStructure(@android.support.annotation.NonNull android.view.ViewStructure, int);
method @android.support.annotation.UiThread public void setDelegate(@android.support.annotation.Nullable org.mozilla.geckoview.GeckoSession.TextInputDelegate);
method @android.support.annotation.UiThread public synchronized void setView(@android.support.annotation.Nullable android.view.View);
}
@android.support.annotation.AnyThread public abstract class WebMessage {
ctor protected WebMessage(org.mozilla.geckoview.WebMessage.Builder);
field public final java.nio.ByteBuffer body;
field public final java.util.Map<java.lang.String, java.lang.String> headers;
field public final java.lang.String uri;
ctor protected WebMessage(@android.support.annotation.NonNull org.mozilla.geckoview.WebMessage.Builder);
field @android.support.annotation.Nullable public final java.nio.ByteBuffer body;
field @android.support.annotation.NonNull public final java.util.Map<java.lang.String, java.lang.String> headers;
field @android.support.annotation.NonNull public final java.lang.String uri;
}
@android.support.annotation.AnyThread public abstract static class WebMessage.Builder {
method public org.mozilla.geckoview.WebMessage.Builder addHeader(java.lang.String, java.lang.String);
method public org.mozilla.geckoview.WebMessage.Builder body(java.nio.ByteBuffer);
method public org.mozilla.geckoview.WebMessage.Builder header(java.lang.String, java.lang.String);
method public org.mozilla.geckoview.WebMessage.Builder uri(java.lang.String);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebMessage.Builder addHeader(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebMessage.Builder body(@android.support.annotation.Nullable java.nio.ByteBuffer);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebMessage.Builder header(@android.support.annotation.NonNull java.lang.String, @android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebMessage.Builder uri(@android.support.annotation.NonNull java.lang.String);
}
@android.support.annotation.AnyThread public class WebRequest extends org.mozilla.geckoview.WebMessage {
ctor public WebRequest(java.lang.String);
ctor public WebRequest(@android.support.annotation.NonNull java.lang.String);
field public static final int CACHE_MODE_DEFAULT = 1;
field public static final int CACHE_MODE_FORCE_CACHE = 5;
field public static final int CACHE_MODE_NO_CACHE = 4;
@ -897,20 +850,16 @@ package org.mozilla.geckoview {
field public static final int CACHE_MODE_ONLY_IF_CACHED = 6;
field public static final int CACHE_MODE_RELOAD = 3;
field public final int cacheMode;
field public final java.lang.String method;
field public final java.lang.String referrer;
field @android.support.annotation.NonNull public final java.lang.String method;
field @android.support.annotation.Nullable public final java.lang.String referrer;
}
@android.support.annotation.AnyThread public static class WebRequest.Builder extends org.mozilla.geckoview.WebMessage.Builder {
ctor public Builder(java.lang.String);
method public org.mozilla.geckoview.WebRequest.Builder addHeader(java.lang.String, java.lang.String);
method public org.mozilla.geckoview.WebRequest.Builder body(java.nio.ByteBuffer);
method public org.mozilla.geckoview.WebRequest build();
method public org.mozilla.geckoview.WebRequest.Builder cacheMode(int);
method public org.mozilla.geckoview.WebRequest.Builder header(java.lang.String, java.lang.String);
method public org.mozilla.geckoview.WebRequest.Builder method(java.lang.String);
method public org.mozilla.geckoview.WebRequest.Builder referrer(java.lang.String);
method public org.mozilla.geckoview.WebRequest.Builder uri(java.lang.String);
ctor public Builder(@android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebRequest build();
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebRequest.Builder cacheMode(int);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebRequest.Builder method(@android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebRequest.Builder referrer(@android.support.annotation.Nullable java.lang.String);
}
public static interface WebRequest.CacheMode implements java.lang.annotation.Annotation {
@ -918,8 +867,6 @@ package org.mozilla.geckoview {
@android.support.annotation.AnyThread public class WebRequestError extends java.lang.Exception {
ctor public WebRequestError(int, int);
method public boolean equals(java.lang.Object);
method public int hashCode();
field public static final int ERROR_CATEGORY_CONTENT = 4;
field public static final int ERROR_CATEGORY_NETWORK = 3;
field public static final int ERROR_CATEGORY_PROXY = 6;
@ -964,20 +911,16 @@ package org.mozilla.geckoview {
}
@android.support.annotation.AnyThread public class WebResponse extends org.mozilla.geckoview.WebMessage {
ctor protected WebResponse(org.mozilla.geckoview.WebResponse.Builder);
ctor protected WebResponse(@android.support.annotation.NonNull org.mozilla.geckoview.WebResponse.Builder);
field public final boolean redirected;
field public final int statusCode;
}
@android.support.annotation.AnyThread public static class WebResponse.Builder extends org.mozilla.geckoview.WebMessage.Builder {
ctor public Builder(java.lang.String);
method public org.mozilla.geckoview.WebResponse.Builder addHeader(java.lang.String, java.lang.String);
method public org.mozilla.geckoview.WebResponse.Builder body(java.nio.ByteBuffer);
method public org.mozilla.geckoview.WebResponse build();
method public org.mozilla.geckoview.WebResponse.Builder header(java.lang.String, java.lang.String);
method public org.mozilla.geckoview.WebResponse.Builder redirected(boolean);
method public org.mozilla.geckoview.WebResponse.Builder statusCode(int);
method public org.mozilla.geckoview.WebResponse.Builder uri(java.lang.String);
ctor public Builder(@android.support.annotation.NonNull java.lang.String);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebResponse build();
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebResponse.Builder redirected(boolean);
method @android.support.annotation.NonNull public org.mozilla.geckoview.WebResponse.Builder statusCode(int);
}
}

Просмотреть файл

@ -46,7 +46,7 @@ class ContentDelegateTest : BaseSessionTest() {
sessionRule.waitUntilCalled(object : Callbacks.ContentDelegate {
@AssertCalled(count = 2)
override fun onTitleChange(session: GeckoSession, title: String) {
override fun onTitleChange(session: GeckoSession, title: String?) {
assertThat("Title should match", title,
equalTo(forEachCall("Title1", "Title2")))
}
@ -187,7 +187,7 @@ class ContentDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(object : Callbacks.NavigationDelegate {
@AssertCalled
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URI should match", url, equalTo(startUri))
}
})

Просмотреть файл

@ -874,7 +874,7 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
@NullDelegate(GeckoSession.NavigationDelegate::class)
fun delegateDuringNextWait_throwOnNullDelegate() {
sessionRule.session.delegateDuringNextWait(object : Callbacks.NavigationDelegate {
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
}
})
}
@ -1337,7 +1337,8 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
@Test(expected = UiThreadUtils.TimeoutException::class)
fun evaluateJS_canTimeout() {
sessionRule.session.delegateUntilTestEnd(object : Callbacks.PromptDelegate {
override fun onAlert(session: GeckoSession, title: String, msg: String, callback: GeckoSession.PromptDelegate.AlertCallback) {
override fun onAlert(session: GeckoSession, title: String?, msg: String?,
callback: GeckoSession.PromptDelegate.AlertCallback) {
// Do nothing for the alert, so it hangs forever.
}
})
@ -1494,7 +1495,8 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
sessionRule.session.forCallbacksDuringWait(object : Callbacks.PromptDelegate {
@AssertCalled(count = 1)
override fun onAlert(session: GeckoSession, title: String, msg: String, callback: GeckoSession.PromptDelegate.AlertCallback) {
override fun onAlert(session: GeckoSession, title: String?, msg: String?,
callback: GeckoSession.PromptDelegate.AlertCallback) {
}
})
}
@ -1510,7 +1512,8 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
@Test fun waitForJS_delegateDuringWait() {
var count = 0
sessionRule.session.delegateDuringNextWait(object : Callbacks.PromptDelegate {
override fun onAlert(session: GeckoSession, title: String, msg: String, callback: GeckoSession.PromptDelegate.AlertCallback) {
override fun onAlert(session: GeckoSession, title: String?, msg: String?,
callback: GeckoSession.PromptDelegate.AlertCallback) {
count++
callback.dismiss()
}

Просмотреть файл

@ -20,7 +20,7 @@ import org.junit.runner.RunWith
class LocaleTest : BaseSessionTest() {
@Test fun setLocale() {
sessionRule.runtime.getSettings().setLocales(arrayOf("en-GB"));
sessionRule.runtime.getSettings()!!.setLocales(arrayOf("en-GB"));
val index = sessionRule.waitForChromeJS(String.format(
"(function() {" +

Просмотреть файл

@ -71,12 +71,12 @@ class NavigationDelegateTest : BaseSessionTest() {
if (errorPageUrl != null) {
sessionRule.waitUntilCalled(object : Callbacks.ContentDelegate, Callbacks.NavigationDelegate {
@AssertCalled(count = 1, order = [1])
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match", url, equalTo(testUri))
}
@AssertCalled(count = 1, order = [2])
override fun onTitleChange(session: GeckoSession, title: String) {
override fun onTitleChange(session: GeckoSession, title: String?) {
assertThat("Title should not be empty", title, not(isEmptyOrNullString()))
}
})
@ -123,7 +123,7 @@ class NavigationDelegateTest : BaseSessionTest() {
if (errorPageUrl != null) {
sessionRule.waitUntilCalled(object: Callbacks.ContentDelegate {
@AssertCalled(count = 1)
override fun onTitleChange(session: GeckoSession, title: String) {
override fun onTitleChange(session: GeckoSession, title: String?) {
assertThat("Title should not be empty", title, not(isEmptyOrNullString()));
}
})
@ -174,13 +174,13 @@ class NavigationDelegateTest : BaseSessionTest() {
@Setting(key = Setting.Key.USE_TRACKING_PROTECTION, value = "true")
@Test fun trackingProtection() {
val category = TrackingProtectionDelegate.CATEGORY_TEST;
sessionRule.runtime.settings.trackingProtectionCategories = category
sessionRule.runtime.settings!!.trackingProtectionCategories = category
sessionRule.session.loadTestPath(TRACKERS_PATH)
sessionRule.waitUntilCalled(
object : Callbacks.TrackingProtectionDelegate {
@AssertCalled(count = 3)
override fun onTrackerBlocked(session: GeckoSession, uri: String,
override fun onTrackerBlocked(session: GeckoSession, uri: String?,
categories: Int) {
assertThat("Category should be set",
categories,
@ -199,7 +199,7 @@ class NavigationDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(
object : Callbacks.TrackingProtectionDelegate {
@AssertCalled(false)
override fun onTrackerBlocked(session: GeckoSession, uri: String,
override fun onTrackerBlocked(session: GeckoSession, uri: String?,
categories: Int) {
}
})
@ -244,7 +244,7 @@ class NavigationDelegateTest : BaseSessionTest() {
@Test fun bypassClassifier() {
val phishingUri = "https://www.itisatrap.org/firefox/its-a-trap.html"
sessionRule.runtime.settings.blockPhishing = true
sessionRule.runtime.settings!!.blockPhishing = true
sessionRule.session.loadUri(phishingUri + "?bypass=true",
GeckoSession.LOAD_FLAGS_BYPASS_CLASSIFIER)
@ -263,14 +263,14 @@ class NavigationDelegateTest : BaseSessionTest() {
@Test fun safebrowsingPhishing() {
val phishingUri = "https://www.itisatrap.org/firefox/its-a-trap.html"
sessionRule.runtime.settings.blockPhishing = true
sessionRule.runtime.settings!!.blockPhishing = true
// Add query string to avoid bypassing classifier check because of cache.
testLoadExpectError(phishingUri + "?block=true",
WebRequestError.ERROR_CATEGORY_SAFEBROWSING,
WebRequestError.ERROR_SAFEBROWSING_PHISHING_URI)
sessionRule.runtime.settings.blockPhishing = false
sessionRule.runtime.settings!!.blockPhishing = false
sessionRule.session.loadUri(phishingUri + "?block=false")
sessionRule.session.waitForPageStop()
@ -288,13 +288,13 @@ class NavigationDelegateTest : BaseSessionTest() {
@Test fun safebrowsingMalware() {
val malwareUri = "https://www.itisatrap.org/firefox/its-an-attack.html"
sessionRule.runtime.settings.blockMalware = true
sessionRule.runtime.settings!!.blockMalware = true
testLoadExpectError(malwareUri + "?block=true",
WebRequestError.ERROR_CATEGORY_SAFEBROWSING,
WebRequestError.ERROR_SAFEBROWSING_MALWARE_URI)
sessionRule.runtime.settings.blockMalware = false
sessionRule.runtime.settings!!.blockMalware = false
sessionRule.session.loadUri(malwareUri + "?block=false")
sessionRule.session.waitForPageStop()
@ -312,13 +312,13 @@ class NavigationDelegateTest : BaseSessionTest() {
@Test fun safebrowsingUnwanted() {
val unwantedUri = "https://www.itisatrap.org/firefox/unwanted.html"
sessionRule.runtime.settings.blockMalware = true
sessionRule.runtime.settings!!.blockMalware = true
testLoadExpectError(unwantedUri + "?block=true",
WebRequestError.ERROR_CATEGORY_SAFEBROWSING,
WebRequestError.ERROR_SAFEBROWSING_UNWANTED_URI)
sessionRule.runtime.settings.blockMalware = false
sessionRule.runtime.settings!!.blockMalware = false
sessionRule.session.loadUri(unwantedUri + "?block=false")
sessionRule.session.waitForPageStop()
@ -336,13 +336,13 @@ class NavigationDelegateTest : BaseSessionTest() {
@Test fun safebrowsingHarmful() {
val harmfulUri = "https://www.itisatrap.org/firefox/harmful.html"
sessionRule.runtime.settings.blockMalware = true
sessionRule.runtime.settings!!.blockMalware = true
testLoadExpectError(harmfulUri + "?block=true",
WebRequestError.ERROR_CATEGORY_SAFEBROWSING,
WebRequestError.ERROR_SAFEBROWSING_HARMFUL_URI)
sessionRule.runtime.settings.blockMalware = false
sessionRule.runtime.settings!!.blockMalware = false
sessionRule.session.loadUri(harmfulUri + "?block=false")
sessionRule.session.waitForPageStop()
@ -529,7 +529,7 @@ class NavigationDelegateTest : BaseSessionTest() {
}
@AssertCalled(count = 1, order = [2])
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("Session should not be null", session, notNullValue())
assertThat("URL should not be null", url, notNullValue())
assertThat("URL should match", url, endsWith(HELLO_HTML_PATH))
@ -561,7 +561,7 @@ class NavigationDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(object : Callbacks.NavigationDelegate, Callbacks.ProgressDelegate {
@AssertCalled(count = 1)
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match the provided data URL", url, equalTo(dataUrl))
}
@ -587,7 +587,7 @@ class NavigationDelegateTest : BaseSessionTest() {
// Test that if we unset the navigation delegate during a load, the load still proceeds.
var onLocationCount = 0
sessionRule.session.navigationDelegate = object : Callbacks.NavigationDelegate {
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
onLocationCount++
}
}
@ -613,12 +613,12 @@ class NavigationDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(object : Callbacks.NavigationDelegate, Callbacks.ProgressDelegate, Callbacks.ContentDelegate {
@AssertCalled
override fun onTitleChange(session: GeckoSession, title: String) {
override fun onTitleChange(session: GeckoSession, title: String?) {
assertThat("Title should match", title, equalTo("TheTitle"));
}
@AssertCalled(count = 1)
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should be a data URL", url,
equalTo(GeckoSession.createDataUri(dataString, mimeType)))
}
@ -636,7 +636,7 @@ class NavigationDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(object : Callbacks.NavigationDelegate, Callbacks.ProgressDelegate {
@AssertCalled(count = 1)
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should be a data URL", url, startsWith("data:"))
}
@ -656,12 +656,12 @@ class NavigationDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(object : Callbacks.NavigationDelegate, Callbacks.ProgressDelegate, Callbacks.ContentDelegate {
@AssertCalled(count = 1)
override fun onTitleChange(session: GeckoSession, title: String) {
override fun onTitleChange(session: GeckoSession, title: String?) {
assertThat("Title should match", title, equalTo("Hello, world!"))
}
@AssertCalled(count = 1)
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match", url, equalTo(GeckoSession.createDataUri(bytes, "text/html")))
}
@ -681,7 +681,7 @@ class NavigationDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(object : Callbacks.NavigationDelegate, Callbacks.ProgressDelegate {
@AssertCalled(count = 1)
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match", url, equalTo(GeckoSession.createDataUri(bytes, mimeType)))
}
@ -722,7 +722,7 @@ class NavigationDelegateTest : BaseSessionTest() {
}
@AssertCalled(count = 1, order = [2])
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match", url, endsWith(HELLO_HTML_PATH))
}
@ -752,7 +752,7 @@ class NavigationDelegateTest : BaseSessionTest() {
sessionRule.forCallbacksDuringWait(object : Callbacks.NavigationDelegate {
@AssertCalled(count = 1)
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match", url, endsWith(HELLO2_HTML_PATH))
}
})
@ -774,7 +774,7 @@ class NavigationDelegateTest : BaseSessionTest() {
}
@AssertCalled(count = 1, order = [2])
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match", url, endsWith(HELLO_HTML_PATH))
}
@ -811,7 +811,7 @@ class NavigationDelegateTest : BaseSessionTest() {
}
@AssertCalled(count = 1, order = [2])
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
assertThat("URL should match", url, endsWith(HELLO2_HTML_PATH))
}

Просмотреть файл

@ -53,10 +53,12 @@ class PermissionDelegateTest : BaseSessionTest() {
mainSession.delegateDuringNextWait(object : Callbacks.PermissionDelegate {
@AssertCalled(count = 1)
override fun onAndroidPermissionsRequest(session: GeckoSession, permissions: Array<out String>, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onAndroidPermissionsRequest(
session: GeckoSession, permissions: Array<out String>?,
callback: GeckoSession.PermissionDelegate.Callback) {
assertThat("Permissions list should be correct",
listOf(*permissions), hasItems(Manifest.permission.CAMERA,
Manifest.permission.RECORD_AUDIO))
listOf(*permissions!!), hasItems(Manifest.permission.CAMERA,
Manifest.permission.RECORD_AUDIO))
callback.grant()
}
})
@ -72,11 +74,15 @@ class PermissionDelegateTest : BaseSessionTest() {
mainSession.delegateDuringNextWait(object : Callbacks.PermissionDelegate {
@AssertCalled(count = 1)
override fun onMediaPermissionRequest(session: GeckoSession, uri: String, video: Array<out GeckoSession.PermissionDelegate.MediaSource>, audio: Array<out GeckoSession.PermissionDelegate.MediaSource>, callback: GeckoSession.PermissionDelegate.MediaCallback) {
override fun onMediaPermissionRequest(
session: GeckoSession, uri: String,
video: Array<out GeckoSession.PermissionDelegate.MediaSource>?,
audio: Array<out GeckoSession.PermissionDelegate.MediaSource>?,
callback: GeckoSession.PermissionDelegate.MediaCallback) {
assertThat("URI should match", uri, endsWith(HELLO_HTML_PATH))
assertThat("Video source should be valid", video, not(emptyArray()))
assertThat("Audio source should be valid", audio, not(emptyArray()))
callback.grant(video[0], audio[0])
callback.grant(video!![0], audio!![0])
}
})
@ -100,7 +106,11 @@ class PermissionDelegateTest : BaseSessionTest() {
// Now test rejecting the request.
mainSession.delegateDuringNextWait(object : Callbacks.PermissionDelegate {
@AssertCalled(count = 1)
override fun onMediaPermissionRequest(session: GeckoSession, uri: String, video: Array<out GeckoSession.PermissionDelegate.MediaSource>, audio: Array<out GeckoSession.PermissionDelegate.MediaSource>, callback: GeckoSession.PermissionDelegate.MediaCallback) {
override fun onMediaPermissionRequest(
session: GeckoSession, uri: String,
video: Array<out GeckoSession.PermissionDelegate.MediaSource>?,
audio: Array<out GeckoSession.PermissionDelegate.MediaSource>?,
callback: GeckoSession.PermissionDelegate.MediaCallback) {
callback.reject()
}
})
@ -127,7 +137,9 @@ class PermissionDelegateTest : BaseSessionTest() {
mainSession.delegateDuringNextWait(object : Callbacks.PermissionDelegate {
// Ensure the content permission is asked first, before the Android permission.
@AssertCalled(count = 1, order = [1])
override fun onContentPermissionRequest(session: GeckoSession, uri: String, type: Int, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onContentPermissionRequest(
session: GeckoSession, uri: String?, type: Int,
callback: GeckoSession.PermissionDelegate.Callback) {
assertThat("URI should match", uri, endsWith(HELLO_HTML_PATH))
assertThat("Type should match", type,
equalTo(GeckoSession.PermissionDelegate.PERMISSION_GEOLOCATION))
@ -135,9 +147,11 @@ class PermissionDelegateTest : BaseSessionTest() {
}
@AssertCalled(count = 1, order = [2])
override fun onAndroidPermissionsRequest(session: GeckoSession, permissions: Array<out String>, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onAndroidPermissionsRequest(
session: GeckoSession, permissions: Array<out String>?,
callback: GeckoSession.PermissionDelegate.Callback) {
assertThat("Permissions list should be correct",
listOf(*permissions), hasItems(Manifest.permission.ACCESS_FINE_LOCATION))
listOf(*permissions!!), hasItems(Manifest.permission.ACCESS_FINE_LOCATION))
callback.grant()
}
})
@ -158,12 +172,16 @@ class PermissionDelegateTest : BaseSessionTest() {
mainSession.delegateDuringNextWait(object : Callbacks.PermissionDelegate {
@AssertCalled(count = 1)
override fun onContentPermissionRequest(session: GeckoSession, uri: String, type: Int, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onContentPermissionRequest(
session: GeckoSession, uri: String?, type: Int,
callback: GeckoSession.PermissionDelegate.Callback) {
callback.reject()
}
@AssertCalled(count = 0)
override fun onAndroidPermissionsRequest(session: GeckoSession, permissions: Array<out String>, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onAndroidPermissionsRequest(
session: GeckoSession, permissions: Array<out String>?,
callback: GeckoSession.PermissionDelegate.Callback) {
}
})
@ -181,7 +199,9 @@ class PermissionDelegateTest : BaseSessionTest() {
mainSession.delegateDuringNextWait(object : Callbacks.PermissionDelegate {
@AssertCalled(count = 1)
override fun onContentPermissionRequest(session: GeckoSession, uri: String, type: Int, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onContentPermissionRequest(
session: GeckoSession, uri: String?, type: Int,
callback: GeckoSession.PermissionDelegate.Callback) {
assertThat("URI should match", uri, endsWith(HELLO_HTML_PATH))
assertThat("Type should match", type,
equalTo(GeckoSession.PermissionDelegate.PERMISSION_DESKTOP_NOTIFICATION))
@ -202,7 +222,9 @@ class PermissionDelegateTest : BaseSessionTest() {
mainSession.delegateDuringNextWait(object : Callbacks.PermissionDelegate {
@AssertCalled(count = 1)
override fun onContentPermissionRequest(session: GeckoSession, uri: String, type: Int, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onContentPermissionRequest(
session: GeckoSession, uri: String?, type: Int,
callback: GeckoSession.PermissionDelegate.Callback) {
callback.reject()
}
})

Просмотреть файл

@ -27,7 +27,8 @@ class PromptDelegateTest : BaseSessionTest() {
sessionRule.waitUntilCalled(object : Callbacks.PromptDelegate {
@AssertCalled(count = 1)
override fun onPopupRequest(session: GeckoSession, targetUri: String): GeckoResult<AllowOrDeny>? {
override fun onPopupRequest(session: GeckoSession, targetUri: String?)
: GeckoResult<AllowOrDeny>? {
assertThat("Session should not be null", session, notNullValue())
assertThat("URL should not be null", targetUri, notNullValue())
assertThat("URL should match", targetUri, endsWith(HELLO_HTML_PATH))
@ -42,7 +43,8 @@ class PromptDelegateTest : BaseSessionTest() {
sessionRule.delegateDuringNextWait(object : Callbacks.PromptDelegate, Callbacks.NavigationDelegate {
@AssertCalled(count = 1)
override fun onPopupRequest(session: GeckoSession, targetUri: String): GeckoResult<AllowOrDeny>? {
override fun onPopupRequest(session: GeckoSession, targetUri: String?)
: GeckoResult<AllowOrDeny>? {
assertThat("Session should not be null", session, notNullValue())
assertThat("URL should not be null", targetUri, notNullValue())
assertThat("URL should match", targetUri, endsWith(HELLO_HTML_PATH))
@ -69,7 +71,8 @@ class PromptDelegateTest : BaseSessionTest() {
sessionRule.delegateDuringNextWait(object : Callbacks.PromptDelegate, Callbacks.NavigationDelegate {
@AssertCalled(count = 1)
override fun onPopupRequest(session: GeckoSession, targetUri: String): GeckoResult<AllowOrDeny>? {
override fun onPopupRequest(session: GeckoSession, targetUri: String?)
: GeckoResult<AllowOrDeny>? {
assertThat("Session should not be null", session, notNullValue())
assertThat("URL should not be null", targetUri, notNullValue())
assertThat("URL should match", targetUri, endsWith(HELLO_HTML_PATH))

Просмотреть файл

@ -242,7 +242,7 @@ class SessionLifecycleTest : BaseSessionTest() {
// Enable navigation notifications on the new, closed session.
var onLocationCount = 0
sessionRule.session.navigationDelegate = object : Callbacks.NavigationDelegate {
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
onLocationCount++
}
}
@ -393,15 +393,15 @@ class SessionLifecycleTest : BaseSessionTest() {
@Test fun restoreInstanceState_sameClosedSession() {
val view = testRestoreInstanceState(mainSession, mainSession)
assertThat("View session is unchanged", view.session, equalTo(mainSession))
assertThat("View session is closed", view.session.isOpen, equalTo(false))
assertThat("View session is closed", view.session!!.isOpen, equalTo(false))
}
@Test fun restoreInstanceState_sameOpenSession() {
// We should keep the session open when restoring the same open session.
val view = testRestoreInstanceState(mainSession, mainSession)
assertThat("View session is unchanged", view.session, equalTo(mainSession))
assertThat("View session is open", view.session.isOpen, equalTo(true))
view.session.reload()
assertThat("View session is open", view.session!!.isOpen, equalTo(true))
view.session!!.reload()
sessionRule.waitForPageStop()
}

Просмотреть файл

@ -79,7 +79,7 @@ class WebExecutorTest {
}
private fun fetch(request: WebRequest, @GeckoWebExecutor.FetchFlags flags: Int): WebResponse {
return executor.fetch(request, flags).poll(env.defaultTimeoutMillis)
return executor.fetch(request, flags).poll(env.defaultTimeoutMillis)!!
}
fun String.toDirectByteBuffer(): ByteBuffer {
@ -211,7 +211,7 @@ class WebExecutorTest {
@Test
fun testResolveV4() {
val addresses = executor.resolve("localhost").poll()
val addresses = executor.resolve("localhost").poll()!!
assertThat("Addresses should not be null",
addresses, notNullValue())
assertThat("First address should be loopback",
@ -223,7 +223,7 @@ class WebExecutorTest {
@Test
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.LOLLIPOP)
fun testResolveV6() {
val addresses = executor.resolve("ip6-localhost").poll()
val addresses = executor.resolve("ip6-localhost").poll()!!
assertThat("Addresses should not be null",
addresses, notNullValue())
assertThat("First address should be loopback",

Просмотреть файл

@ -27,7 +27,7 @@ class Callbacks private constructor() {
TextInputDelegate, TrackingProtectionDelegate
interface ContentDelegate : GeckoSession.ContentDelegate {
override fun onTitleChange(session: GeckoSession, title: String) {
override fun onTitleChange(session: GeckoSession, title: String?) {
}
override fun onFocusRequest(session: GeckoSession) {
@ -55,7 +55,7 @@ class Callbacks private constructor() {
}
interface NavigationDelegate : GeckoSession.NavigationDelegate {
override fun onLocationChange(session: GeckoSession, url: String) {
override fun onLocationChange(session: GeckoSession, url: String?) {
}
override fun onCanGoBack(session: GeckoSession, canGoBack: Boolean) {
@ -80,15 +80,23 @@ class Callbacks private constructor() {
}
interface PermissionDelegate : GeckoSession.PermissionDelegate {
override fun onAndroidPermissionsRequest(session: GeckoSession, permissions: Array<out String>, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onAndroidPermissionsRequest(
session: GeckoSession, permissions: Array<out String>?,
callback: GeckoSession.PermissionDelegate.Callback) {
callback.reject()
}
override fun onContentPermissionRequest(session: GeckoSession, uri: String, type: Int, callback: GeckoSession.PermissionDelegate.Callback) {
override fun onContentPermissionRequest(
session: GeckoSession, uri: String?, type: Int,
callback: GeckoSession.PermissionDelegate.Callback) {
callback.reject()
}
override fun onMediaPermissionRequest(session: GeckoSession, uri: String, video: Array<out GeckoSession.PermissionDelegate.MediaSource>, audio: Array<out GeckoSession.PermissionDelegate.MediaSource>, callback: GeckoSession.PermissionDelegate.MediaCallback) {
override fun onMediaPermissionRequest(
session: GeckoSession, uri: String,
video: Array<out GeckoSession.PermissionDelegate.MediaSource>?,
audio: Array<out GeckoSession.PermissionDelegate.MediaSource>?,
callback: GeckoSession.PermissionDelegate.MediaCallback) {
callback.reject()
}
}
@ -108,39 +116,54 @@ class Callbacks private constructor() {
}
interface PromptDelegate : GeckoSession.PromptDelegate {
override fun onAlert(session: GeckoSession, title: String, msg: String, callback: GeckoSession.PromptDelegate.AlertCallback) {
override fun onAlert(session: GeckoSession, title: String?, msg: String?,
callback: GeckoSession.PromptDelegate.AlertCallback) {
callback.dismiss()
}
override fun onButtonPrompt(session: GeckoSession, title: String, msg: String, btnMsg: Array<out String>, callback: GeckoSession.PromptDelegate.ButtonCallback) {
override fun onButtonPrompt(session: GeckoSession, title: String?, msg: String?,
btnMsg: Array<out String>?,
callback: GeckoSession.PromptDelegate.ButtonCallback) {
callback.dismiss()
}
override fun onTextPrompt(session: GeckoSession, title: String, msg: String, value: String, callback: GeckoSession.PromptDelegate.TextCallback) {
override fun onTextPrompt(session: GeckoSession, title: String?, msg: String?,
value: String?,
callback: GeckoSession.PromptDelegate.TextCallback) {
callback.dismiss()
}
override fun onAuthPrompt(session: GeckoSession, title: String, msg: String, options: GeckoSession.PromptDelegate.AuthOptions, callback: GeckoSession.PromptDelegate.AuthCallback) {
override fun onAuthPrompt(session: GeckoSession, title: String?, msg: String?,
options: GeckoSession.PromptDelegate.AuthOptions,
callback: GeckoSession.PromptDelegate.AuthCallback) {
callback.dismiss()
}
override fun onChoicePrompt(session: GeckoSession, title: String, msg: String, type: Int, choices: Array<out GeckoSession.PromptDelegate.Choice>, callback: GeckoSession.PromptDelegate.ChoiceCallback) {
override fun onChoicePrompt(session: GeckoSession, title: String?, msg: String?, type: Int,
choices: Array<out GeckoSession.PromptDelegate.Choice>,
callback: GeckoSession.PromptDelegate.ChoiceCallback) {
callback.dismiss()
}
override fun onColorPrompt(session: GeckoSession, title: String, value: String, callback: GeckoSession.PromptDelegate.TextCallback) {
override fun onColorPrompt(session: GeckoSession, title: String?, value: String?,
callback: GeckoSession.PromptDelegate.TextCallback) {
callback.dismiss()
}
override fun onDateTimePrompt(session: GeckoSession, title: String, type: Int, value: String, min: String, max: String, callback: GeckoSession.PromptDelegate.TextCallback) {
override fun onDateTimePrompt(session: GeckoSession, title: String?, type: Int,
value: String?, min: String?, max: String?,
callback: GeckoSession.PromptDelegate.TextCallback) {
callback.dismiss()
}
override fun onFilePrompt(session: GeckoSession, title: String, type: Int, mimeTypes: Array<out String>, callback: GeckoSession.PromptDelegate.FileCallback) {
override fun onFilePrompt(session: GeckoSession, title: String?, type: Int,
mimeTypes: Array<out String>?,
callback: GeckoSession.PromptDelegate.FileCallback) {
callback.dismiss()
}
override fun onPopupRequest(session: GeckoSession, targetUri: String): GeckoResult<AllowOrDeny>? {
override fun onPopupRequest(session: GeckoSession, targetUri: String?)
: GeckoResult<AllowOrDeny>? {
return null
}
}
@ -151,7 +174,7 @@ class Callbacks private constructor() {
}
interface TrackingProtectionDelegate : GeckoSession.TrackingProtectionDelegate {
override fun onTrackerBlocked(session: GeckoSession, uri: String, categories: Int) {
override fun onTrackerBlocked(session: GeckoSession, uri: String?, categories: Int) {
}
}

Просмотреть файл

@ -330,11 +330,11 @@ public class GeckoThread extends Thread {
}
@RobocopTarget
public static GeckoProfile getActiveProfile() {
public static @Nullable GeckoProfile getActiveProfile() {
return INSTANCE.getProfile();
}
public synchronized GeckoProfile getProfile() {
public synchronized @Nullable GeckoProfile getProfile() {
if (!mInitialized) {
return null;
}

Просмотреть файл

@ -16,6 +16,7 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
import android.util.Log;
import android.view.ActionMode;
@ -348,7 +349,8 @@ public class BasicSelectionActionDelegate implements ActionMode.Callback,
mActionMode = null;
}
public void onGetContentRect(final ActionMode mode, final View view, final Rect outRect) {
public void onGetContentRect(final @Nullable ActionMode mode, final @Nullable View view,
final @NonNull Rect outRect) {
ThreadUtils.assertOnUiThread();
if (mSelection.clientRect == null) {
return;

Просмотреть файл

@ -10,6 +10,7 @@ import org.mozilla.gecko.util.ThreadUtils;
import android.graphics.Color;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
import java.nio.IntBuffer;
@ -22,7 +23,7 @@ public final class CompositorController {
public interface GetPixelsCallback {
@UiThread
void onPixelsResult(int width, int height, IntBuffer pixels);
void onPixelsResult(int width, int height, @Nullable IntBuffer pixels);
}
private List<Runnable> mDrawCallbacks;
@ -147,7 +148,7 @@ public final class CompositorController {
*
* @return Current first paint callback or null if not set.
*/
public Runnable getFirstPaintCallback() {
public @Nullable Runnable getFirstPaintCallback() {
ThreadUtils.assertOnUiThread();
return mFirstPaintCallback;
}
@ -157,7 +158,7 @@ public final class CompositorController {
*
* @param callback First paint callback.
*/
public void setFirstPaintCallback(final Runnable callback) {
public void setFirstPaintCallback(final @Nullable Runnable callback) {
ThreadUtils.assertOnUiThread();
mFirstPaintCallback = callback;
}

Просмотреть файл

@ -7,6 +7,7 @@ import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;
import android.util.Log;
import java.io.BufferedReader;
@ -71,7 +72,9 @@ public class CrashReporter {
* @see GeckoRuntime#ACTION_CRASHED
*/
@AnyThread
public static GeckoResult<String> sendCrashReport(Context context, Intent intent, String appName)
public static GeckoResult<String> sendCrashReport(@NonNull Context context,
@NonNull Intent intent,
@NonNull String appName)
throws IOException, URISyntaxException {
return sendCrashReport(context, intent.getExtras(), appName);
}
@ -94,7 +97,9 @@ public class CrashReporter {
* @see GeckoRuntime#ACTION_CRASHED
*/
@AnyThread
public static GeckoResult<String> sendCrashReport(Context context, Bundle intentExtras, String appName)
public static @NonNull GeckoResult<String> sendCrashReport(@NonNull Context context,
@NonNull Bundle intentExtras,
@NonNull String appName)
throws IOException, URISyntaxException {
final File dumpFile = new File(intentExtras.getString(GeckoRuntime.EXTRA_MINIDUMP_PATH));
final File extrasFile = new File(intentExtras.getString(GeckoRuntime.EXTRA_EXTRAS_PATH));
@ -123,8 +128,12 @@ public class CrashReporter {
* @see GeckoRuntime#ACTION_CRASHED
*/
@AnyThread
public static GeckoResult<String> sendCrashReport(Context context, File minidumpFile, File extrasFile,
boolean success, String appName) throws IOException, URISyntaxException {
public static @NonNull GeckoResult<String> sendCrashReport(@NonNull Context context,
@NonNull File minidumpFile,
@NonNull File extrasFile,
boolean success,
@NonNull String appName)
throws IOException, URISyntaxException {
// Compute the minidump hash and generate the stack traces
computeMinidumpHash(extrasFile, minidumpFile);
@ -150,9 +159,12 @@ public class CrashReporter {
* @see GeckoRuntime#ACTION_CRASHED
*/
@AnyThread
public static GeckoResult<String> sendCrashReport(Context context, File minidumpFile,
Map<String, String> extras, boolean success,
String appName) throws IOException, URISyntaxException {
public static @NonNull GeckoResult<String> sendCrashReport(@NonNull Context context,
@NonNull File minidumpFile,
@NonNull Map<String, String> extras,
boolean success,
@NonNull String appName)
throws IOException, URISyntaxException {
Log.d(LOGTAG, "Sending crash report: " + minidumpFile.getPath());
String spec = extras.get(SERVER_URL_KEY);

Просмотреть файл

@ -9,6 +9,8 @@ import org.mozilla.gecko.util.ThreadUtils;
import android.graphics.Bitmap;
import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
import android.util.Log;
@ -38,7 +40,7 @@ public final class DynamicToolbarAnimator {
public interface ToolbarChromeProxy {
@UiThread
public Bitmap getBitmapOfToolbarChrome();
public @Nullable Bitmap getBitmapOfToolbarChrome();
@UiThread
public boolean isToolbarChromeVisible();
@UiThread
@ -57,12 +59,12 @@ public final class DynamicToolbarAnimator {
mCompositor = aTarget.mCompositor;
}
public ToolbarChromeProxy getToolbarChromeProxy() {
public @Nullable ToolbarChromeProxy getToolbarChromeProxy() {
ThreadUtils.assertOnUiThread();
return mToolbarChromeProxy;
}
public void setToolbarChromeProxy(ToolbarChromeProxy aToolbarChromeProxy) {
public void setToolbarChromeProxy(@Nullable ToolbarChromeProxy aToolbarChromeProxy) {
ThreadUtils.assertOnUiThread();
mToolbarChromeProxy = aToolbarChromeProxy;
}
@ -98,13 +100,13 @@ public final class DynamicToolbarAnimator {
return !mPinFlags.isEmpty();
}
public boolean isPinnedBy(PinReason reason) {
public boolean isPinnedBy(@NonNull PinReason reason) {
ThreadUtils.assertOnUiThread();
return mPinFlags.contains(reason);
}
public void setPinned(final boolean pinned, final PinReason reason) {
public void setPinned(final boolean pinned, final @NonNull PinReason reason) {
ThreadUtils.assertOnUiThread();
if (pinned != mPinFlags.contains(reason) && mCompositor.isReady()) {

Просмотреть файл

@ -6,6 +6,7 @@
package org.mozilla.geckoview;
import android.support.annotation.NonNull;
import android.support.annotation.UiThread;
import android.view.Surface;
@ -36,7 +37,7 @@ public class GeckoDisplay {
* @param height New height of the Surface. Can not be negative.
*/
@UiThread
public void surfaceChanged(Surface surface, int width, int height) {
public void surfaceChanged(@NonNull Surface surface, int width, int height) {
surfaceChanged(surface, 0, 0, width, height);
}
@ -56,7 +57,7 @@ public class GeckoDisplay {
* @throws IllegalArgumentException if left or top are negative.
*/
@UiThread
public void surfaceChanged(Surface surface, int left, int top, int width, int height) {
public void surfaceChanged(@NonNull Surface surface, int left, int top, int width, int height) {
ThreadUtils.assertOnUiThread();
if ((left < 0) || (top < 0)) {

Просмотреть файл

@ -7,6 +7,7 @@
package org.mozilla.geckoview;
import android.support.annotation.AnyThread;
import android.support.annotation.Nullable;
/**
* This is used to receive async responses from delegate methods.
@ -18,5 +19,5 @@ public interface GeckoResponse<T> {
* @param value The value contained in the response.
*/
@AnyThread
void respond(T value);
void respond(@Nullable T value);
}

Просмотреть файл

@ -452,7 +452,7 @@ public class GeckoResult<T> {
* @throws Throwable The {@link Throwable} contained in this result, if any.
* @throws IllegalThreadStateException if this method is called on a thread that has a {@link Looper}.
*/
public synchronized T poll() throws Throwable {
public synchronized @Nullable T poll() throws Throwable {
if (Looper.myLooper() != null) {
throw new IllegalThreadStateException("Cannot poll indefinitely from thread with Looper");
}
@ -477,7 +477,7 @@ public class GeckoResult<T> {
* @throws TimeoutException if we wait more than timeoutMillis before the result
* is completed.
*/
public synchronized T poll(long timeoutMillis) throws Throwable {
public synchronized @Nullable T poll(long timeoutMillis) throws Throwable {
final long start = SystemClock.uptimeMillis();
long remaining = timeoutMillis;
while (!mComplete && remaining > 0) {
@ -508,7 +508,7 @@ public class GeckoResult<T> {
* @throws IllegalStateException If the result is already completed.
*/
@WrapForJNI
public synchronized void complete(final T value) {
public synchronized void complete(final @Nullable T value) {
if (mComplete) {
throw new IllegalStateException("result is already complete");
}

Просмотреть файл

@ -317,7 +317,7 @@ public final class GeckoRuntime implements Parcelable {
* @param delegate an implementation of {@link GeckoRuntime.Delegate}.
*/
@UiThread
public void setDelegate(final Delegate delegate) {
public void setDelegate(final @Nullable Delegate delegate) {
ThreadUtils.assertOnUiThread();
mDelegate = delegate;
}
@ -333,7 +333,7 @@ public final class GeckoRuntime implements Parcelable {
}
@AnyThread
public GeckoRuntimeSettings getSettings() {
public @Nullable GeckoRuntimeSettings getSettings() {
return mSettings;
}
@ -352,7 +352,7 @@ public final class GeckoRuntime implements Parcelable {
* @return The telemetry object.
*/
@UiThread
public RuntimeTelemetry getTelemetry() {
public @NonNull RuntimeTelemetry getTelemetry() {
ThreadUtils.assertOnUiThread();
if (mTelemetry == null) {
@ -369,7 +369,7 @@ public final class GeckoRuntime implements Parcelable {
* @return Profile directory
*/
@UiThread
public File getProfileDir() {
public @Nullable File getProfileDir() {
ThreadUtils.assertOnUiThread();
return GeckoThread.getActiveProfile().getDir();
}
@ -408,7 +408,7 @@ public final class GeckoRuntime implements Parcelable {
// AIDL code may call readFromParcel even though it's not part of Parcelable.
@AnyThread
public void readFromParcel(final Parcel source) {
public void readFromParcel(final @NonNull Parcel source) {
mSettings = source.readParcelable(getClass().getClassLoader());
}

Просмотреть файл

@ -501,7 +501,7 @@ public final class GeckoRuntimeSettings implements Parcelable {
*
* @return The Gecko process arguments.
*/
public String[] getArguments() {
public @NonNull String[] getArguments() {
return mArgs;
}
@ -510,7 +510,7 @@ public final class GeckoRuntimeSettings implements Parcelable {
*
* @return The Gecko intent extras.
*/
public Bundle getExtras() {
public @NonNull Bundle getExtras() {
return mExtras;
}
@ -593,7 +593,7 @@ public final class GeckoRuntimeSettings implements Parcelable {
*
* @return Returns a positive number. Will return null if not set.
*/
public Float getDisplayDensityOverride() {
public @Nullable Float getDisplayDensityOverride() {
if (mDisplayDensityOverride > 0.0f) {
return mDisplayDensityOverride;
}
@ -605,14 +605,14 @@ public final class GeckoRuntimeSettings implements Parcelable {
*
* @return Returns a positive number. Will return null if not set.
*/
public Integer getDisplayDpiOverride() {
public @Nullable Integer getDisplayDpiOverride() {
if (mDisplayDpiOverride > 0) {
return mDisplayDpiOverride;
}
return null;
}
public Class<? extends Service> getCrashHandler() {
public @Nullable Class<? extends Service> getCrashHandler() {
return mCrashHandler;
}
@ -622,7 +622,7 @@ public final class GeckoRuntimeSettings implements Parcelable {
* @return Returns a Rect containing the dimensions to use for the window size.
* Will return null if not set.
*/
public Rect getScreenSizeOverride() {
public @Nullable Rect getScreenSizeOverride() {
if ((mScreenWidthOverride > 0) && (mScreenHeightOverride > 0)) {
return new Rect(0, 0, mScreenWidthOverride, mScreenHeightOverride);
}
@ -634,7 +634,7 @@ public final class GeckoRuntimeSettings implements Parcelable {
*
* @return A list of locale codes in Gecko format ("en" or "en-US").
*/
public String[] getLocales() {
public @Nullable String[] getLocales() {
return mRequestedLocales;
}
@ -643,7 +643,7 @@ public final class GeckoRuntimeSettings implements Parcelable {
*
* @param requestedLocales An ordered list of locales in Gecko format ("en-US").
*/
public void setLocales(String[] requestedLocales) {
public void setLocales(@Nullable String[] requestedLocales) {
mRequestedLocales = requestedLocales;
flushLocales();
}
@ -877,7 +877,7 @@ public final class GeckoRuntimeSettings implements Parcelable {
}
// AIDL code may call readFromParcel even though it's not part of Parcelable.
public void readFromParcel(final Parcel source) {
public void readFromParcel(final @NonNull Parcel source) {
mUseContentProcess = ParcelableUtils.readBoolean(source);
mArgs = source.createStringArray();
mExtras.readFromParcel(source);

Просмотреть файл

@ -896,7 +896,7 @@ public class GeckoSession implements Parcelable {
* @return PromptDelegate instance or null if using default delegate.
*/
@UiThread
public PermissionDelegate getPermissionDelegate() {
public @Nullable PermissionDelegate getPermissionDelegate() {
ThreadUtils.assertOnUiThread();
return mPermissionHandler.getDelegate();
}
@ -906,7 +906,7 @@ public class GeckoSession implements Parcelable {
* @param delegate PermissionDelegate instance or null to use the default delegate.
*/
@UiThread
public void setPermissionDelegate(final PermissionDelegate delegate) {
public void setPermissionDelegate(final @Nullable PermissionDelegate delegate) {
ThreadUtils.assertOnUiThread();
mPermissionHandler.setDelegate(delegate, this);
}
@ -1169,7 +1169,7 @@ public class GeckoSession implements Parcelable {
// AIDL code may call readFromParcel even though it's not part of Parcelable.
@AnyThread
public void readFromParcel(final Parcel source) {
public void readFromParcel(final @NonNull Parcel source) {
final IBinder binder = source.readStrongBinder();
final IInterface ifce = (binder != null) ?
binder.queryLocalInterface(Window.class.getName()) : null;
@ -1654,7 +1654,7 @@ public class GeckoSession implements Parcelable {
* @return SessionFinder instance.
*/
@AnyThread
public SessionFinder getFinder() {
public @NonNull SessionFinder getFinder() {
if (mFinder == null) {
mFinder = new SessionFinder(getEventDispatcher());
}
@ -1727,7 +1727,7 @@ public class GeckoSession implements Parcelable {
}
// AIDL code may call readFromParcel even though it's not part of Parcelable.
public void readFromParcel(final Parcel source) {
public void readFromParcel(final @NonNull Parcel source) {
mState = source.readString();
}
@ -1773,7 +1773,7 @@ public class GeckoSession implements Parcelable {
* @param state A saved session state; this should originate from GeckoSession.saveState().
*/
@AnyThread
public void restoreState(final SessionState state) {
public void restoreState(final @NonNull SessionState state) {
final GeckoBundle msg = new GeckoBundle(1);
msg.putString("state", state.toString());
mEventDispatcher.dispatch("GeckoView:RestoreState", msg);
@ -1825,7 +1825,7 @@ public class GeckoSession implements Parcelable {
}
@AnyThread
public GeckoSessionSettings getSettings() {
public @NonNull GeckoSessionSettings getSettings() {
return mSettings;
}
@ -1843,7 +1843,7 @@ public class GeckoSession implements Parcelable {
* @param delegate An implementation of ContentDelegate.
*/
@UiThread
public void setContentDelegate(ContentDelegate delegate) {
public void setContentDelegate(@Nullable ContentDelegate delegate) {
ThreadUtils.assertOnUiThread();
mContentHandler.setDelegate(delegate, this);
}
@ -1853,7 +1853,7 @@ public class GeckoSession implements Parcelable {
* @return The current content callback handler.
*/
@UiThread
public ContentDelegate getContentDelegate() {
public @Nullable ContentDelegate getContentDelegate() {
ThreadUtils.assertOnUiThread();
return mContentHandler.getDelegate();
}
@ -1864,7 +1864,7 @@ public class GeckoSession implements Parcelable {
* @param delegate An implementation of ProgressDelegate.
*/
@UiThread
public void setProgressDelegate(ProgressDelegate delegate) {
public void setProgressDelegate(@Nullable ProgressDelegate delegate) {
ThreadUtils.assertOnUiThread();
mProgressHandler.setDelegate(delegate, this);
}
@ -1874,7 +1874,7 @@ public class GeckoSession implements Parcelable {
* @return The current progress callback handler.
*/
@UiThread
public ProgressDelegate getProgressDelegate() {
public @Nullable ProgressDelegate getProgressDelegate() {
ThreadUtils.assertOnUiThread();
return mProgressHandler.getDelegate();
}
@ -1885,7 +1885,7 @@ public class GeckoSession implements Parcelable {
* @param delegate An implementation of NavigationDelegate.
*/
@UiThread
public void setNavigationDelegate(NavigationDelegate delegate) {
public void setNavigationDelegate(@Nullable NavigationDelegate delegate) {
ThreadUtils.assertOnUiThread();
mNavigationHandler.setDelegate(delegate, this);
}
@ -1895,7 +1895,7 @@ public class GeckoSession implements Parcelable {
* @return The current navigation callback handler.
*/
@UiThread
public NavigationDelegate getNavigationDelegate() {
public @Nullable NavigationDelegate getNavigationDelegate() {
ThreadUtils.assertOnUiThread();
return mNavigationHandler.getDelegate();
}
@ -1906,13 +1906,13 @@ public class GeckoSession implements Parcelable {
* @param delegate An implementation of ScrollDelegate.
*/
@UiThread
public void setScrollDelegate(ScrollDelegate delegate) {
public void setScrollDelegate(@Nullable ScrollDelegate delegate) {
ThreadUtils.assertOnUiThread();
mScrollHandler.setDelegate(delegate, this);
}
@UiThread
public ScrollDelegate getScrollDelegate() {
public @Nullable ScrollDelegate getScrollDelegate() {
ThreadUtils.assertOnUiThread();
return mScrollHandler.getDelegate();
}
@ -1940,7 +1940,7 @@ public class GeckoSession implements Parcelable {
* @param delegate An implementation of TrackingProtectionDelegate.
*/
@AnyThread
public void setTrackingProtectionDelegate(TrackingProtectionDelegate delegate) {
public void setTrackingProtectionDelegate(@Nullable TrackingProtectionDelegate delegate) {
mTrackingProtectionHandler.setDelegate(delegate, this);
}
@ -1949,7 +1949,7 @@ public class GeckoSession implements Parcelable {
* @return The current tracking protection callback handler.
*/
@AnyThread
public TrackingProtectionDelegate getTrackingProtectionDelegate() {
public @Nullable TrackingProtectionDelegate getTrackingProtectionDelegate() {
return mTrackingProtectionHandler.getDelegate();
}
@ -1958,7 +1958,7 @@ public class GeckoSession implements Parcelable {
* @param delegate PromptDelegate instance or null to use the built-in delegate.
*/
@AnyThread
public void setPromptDelegate(PromptDelegate delegate) {
public void setPromptDelegate(@Nullable PromptDelegate delegate) {
mPromptDelegate = delegate;
}
@ -1967,7 +1967,7 @@ public class GeckoSession implements Parcelable {
* @return PromptDelegate instance or null if using built-in delegate.
*/
@AnyThread
public PromptDelegate getPromptDelegate() {
public @Nullable PromptDelegate getPromptDelegate() {
return mPromptDelegate;
}
@ -2427,7 +2427,7 @@ public class GeckoSession implements Parcelable {
}
@AnyThread
public EventDispatcher getEventDispatcher() {
public @NonNull EventDispatcher getEventDispatcher() {
return mEventDispatcher;
}
@ -2548,7 +2548,7 @@ public class GeckoSession implements Parcelable {
* @param url The resource being loaded.
*/
@UiThread
void onPageStart(GeckoSession session, String url);
void onPageStart(@NonNull GeckoSession session, @NonNull String url);
/**
* A View has finished loading content from the network.
@ -2556,7 +2556,7 @@ public class GeckoSession implements Parcelable {
* @param success Whether the page loaded successfully or an error occurred.
*/
@UiThread
void onPageStop(GeckoSession session, boolean success);
void onPageStop(@NonNull GeckoSession session, boolean success);
/**
* Page loading has progressed.
@ -2564,7 +2564,7 @@ public class GeckoSession implements Parcelable {
* @param progress Current page load progress value [0, 100].
*/
@UiThread
void onProgressChange(GeckoSession session, int progress);
void onProgressChange(@NonNull GeckoSession session, int progress);
/**
* The security status has been updated.
@ -2572,7 +2572,8 @@ public class GeckoSession implements Parcelable {
* @param securityInfo The new security information.
*/
@UiThread
void onSecurityChange(GeckoSession session, SecurityInformation securityInfo);
void onSecurityChange(@NonNull GeckoSession session,
@NonNull SecurityInformation securityInfo);
}
/**
@ -2631,7 +2632,7 @@ public class GeckoSession implements Parcelable {
* @param title The title sent from the content.
*/
@UiThread
void onTitleChange(GeckoSession session, String title);
void onTitleChange(@NonNull GeckoSession session, @Nullable String title);
/**
* A page has requested focus. Note that window.focus() in content will not result
@ -2639,14 +2640,14 @@ public class GeckoSession implements Parcelable {
* @param session The GeckoSession that initiated the callback.
*/
@UiThread
void onFocusRequest(GeckoSession session);
void onFocusRequest(@NonNull GeckoSession session);
/**
* A page has requested to close
* @param session The GeckoSession that initiated the callback.
*/
@UiThread
void onCloseRequest(GeckoSession session);
void onCloseRequest(@NonNull GeckoSession session);
/**
* A page has entered or exited full screen mode. Typically, the implementation
@ -2657,7 +2658,7 @@ public class GeckoSession implements Parcelable {
* @param fullScreen True if the page is in full screen mode.
*/
@UiThread
void onFullScreen(GeckoSession session, boolean fullScreen);
void onFullScreen(@NonNull GeckoSession session, boolean fullScreen);
/**
* Element details for onContextMenu callbacks.
@ -2746,7 +2747,7 @@ public class GeckoSession implements Parcelable {
* @param response the WebResponseInfo for the external response
*/
@UiThread
void onExternalResponse(GeckoSession session, WebResponseInfo response);
void onExternalResponse(@NonNull GeckoSession session, @NonNull WebResponseInfo response);
/**
* The content process hosting this GeckoSession has crashed. The
@ -2758,7 +2759,7 @@ public class GeckoSession implements Parcelable {
* @param session The GeckoSession that crashed.
*/
@UiThread
void onCrash(GeckoSession session);
void onCrash(@NonNull GeckoSession session);
/**
* Notification that the first content composition has occurred.
@ -2767,7 +2768,7 @@ public class GeckoSession implements Parcelable {
* @param session The GeckoSession that had a first paint event.
*/
@UiThread
void onFirstComposite(GeckoSession session);
void onFirstComposite(@NonNull GeckoSession session);
}
public interface SelectionActionDelegate {
@ -2920,8 +2921,8 @@ public class GeckoSession implements Parcelable {
* multiple times to perform multiple actions at once.
*/
@UiThread
void onShowActionRequest(GeckoSession session, Selection selection,
@Action String[] actions, GeckoResponse<String> response);
void onShowActionRequest(@NonNull GeckoSession session, @NonNull Selection selection,
@Action String[] actions, @NonNull GeckoResponse<String> response);
@Retention(RetentionPolicy.SOURCE)
@IntDef({HIDE_REASON_NO_SELECTION,
@ -2962,7 +2963,7 @@ public class GeckoSession implements Parcelable {
* {@link #HIDE_REASON_NO_SELECTION HIDE_REASON_*} constants.
*/
@UiThread
void onHideAction(GeckoSession session, @HideReason int reason);
void onHideAction(@NonNull GeckoSession session, @HideReason int reason);
}
public interface NavigationDelegate {
@ -2972,7 +2973,7 @@ public class GeckoSession implements Parcelable {
* @param url The resource being loaded.
*/
@UiThread
void onLocationChange(GeckoSession session, String url);
void onLocationChange(@NonNull GeckoSession session, @Nullable String url);
/**
* The view's ability to go back has changed.
@ -2980,7 +2981,7 @@ public class GeckoSession implements Parcelable {
* @param canGoBack The new value for the ability.
*/
@UiThread
void onCanGoBack(GeckoSession session, boolean canGoBack);
void onCanGoBack(@NonNull GeckoSession session, boolean canGoBack);
/**
* The view's ability to go forward has changed.
@ -2988,7 +2989,7 @@ public class GeckoSession implements Parcelable {
* @param canGoForward The new value for the ability.
*/
@UiThread
void onCanGoForward(GeckoSession session, boolean canGoForward);
void onCanGoForward(@NonNull GeckoSession session, boolean canGoForward);
@Retention(RetentionPolicy.SOURCE)
@IntDef({TARGET_WINDOW_NONE, TARGET_WINDOW_CURRENT, TARGET_WINDOW_NEW})
@ -3102,7 +3103,9 @@ public class GeckoSession implements Parcelable {
* @return A URI to display as an error. Returning null will halt the load entirely.
*/
@UiThread
GeckoResult<String> onLoadError(GeckoSession session, String uri, WebRequestError error);
@Nullable GeckoResult<String> onLoadError(@NonNull GeckoSession session,
@Nullable String uri,
@NonNull WebRequestError error);
}
/**
@ -3142,7 +3145,7 @@ public class GeckoSession implements Parcelable {
* @return Checkbox message or null if none.
*/
@UiThread
String getCheckboxMessage();
@Nullable String getCheckboxMessage();
/**
* Return the initial value for the optional checkbox.
@ -3170,7 +3173,8 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onAlert(GeckoSession session, String title, String msg, AlertCallback callback);
void onAlert(@NonNull GeckoSession session, @Nullable String title, @Nullable String msg,
@NonNull AlertCallback callback);
/**
* Callback interface for notifying the result of a button prompt.
@ -3204,8 +3208,9 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onButtonPrompt(GeckoSession session, String title, String msg,
String[] btnMsg, ButtonCallback callback);
void onButtonPrompt(@NonNull GeckoSession session, @Nullable String title,
@Nullable String msg, @Nullable String[] btnMsg,
@NonNull ButtonCallback callback);
/**
* Callback interface for notifying the result of prompts that have text results,
@ -3219,7 +3224,7 @@ public class GeckoSession implements Parcelable {
* @param text Text result.
*/
@UiThread
void confirm(String text);
void confirm(@Nullable String text);
}
/**
@ -3232,8 +3237,9 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onTextPrompt(GeckoSession session, String title, String msg,
String value, TextCallback callback);
void onTextPrompt(@NonNull GeckoSession session, @Nullable String title,
@Nullable String msg, @Nullable String value,
@NonNull TextCallback callback);
/**
* Callback interface for notifying the result of authentication prompts.
@ -3246,7 +3252,7 @@ public class GeckoSession implements Parcelable {
* @param password Entered password.
*/
@UiThread
void confirm(String password);
void confirm(@Nullable String password);
/**
* Called by the prompt implementation when a username/password prompt is
@ -3256,7 +3262,7 @@ public class GeckoSession implements Parcelable {
* @param password Entered password.
*/
@UiThread
void confirm(String username, String password);
void confirm(@NonNull String username, @NonNull String password);
}
class AuthOptions {
@ -3360,8 +3366,9 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onAuthPrompt(GeckoSession session, String title, String msg,
AuthOptions options, AuthCallback callback);
void onAuthPrompt(@NonNull GeckoSession session, @Nullable String title,
@Nullable String msg, @NonNull AuthOptions options,
@NonNull AuthCallback callback);
class Choice {
@Retention(RetentionPolicy.SOURCE)
@ -3466,7 +3473,7 @@ public class GeckoSession implements Parcelable {
* @param id ID of the selected item.
*/
@UiThread
void confirm(String id);
void confirm(@Nullable String id);
/**
* Called by the prompt implementation when the multiple-choice list is
@ -3475,7 +3482,7 @@ public class GeckoSession implements Parcelable {
* @param ids IDs of the selected items.
*/
@UiThread
void confirm(String[] ids);
void confirm(@NonNull String[] ids);
/**
* Called by the prompt implementation when the menu or single-choice list is
@ -3485,7 +3492,7 @@ public class GeckoSession implements Parcelable {
* Choice object that was passed to the implementation.
*/
@UiThread
void confirm(Choice item);
void confirm(@NonNull Choice item);
/**
* Called by the prompt implementation when the multiple-choice list is
@ -3495,7 +3502,7 @@ public class GeckoSession implements Parcelable {
* Choice objects that were passed to the implementation.
*/
@UiThread
void confirm(Choice[] items);
void confirm(@Nullable Choice[] items);
}
@ -3510,9 +3517,9 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onChoicePrompt(GeckoSession session, String title, String msg,
@Choice.ChoiceType int type, Choice[] choices,
ChoiceCallback callback);
void onChoicePrompt(@NonNull GeckoSession session, @Nullable String title,
@Nullable String msg, @Choice.ChoiceType int type,
@NonNull Choice[] choices, @NonNull ChoiceCallback callback);
/**
* Display a color prompt.
@ -3524,8 +3531,8 @@ public class GeckoSession implements Parcelable {
* HTML color format.
*/
@UiThread
void onColorPrompt(GeckoSession session, String title, String value,
TextCallback callback);
void onColorPrompt(@NonNull GeckoSession session, @Nullable String title,
@Nullable String value, @NonNull TextCallback callback);
@Retention(RetentionPolicy.SOURCE)
@IntDef({DATETIME_TYPE_DATE, DATETIME_TYPE_MONTH, DATETIME_TYPE_WEEK,
@ -3570,9 +3577,9 @@ public class GeckoSession implements Parcelable {
* HTML date/time format.
*/
@UiThread
void onDateTimePrompt(GeckoSession session, String title,
@DatetimeType int type, String value, String min,
String max, TextCallback callback);
void onDateTimePrompt(@NonNull GeckoSession session, @Nullable String title,
@DatetimeType int type, @Nullable String value, @Nullable String min,
@Nullable String max, @NonNull TextCallback callback);
/**
* Callback interface for notifying the result of file prompts.
@ -3586,7 +3593,7 @@ public class GeckoSession implements Parcelable {
* @param uri The URI of the selected file.
*/
@UiThread
void confirm(Context context, Uri uri);
void confirm(@Nullable Context context, @Nullable Uri uri);
/**
* Called by the prompt implementation when the user makes file selections in
@ -3596,7 +3603,7 @@ public class GeckoSession implements Parcelable {
* @param uris Array of URI objects for the selected files.
*/
@UiThread
void confirm(Context context, Uri[] uris);
void confirm(@Nullable Context context, @Nullable Uri[] uris);
}
@Retention(RetentionPolicy.SOURCE)
@ -3617,8 +3624,8 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onFilePrompt(GeckoSession session, String title, @FileType int type,
String[] mimeTypes, FileCallback callback);
void onFilePrompt(@NonNull GeckoSession session, @Nullable String title, @FileType int type,
@Nullable String[] mimeTypes, @NonNull FileCallback callback);
/**
* Display a popup request prompt; this occurs when content attempts to open
@ -3631,7 +3638,8 @@ public class GeckoSession implements Parcelable {
* whether or not the popup should be allowed to open.
*/
@UiThread
GeckoResult<AllowOrDeny> onPopupRequest(GeckoSession session, String targetUri);
GeckoResult<AllowOrDeny> onPopupRequest(@NonNull GeckoSession session,
@Nullable String targetUri);
}
/**
@ -3647,7 +3655,7 @@ public class GeckoSession implements Parcelable {
* @param scrollY The new vertical scroll position in pixels.
*/
@UiThread
public void onScrollChanged(GeckoSession session, int scrollX, int scrollY);
public void onScrollChanged(@NonNull GeckoSession session, int scrollX, int scrollY);
}
/**
@ -3656,7 +3664,7 @@ public class GeckoSession implements Parcelable {
* @return PanZoomController instance.
*/
@UiThread
public PanZoomController getPanZoomController() {
public @NonNull PanZoomController getPanZoomController() {
ThreadUtils.assertOnUiThread();
if (mNPZC == null) {
@ -3674,7 +3682,7 @@ public class GeckoSession implements Parcelable {
* @return OverscrollEdgeEffect instance.
*/
@UiThread
public OverscrollEdgeEffect getOverscrollEdgeEffect() {
public @NonNull OverscrollEdgeEffect getOverscrollEdgeEffect() {
ThreadUtils.assertOnUiThread();
if (mOverscroll == null) {
@ -3863,7 +3871,7 @@ public class GeckoSession implements Parcelable {
* One or more of the {@link #CATEGORY_AD CATEGORY_*} flags.
*/
@UiThread
void onTrackerBlocked(GeckoSession session, String uri,
void onTrackerBlocked(@NonNull GeckoSession session, @Nullable String uri,
@Category int categories);
}
@ -3929,8 +3937,9 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onAndroidPermissionsRequest(GeckoSession session, String[] permissions,
Callback callback);
void onAndroidPermissionsRequest(@NonNull GeckoSession session,
@Nullable String[] permissions,
@NonNull Callback callback);
/**
* Request content permission.
@ -3944,8 +3953,8 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onContentPermissionRequest(GeckoSession session, String uri,
@Permission int type, Callback callback);
void onContentPermissionRequest(@NonNull GeckoSession session, @Nullable String uri,
@Permission int type, @NonNull Callback callback);
class MediaSource {
@Retention(RetentionPolicy.SOURCE)
@ -4108,7 +4117,7 @@ public class GeckoSession implements Parcelable {
* or null when audio is not requested.
*/
@UiThread
void grant(final String video, final String audio);
void grant(final @Nullable String video, final @Nullable String audio);
/**
* Called by the implementation after permissions are granted; the
@ -4122,7 +4131,7 @@ public class GeckoSession implements Parcelable {
* or null when audio is not requested.
*/
@UiThread
void grant(final MediaSource video, final MediaSource audio);
void grant(final @Nullable MediaSource video, final @Nullable MediaSource audio);
/**
* Called by the implementation when permissions are not granted; the
@ -4143,8 +4152,9 @@ public class GeckoSession implements Parcelable {
* @param callback Callback interface.
*/
@UiThread
void onMediaPermissionRequest(GeckoSession session, String uri, MediaSource[] video,
MediaSource[] audio, MediaCallback callback);
void onMediaPermissionRequest(@NonNull GeckoSession session, @NonNull String uri,
@Nullable MediaSource[] video, @Nullable MediaSource[] audio,
@NonNull MediaCallback callback);
}
/**

Просмотреть файл

@ -156,7 +156,7 @@ public final class GeckoSessionSettings implements Parcelable {
mBundle.putInt(DISPLAY_MODE.name, DISPLAY_MODE_BROWSER);
}
public void setBoolean(final Key<Boolean> key, final boolean value) {
public void setBoolean(final @NonNull Key<Boolean> key, final boolean value) {
synchronized (mBundle) {
if (valueChangedLocked(key, value)) {
mBundle.putBoolean(key.name, value);
@ -165,13 +165,13 @@ public final class GeckoSessionSettings implements Parcelable {
}
}
public boolean getBoolean(final Key<Boolean> key) {
public boolean getBoolean(final @NonNull Key<Boolean> key) {
synchronized (mBundle) {
return mBundle.getBoolean(key.name);
}
}
public void setInt(final Key<Integer> key, final int value) {
public void setInt(final @NonNull Key<Integer> key, final int value) {
synchronized (mBundle) {
if (valueChangedLocked(key, value)) {
mBundle.putInt(key.name, value);
@ -180,13 +180,13 @@ public final class GeckoSessionSettings implements Parcelable {
}
}
public int getInt(final Key<Integer> key) {
public int getInt(final @NonNull Key<Integer> key) {
synchronized (mBundle) {
return mBundle.getInt(key.name);
}
}
public void setString(final Key<String> key, final String value) {
public void setString(final @NonNull Key<String> key, final @Nullable String value) {
synchronized (mBundle) {
if (valueChangedLocked(key, value)) {
mBundle.putString(key.name, value);
@ -195,7 +195,7 @@ public final class GeckoSessionSettings implements Parcelable {
}
}
public String getString(final Key<String> key) {
public String getString(final @NonNull Key<String> key) {
synchronized (mBundle) {
return mBundle.getString(key.name);
}
@ -244,12 +244,12 @@ public final class GeckoSessionSettings implements Parcelable {
}
@Override // Parcelable
public void writeToParcel(Parcel out, int flags) {
public void writeToParcel(@NonNull Parcel out, int flags) {
mBundle.writeToParcel(out, flags);
}
// AIDL code may call readFromParcel even though it's not part of Parcelable.
public void readFromParcel(final Parcel source) {
public void readFromParcel(final @NonNull Parcel source) {
mBundle.readFromParcel(source);
}

Просмотреть файл

@ -242,7 +242,7 @@ public class GeckoView extends FrameLayout {
}
}
public GeckoSession releaseSession() {
public @Nullable GeckoSession releaseSession() {
ThreadUtils.assertOnUiThread();
if (mSession == null) {
@ -371,21 +371,21 @@ public class GeckoView extends FrameLayout {
}
@AnyThread
public GeckoSession getSession() {
public @Nullable GeckoSession getSession() {
return mSession;
}
@AnyThread
public EventDispatcher getEventDispatcher() {
public @NonNull EventDispatcher getEventDispatcher() {
return mSession.getEventDispatcher();
}
public PanZoomController getPanZoomController() {
public @NonNull PanZoomController getPanZoomController() {
ThreadUtils.assertOnUiThread();
return mSession.getPanZoomController();
}
public DynamicToolbarAnimator getDynamicToolbarAnimator() {
public @NonNull DynamicToolbarAnimator getDynamicToolbarAnimator() {
ThreadUtils.assertOnUiThread();
return mSession.getDynamicToolbarAnimator();
}

Просмотреть файл

@ -8,6 +8,7 @@ package org.mozilla.geckoview;
import android.support.annotation.AnyThread;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
import android.util.Log;
@ -291,7 +292,7 @@ public class MediaElement {
* One of the {@link #MEDIA_STATE_PLAY MEDIA_STATE_*} flags.
*/
@UiThread
void onPlaybackStateChange(MediaElement mediaElement, @MediaStateFlags int mediaState);
void onPlaybackStateChange(@NonNull MediaElement mediaElement, @MediaStateFlags int mediaState);
/**
* The readiness state of the media has changed.
@ -301,7 +302,7 @@ public class MediaElement {
* One of the {@link #MEDIA_READY_STATE_HAVE_NOTHING MEDIA_READY_STATE_*} flags.
*/
@UiThread
void onReadyStateChange(MediaElement mediaElement, @ReadyStateFlags int readyState);
void onReadyStateChange(@NonNull MediaElement mediaElement, @ReadyStateFlags int readyState);
/**
* The media metadata has loaded or changed.
@ -310,7 +311,7 @@ public class MediaElement {
* @param metaData The MetaData values of the media.
*/
@UiThread
void onMetadataChange(MediaElement mediaElement, Metadata metaData);
void onMetadataChange(@NonNull MediaElement mediaElement, @NonNull Metadata metaData);
/**
* Indicates that a loading operation is in progress for the media.
@ -319,7 +320,8 @@ public class MediaElement {
* @param progressInfo Information about the load progress and buffered ranges.
*/
@UiThread
void onLoadProgress(MediaElement mediaElement, LoadProgressInfo progressInfo);
void onLoadProgress(@NonNull MediaElement mediaElement,
@NonNull LoadProgressInfo progressInfo);
/**
* The media audio volume has changed.
@ -329,7 +331,7 @@ public class MediaElement {
* @param muted True if the media is muted.
*/
@UiThread
void onVolumeChange(MediaElement mediaElement, double volume, boolean muted);
void onVolumeChange(@NonNull MediaElement mediaElement, double volume, boolean muted);
/**
* The current playback time has changed. This event is usually dispatched every 250ms.
@ -338,7 +340,7 @@ public class MediaElement {
* @param time The current playback time in seconds.
*/
@UiThread
void onTimeChange(MediaElement mediaElement, double time);
void onTimeChange(@NonNull MediaElement mediaElement, double time);
/**
* The media playback speed has changed.
@ -347,7 +349,7 @@ public class MediaElement {
* @param rate The current playback rate. A value of 1.0 indicates normal speed.
*/
@UiThread
void onPlaybackRateChange(MediaElement mediaElement, double rate);
void onPlaybackRateChange(@NonNull MediaElement mediaElement, double rate);
/**
* A media element has entered or exited fullscreen mode.
@ -356,7 +358,7 @@ public class MediaElement {
* @param fullscreen True if the media has entered full screen mode.
*/
@UiThread
void onFullscreenChange(MediaElement mediaElement, boolean fullscreen);
void onFullscreenChange(@NonNull MediaElement mediaElement, boolean fullscreen);
/**
* An error has occurred.
@ -366,7 +368,7 @@ public class MediaElement {
* One of the {@link #MEDIA_ERROR_NETWORK_NO_SOURCE MEDIA_ERROR_*} flags.
*/
@UiThread
void onError(MediaElement mediaElement, @MediaErrorFlags int errorCode);
void onError(@NonNull MediaElement mediaElement, @MediaErrorFlags int errorCode);
}
/* package */ long getVideoId() {

Просмотреть файл

@ -14,6 +14,8 @@ import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
import android.view.View;
import android.widget.EdgeEffect;
@ -48,7 +50,7 @@ public final class OverscrollEdgeEffect {
*
* @param context Context to use for the overscroll theme.
*/
public void setTheme(final Context context) {
public void setTheme(final @NonNull Context context) {
ThreadUtils.assertOnUiThread();
final PorterDuffXfermode mode = new PorterDuffXfermode(PorterDuff.Mode.SRC);
@ -90,7 +92,7 @@ public final class OverscrollEdgeEffect {
* @param runnable Invalidation Runnable.
* @see #getInvalidationCallback()
*/
public void setInvalidationCallback(final Runnable runnable) {
public void setInvalidationCallback(final @Nullable Runnable runnable) {
ThreadUtils.assertOnUiThread();
mInvalidationCallback = runnable;
}
@ -101,7 +103,7 @@ public final class OverscrollEdgeEffect {
* @return Invalidation Runnable.
* @see #setInvalidationCallback(Runnable)
*/
public Runnable getInvalidationCallback() {
public @Nullable Runnable getInvalidationCallback() {
ThreadUtils.assertOnUiThread();
return mInvalidationCallback;
}
@ -167,7 +169,7 @@ public final class OverscrollEdgeEffect {
*
* @param canvas Canvas to draw on.
*/
public void draw(final Canvas canvas) {
public void draw(final @NonNull Canvas canvas) {
ThreadUtils.assertOnUiThread();
final Rect pageRect = new Rect();

Просмотреть файл

@ -11,6 +11,7 @@ import org.mozilla.gecko.util.ThreadUtils;
import android.graphics.Rect;
import android.os.SystemClock;
import android.support.annotation.NonNull;
import android.support.annotation.UiThread;
import android.util.Log;
import android.util.Pair;
@ -185,7 +186,7 @@ public class PanZoomController extends JNIObject {
* @param event MotionEvent to process.
* @return True if the event was handled.
*/
public boolean onTouchEvent(final MotionEvent event) {
public boolean onTouchEvent(final @NonNull MotionEvent event) {
ThreadUtils.assertOnUiThread();
return handleMotionEvent(event);
}
@ -198,7 +199,7 @@ public class PanZoomController extends JNIObject {
* @param event MotionEvent to process.
* @return True if the event was handled.
*/
public boolean onMouseEvent(final MotionEvent event) {
public boolean onMouseEvent(final @NonNull MotionEvent event) {
ThreadUtils.assertOnUiThread();
if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) {
@ -220,7 +221,7 @@ public class PanZoomController extends JNIObject {
* @param event MotionEvent to process.
* @return True if the event was handled.
*/
public boolean onMotionEvent(MotionEvent event) {
public boolean onMotionEvent(@NonNull MotionEvent event) {
ThreadUtils.assertOnUiThread();
final int action = event.getActionMasked();

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше