OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.customtabs; | 5 package org.chromium.chrome.browser.customtabs; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.content.pm.ResolveInfo; | 10 import android.content.pm.ResolveInfo; |
(...skipping 25 matching lines...) Expand all Loading... |
36 */ | 36 */ |
37 static class CustomTabNavigationDelegate extends ExternalNavigationDelegateI
mpl { | 37 static class CustomTabNavigationDelegate extends ExternalNavigationDelegateI
mpl { |
38 private static final String TAG = "customtabs"; | 38 private static final String TAG = "customtabs"; |
39 private final String mClientPackageName; | 39 private final String mClientPackageName; |
40 private boolean mHasActivityStarted; | 40 private boolean mHasActivityStarted; |
41 | 41 |
42 /** | 42 /** |
43 * Constructs a new instance of {@link CustomTabNavigationDelegate}. | 43 * Constructs a new instance of {@link CustomTabNavigationDelegate}. |
44 */ | 44 */ |
45 public CustomTabNavigationDelegate(Tab tab, String clientPackageName) { | 45 public CustomTabNavigationDelegate(Tab tab, String clientPackageName) { |
46 super(tab); | 46 super(tab, null); |
47 mClientPackageName = clientPackageName; | 47 mClientPackageName = clientPackageName; |
48 } | 48 } |
49 | 49 |
50 @Override | 50 @Override |
51 public void startActivity(Intent intent) { | 51 public void startActivity(Intent intent) { |
52 super.startActivity(intent); | 52 super.startActivity(intent); |
53 mHasActivityStarted = true; | 53 mHasActivityStarted = true; |
54 } | 54 } |
55 | 55 |
56 @Override | 56 @Override |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 @VisibleForTesting | 193 @VisibleForTesting |
194 CustomTabNavigationDelegate getExternalNavigationDelegate() { | 194 CustomTabNavigationDelegate getExternalNavigationDelegate() { |
195 return mNavigationDelegate; | 195 return mNavigationDelegate; |
196 } | 196 } |
197 | 197 |
198 @Override | 198 @Override |
199 public AppBannerManager createAppBannerManager(Tab tab) { | 199 public AppBannerManager createAppBannerManager(Tab tab) { |
200 return null; | 200 return null; |
201 } | 201 } |
202 } | 202 } |
OLD | NEW |