Bug 1412872 - 8. Remove GeckoAppShell dependency in gecko-view; r=snorp

In the future, GeckoAppShell will only be part of the service process
library, and will not be part of the app process library. Therefore, we
should minimize GeckoAppShell usage in any GeckoView code that will
likely end up in the app process library.

In particular, AndroidGamepadManager and Clipboard are made to accept
Context as arguments, instead of using
GeckoAppShell.getApplicationContext() for getting the Context.

MozReview-Commit-ID: G9SC815H5Ku
This commit is contained in:
Jim Chen
2017-11-01 14:54:04 -04:00
parent 4aa67e17c3
commit eb5d426210
22 changed files with 217 additions and 225 deletions

View File

@@ -318,7 +318,7 @@ AndroidBridge::GetClipboardText(nsAString& aText)
{
ALOG_BRIDGE("AndroidBridge::GetClipboardText");
auto text = Clipboard::GetText();
auto text = Clipboard::GetText(GeckoAppShell::GetApplicationContext());
if (text) {
aText = text->ToString();