Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java

Issue 2247143004: Remove app context init from LibraryLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix per review. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.init; 5 package org.chromium.chrome.browser.init;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // setContentView inflating the decorView and the basic UI hierarhcy as stubs. 102 // setContentView inflating the decorView and the basic UI hierarhcy as stubs.
103 // This is done here before kicking long running I/O because inflation i ncludes accessing 103 // This is done here before kicking long running I/O because inflation i ncludes accessing
104 // resource files(xmls etc) even if we are inflating views defined by th e framework. If this 104 // resource files(xmls etc) even if we are inflating views defined by th e framework. If this
105 // operation gets blocked because other long running I/O are running, we delay onCreate(), 105 // operation gets blocked because other long running I/O are running, we delay onCreate(),
106 // onStart() and first draw consequently. 106 // onStart() and first draw consequently.
107 107
108 setContentView(); 108 setContentView();
109 if (mLaunchBehindWorkaround != null) mLaunchBehindWorkaround.onSetConten tView(); 109 if (mLaunchBehindWorkaround != null) mLaunchBehindWorkaround.onSetConten tView();
110 110
111 // Kick off long running IO tasks that can be done in parallel. 111 // Kick off long running IO tasks that can be done in parallel.
112 mNativeInitializationController = new NativeInitializationController(thi s, this); 112 mNativeInitializationController = new NativeInitializationController(thi s);
113 initializeChildProcessCreationParams(); 113 initializeChildProcessCreationParams();
114 mNativeInitializationController.startBackgroundTasks(shouldAllocateChild Connection()); 114 mNativeInitializationController.startBackgroundTasks(shouldAllocateChild Connection());
115 } 115 }
116 116
117 /** Controls the parameter of {@link NativeInitializationController#startBac kgroundTasks()}.*/ 117 /** Controls the parameter of {@link NativeInitializationController#startBac kgroundTasks()}.*/
118 @VisibleForTesting 118 @VisibleForTesting
119 public boolean shouldAllocateChildConnection() { 119 public boolean shouldAllocateChildConnection() {
120 return true; 120 return true;
121 } 121 }
122 122
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 getDecorView().setVisibility(View.GONE); 508 getDecorView().setVisibility(View.GONE);
509 } 509 }
510 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi stener); 510 getViewTreeObserver().removeOnPreDrawListener(mPreDrawLi stener);
511 } 511 }
512 }); 512 });
513 return true; 513 return true;
514 } 514 }
515 }; 515 };
516 } 516 }
517 } 517 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698