| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 97 | 97 | 
| 98     @Override | 98     @Override | 
| 99     protected void onNewIntent(Intent intent) { | 99     protected void onNewIntent(Intent intent) { | 
| 100         if (intent == null) return; | 100         if (intent == null) return; | 
| 101         super.onNewIntent(intent); | 101         super.onNewIntent(intent); | 
| 102 | 102 | 
| 103         WebappInfo newWebappInfo = createWebappInfo(intent); | 103         WebappInfo newWebappInfo = createWebappInfo(intent); | 
| 104         if (newWebappInfo == null) { | 104         if (newWebappInfo == null) { | 
| 105             Log.e(TAG, "Failed to parse new Intent: " + intent); | 105             Log.e(TAG, "Failed to parse new Intent: " + intent); | 
| 106             ApiCompatibilityUtils.finishAndRemoveTask(this); | 106             ApiCompatibilityUtils.finishAndRemoveTask(this); | 
| 107         } else if (!TextUtils.equals(mWebappInfo.id(), newWebappInfo.id())) { |  | 
| 108             mWebappInfo = newWebappInfo; |  | 
| 109             resetSavedInstanceState(); |  | 
| 110             if (mIsInitialized) initializeUI(null); |  | 
| 111         } else if (newWebappInfo.shouldForceNavigation() && mIsInitialized) { | 107         } else if (newWebappInfo.shouldForceNavigation() && mIsInitialized) { | 
| 112             getActivityTab().loadUrl(new LoadUrlParams( | 108             getActivityTab().loadUrl(new LoadUrlParams( | 
| 113                     newWebappInfo.uri().toString(), PageTransition.AUTO_TOPLEVEL
     )); | 109                     newWebappInfo.uri().toString(), PageTransition.AUTO_TOPLEVEL
     )); | 
| 114         } | 110         } | 
| 115     } | 111     } | 
| 116 | 112 | 
| 117     protected boolean isInitialized() { | 113     protected boolean isInitialized() { | 
| 118         return mIsInitialized; | 114         return mIsInitialized; | 
| 119     } | 115     } | 
| 120 | 116 | 
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 705         return new WebappDelegateFactory(this); | 701         return new WebappDelegateFactory(this); | 
| 706     } | 702     } | 
| 707 | 703 | 
| 708     // We're temporarily disable CS on webapp since there are some issues. (http
     ://crbug.com/471950) | 704     // We're temporarily disable CS on webapp since there are some issues. (http
     ://crbug.com/471950) | 
| 709     // TODO(changwan): re-enable it once the issues are resolved. | 705     // TODO(changwan): re-enable it once the issues are resolved. | 
| 710     @Override | 706     @Override | 
| 711     protected boolean isContextualSearchAllowed() { | 707     protected boolean isContextualSearchAllowed() { | 
| 712         return false; | 708         return false; | 
| 713     } | 709     } | 
| 714 } | 710 } | 
| OLD | NEW | 
|---|