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.customtabs; | 5 package org.chromium.chrome.browser.customtabs; |
6 | 6 |
7 import android.content.Intent; | 7 import android.content.Intent; |
8 import android.net.Uri; | 8 import android.net.Uri; |
9 import android.os.IBinder; | 9 import android.os.IBinder; |
10 import android.support.customtabs.CustomTabsIntent; | 10 import android.support.customtabs.CustomTabsIntent; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 ExternalAppId externalId = | 219 ExternalAppId externalId = |
220 IntentHandler.determineExternalIntentSource(getPackageName() , getIntent()); | 220 IntentHandler.determineExternalIntentSource(getPackageName() , getIntent()); |
221 RecordHistogram.recordEnumeratedHistogram("CustomTabs.ClientAppId", | 221 RecordHistogram.recordEnumeratedHistogram("CustomTabs.ClientAppId", |
222 externalId.ordinal(), ExternalAppId.INDEX_BOUNDARY.ordinal() ); | 222 externalId.ordinal(), ExternalAppId.INDEX_BOUNDARY.ordinal() ); |
223 } | 223 } |
224 } | 224 } |
225 | 225 |
226 @Override | 226 @Override |
227 public void onStopWithNative() { | 227 public void onStopWithNative() { |
228 super.onStopWithNative(); | 228 super.onStopWithNative(); |
229 if (getActivityTab() != null) getActivityTab().hide(); | |
Benoit L
2015/08/13 08:18:18
Should we do something in onPause() rather?
Yusuf
2015/08/13 17:28:18
OK, moved the signal to onPause. Also after talkin
| |
229 setActiveContentHandler(null); | 230 setActiveContentHandler(null); |
230 } | 231 } |
231 | 232 |
232 /** | 233 /** |
233 * Loads the current tab with the given load params. Unlike | 234 * Loads the current tab with the given load params. Unlike |
234 * {@link CustomTab#loadUrlAndTrackFromTimestamp(LoadUrlParams, long)}, this method takes client | 235 * {@link CustomTab#loadUrlAndTrackFromTimestamp(LoadUrlParams, long)}, this method takes client |
235 * referrer and extra headers into account. | 236 * referrer and extra headers into account. |
236 */ | 237 */ |
237 private void loadUrlInCurrentTab(LoadUrlParams params, long timeStamp) { | 238 private void loadUrlInCurrentTab(LoadUrlParams params, long timeStamp) { |
238 Intent intent = getIntent(); | 239 Intent intent = getIntent(); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
364 | 365 |
365 /** | 366 /** |
366 * @return The {@link CustomTabIntentDataProvider} for this {@link CustomTab Activity}. For test | 367 * @return The {@link CustomTabIntentDataProvider} for this {@link CustomTab Activity}. For test |
367 * purposes only. | 368 * purposes only. |
368 */ | 369 */ |
369 @VisibleForTesting | 370 @VisibleForTesting |
370 CustomTabIntentDataProvider getIntentDataProvider() { | 371 CustomTabIntentDataProvider getIntentDataProvider() { |
371 return mIntentDataProvider; | 372 return mIntentDataProvider; |
372 } | 373 } |
373 } | 374 } |
OLD | NEW |