зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
3b801bac89
Коммит
e3de08b829
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче