OLD | NEW |
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; | 5 package org.chromium.chrome.browser; |
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.app.SearchManager; | 10 import android.app.SearchManager; |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 } | 909 } |
910 | 910 |
911 /** | 911 /** |
912 * @return Whether the given activity contains a CustomTab. | 912 * @return Whether the given activity contains a CustomTab. |
913 */ | 913 */ |
914 public boolean isCustomTab() { | 914 public boolean isCustomTab() { |
915 return false; | 915 return false; |
916 } | 916 } |
917 | 917 |
918 /** | 918 /** |
| 919 * Actions that may be run at some point after startup. Place tasks that are
not critical to the |
| 920 * startup path here. This method will be called automatically and should n
ot be called |
| 921 * directly by subclasses. |
| 922 * |
919 * Overriding methods should queue tasks on the DeferredStartupHandler befor
e or after calling | 923 * Overriding methods should queue tasks on the DeferredStartupHandler befor
e or after calling |
920 * super depending on whether the tasks should run before or after these one
s. | 924 * super depending on whether the tasks should run before or after these one
s. |
921 */ | 925 */ |
922 @Override | |
923 protected void onDeferredStartup() { | 926 protected void onDeferredStartup() { |
924 super.onDeferredStartup(); | |
925 initDeferredStartupForActivity(); | 927 initDeferredStartupForActivity(); |
926 DeferredStartupHandler.getInstance().initDeferredStartupForApp(); | 928 DeferredStartupHandler.getInstance().initDeferredStartupForApp(); |
927 DeferredStartupHandler.getInstance().queueDeferredTasksOnIdleHandler(); | 929 DeferredStartupHandler.getInstance().queueDeferredTasksOnIdleHandler(); |
928 } | 930 } |
929 | 931 |
930 /** | 932 /** |
931 * All deferred startup tasks that require the activity rather than the app
should go here. | 933 * All deferred startup tasks that require the activity rather than the app
should go here. |
932 */ | 934 */ |
933 private void initDeferredStartupForActivity() { | 935 private void initDeferredStartupForActivity() { |
934 DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { | 936 DeferredStartupHandler.getInstance().addDeferredTask(new Runnable() { |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2154 * draw over VR contents should be hidden in this call. | 2156 * draw over VR contents should be hidden in this call. |
2155 */ | 2157 */ |
2156 public void onEnterVr() {} | 2158 public void onEnterVr() {} |
2157 | 2159 |
2158 /** | 2160 /** |
2159 * Called when VR mode using this activity is exited. Any state set for VR s
hould be restored | 2161 * Called when VR mode using this activity is exited. Any state set for VR s
hould be restored |
2160 * in this call, including showing 2D UI that was hidden. | 2162 * in this call, including showing 2D UI that was hidden. |
2161 */ | 2163 */ |
2162 public void onExitVr() {} | 2164 public void onExitVr() {} |
2163 } | 2165 } |
OLD | NEW |