OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 | 8 |
9 import org.chromium.base.ContextUtils; | 9 import org.chromium.base.ContextUtils; |
10 import org.chromium.base.library_loader.LibraryProcessType; | 10 import org.chromium.base.library_loader.LibraryProcessType; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 @Override | 60 @Override |
61 protected WebappInfo createWebappInfo(Intent intent) { | 61 protected WebappInfo createWebappInfo(Intent intent) { |
62 return (intent == null) ? WebApkInfo.createEmpty() : WebApkInfo.create(i
ntent); | 62 return (intent == null) ? WebApkInfo.createEmpty() : WebApkInfo.create(i
ntent); |
63 } | 63 } |
64 | 64 |
65 @Override | 65 @Override |
66 protected TabDelegateFactory createTabDelegateFactory() { | 66 protected TabDelegateFactory createTabDelegateFactory() { |
67 return new WebappDelegateFactory(this) { | 67 return new WebappDelegateFactory(this) { |
68 @Override | 68 @Override |
69 public InterceptNavigationDelegateImpl createInterceptNavigationDele
gate(Tab tab) { | 69 public InterceptNavigationDelegateImpl createInterceptNavigationDele
gate(Tab tab) { |
70 return new InterceptNavigationDelegateImpl(tab) { | 70 return new WebappInterceptNavigationDelegate(WebApkActivity.this
, tab) { |
71 @Override | 71 @Override |
72 public ExternalNavigationParams.Builder buildExternalNavigat
ionParams( | 72 public ExternalNavigationParams.Builder buildExternalNavigat
ionParams( |
73 NavigationParams navigationParams, | 73 NavigationParams navigationParams, |
74 TabRedirectHandler tabRedirectHandler, boolean shoul
dCloseTab) { | 74 TabRedirectHandler tabRedirectHandler, boolean shoul
dCloseTab) { |
75 ExternalNavigationParams.Builder builder = | 75 ExternalNavigationParams.Builder builder = |
76 super.buildExternalNavigationParams( | 76 super.buildExternalNavigationParams( |
77 navigationParams, tabRedirectHandler, sh
ouldCloseTab); | 77 navigationParams, tabRedirectHandler, sh
ouldCloseTab); |
78 builder.setWebApkPackageName(getWebApkPackageName()); | 78 builder.setWebApkPackageName(getWebApkPackageName()); |
79 return builder; | 79 return builder; |
80 } | 80 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 191 } |
192 | 192 |
193 @Override | 193 @Override |
194 protected void onDestroyInternal() { | 194 protected void onDestroyInternal() { |
195 if (mUpdateManager != null) { | 195 if (mUpdateManager != null) { |
196 mUpdateManager.destroy(); | 196 mUpdateManager.destroy(); |
197 } | 197 } |
198 super.onDestroyInternal(); | 198 super.onDestroyInternal(); |
199 } | 199 } |
200 } | 200 } |
OLD | NEW |