OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.base; | 5 package org.chromium.base; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.app.Application; | 8 import android.app.Application; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.os.Bundle; | 10 import android.os.Bundle; |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 protected BaseChromiumApplication(boolean shouldInitializeApplicationStatusT
racking) { | 38 protected BaseChromiumApplication(boolean shouldInitializeApplicationStatusT
racking) { |
39 mShouldInitializeApplicationStatusTracking = shouldInitializeApplication
StatusTracking; | 39 mShouldInitializeApplicationStatusTracking = shouldInitializeApplication
StatusTracking; |
40 } | 40 } |
41 | 41 |
42 @Override | 42 @Override |
43 protected void attachBaseContext(Context base) { | 43 protected void attachBaseContext(Context base) { |
44 super.attachBaseContext(base); | 44 super.attachBaseContext(base); |
45 assert getBaseContext() != null; | 45 assert getBaseContext() != null; |
46 checkAppBeingReplaced(); | 46 checkAppBeingReplaced(); |
47 if (BuildConfig.isMultidexEnabled()) { | 47 ChromiumMultiDexInstaller.install(this); |
48 ChromiumMultiDexInstaller.install(this); | |
49 } | |
50 } | 48 } |
51 | 49 |
52 /** | 50 /** |
53 * Interface to be implemented by listeners for window focus events. | 51 * Interface to be implemented by listeners for window focus events. |
54 */ | 52 */ |
55 public interface WindowFocusChangedListener { | 53 public interface WindowFocusChangedListener { |
56 /** | 54 /** |
57 * Called when the window focus changes for {@code activity}. | 55 * Called when the window focus changes for {@code activity}. |
58 * @param activity The {@link Activity} that has a window focus changed
event. | 56 * @param activity The {@link Activity} that has a window focus changed
event. |
59 * @param hasFocus Whether or not {@code activity} gained or lost focus. | 57 * @param hasFocus Whether or not {@code activity} gained or lost focus. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 assert (Proxy.isProxyClass(activity.getWindow().getCallback(
).getClass()) | 231 assert (Proxy.isProxyClass(activity.getWindow().getCallback(
).getClass()) |
234 || activity.getWindow().getCallback().getClass().get
Name().equals( | 232 || activity.getWindow().getCallback().getClass().get
Name().equals( |
235 TOOLBAR_CALLBACK_WRAPPER_CLASS) | 233 TOOLBAR_CALLBACK_WRAPPER_CLASS) |
236 || activity.getWindow().getCallback().getClass().get
Name().equals( | 234 || activity.getWindow().getCallback().getClass().get
Name().equals( |
237 TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS)); | 235 TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS)); |
238 } | 236 } |
239 } | 237 } |
240 }); | 238 }); |
241 } | 239 } |
242 } | 240 } |
OLD | NEW |