Chromium Code Reviews| 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.webapps; | 5 package org.chromium.chrome.browser.webapps; |
| 6 | 6 |
| 7 import android.content.Intent; | 7 import android.content.Intent; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.graphics.Color; | 9 import android.graphics.Color; |
| 10 import android.graphics.drawable.Drawable; | 10 import android.graphics.drawable.Drawable; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 ScreenOrientationProvider.lockOrientation((byte) mWebappInfo.orientation (), this); | 131 ScreenOrientationProvider.lockOrientation((byte) mWebappInfo.orientation (), this); |
| 132 super.preInflationStartup(); | 132 super.preInflationStartup(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 @Override | 135 @Override |
| 136 public void finishNativeInitialization() { | 136 public void finishNativeInitialization() { |
| 137 if (!mWebappInfo.isInitialized()) finish(); | 137 if (!mWebappInfo.isInitialized()) finish(); |
| 138 super.finishNativeInitialization(); | 138 super.finishNativeInitialization(); |
| 139 initializeUI(getSavedInstanceState()); | 139 initializeUI(getSavedInstanceState()); |
| 140 mIsInitialized = true; | 140 mIsInitialized = true; |
| 141 checkUpdates(); | |
|
pkotwicz
2016/07/19 18:02:38
Can WebApkActivity override finishNativeInitializa
Yaron
2016/07/20 02:27:58
+1
Xi Han
2016/07/20 18:55:00
Done.
| |
| 141 } | 142 } |
| 142 | 143 |
| 144 protected void checkUpdates() {} | |
| 145 | |
| 143 @Override | 146 @Override |
| 144 protected void onSaveInstanceState(Bundle outState) { | 147 protected void onSaveInstanceState(Bundle outState) { |
| 145 super.onSaveInstanceState(outState); | 148 super.onSaveInstanceState(outState); |
| 146 if (getActivityTab() != null) { | 149 if (getActivityTab() != null) { |
| 147 outState.putInt(BUNDLE_TAB_ID, getActivityTab().getId()); | 150 outState.putInt(BUNDLE_TAB_ID, getActivityTab().getId()); |
| 148 outState.putString(BUNDLE_TAB_URL, getActivityTab().getUrl()); | 151 outState.putString(BUNDLE_TAB_URL, getActivityTab().getUrl()); |
| 149 } | 152 } |
| 150 } | 153 } |
| 151 | 154 |
| 152 @Override | 155 @Override |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 577 return new WebappDelegateFactory(this); | 580 return new WebappDelegateFactory(this); |
| 578 } | 581 } |
| 579 | 582 |
| 580 // We're temporarily disable CS on webapp since there are some issues. (http ://crbug.com/471950) | 583 // We're temporarily disable CS on webapp since there are some issues. (http ://crbug.com/471950) |
| 581 // TODO(changwan): re-enable it once the issues are resolved. | 584 // TODO(changwan): re-enable it once the issues are resolved. |
| 582 @Override | 585 @Override |
| 583 protected boolean isContextualSearchAllowed() { | 586 protected boolean isContextualSearchAllowed() { |
| 584 return false; | 587 return false; |
| 585 } | 588 } |
| 586 } | 589 } |
| OLD | NEW |