Bug 1404144 - 4. Preload child process in geckoview_example in multiprocess mode; r=snorp

In geckoview_example multiprocess mode, preload child process during
startup to make e10s startup faster.

MozReview-Commit-ID: GinwBZlrnps

--HG--
extra : rebase_source : a43ef4708d311c9a100aafba0c84ee4a2e27090b
This commit is contained in:
Jim Chen 2017-10-04 22:28:44 -04:00
Родитель 3b801bac89
Коммит e3de08b829
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -55,7 +55,9 @@ public class GeckoViewActivity extends Activity {
}
}
GeckoView.preload(this, geckoArgs);
final boolean useMultiprocess = getIntent().getBooleanExtra(USE_MULTIPROCESS_EXTRA,
true);
GeckoView.preload(this, geckoArgs, useMultiprocess);
setContentView(R.layout.geckoview_activity);
@ -72,6 +74,8 @@ public class GeckoViewActivity extends Activity {
permission.androidPermissionRequestCode = REQUEST_PERMISSIONS;
mGeckoView.setPermissionDelegate(permission);
mGeckoView.getSettings().setBoolean(GeckoViewSettings.USE_MULTIPROCESS,
useMultiprocess);
loadSettings(getIntent());
loadFromIntent(getIntent());
}
@ -93,9 +97,6 @@ public class GeckoViewActivity extends Activity {
}
private void loadSettings(final Intent intent) {
mGeckoView.getSettings().setBoolean(
GeckoViewSettings.USE_MULTIPROCESS,
intent.getBooleanExtra(USE_MULTIPROCESS_EXTRA, true));
mGeckoView.getSettings().setBoolean(
GeckoViewSettings.USE_REMOTE_DEBUGGER,
intent.getBooleanExtra(USE_REMOTE_DEBUGGER_EXTRA, false));