| 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.document; | 5 package org.chromium.chrome.browser.document; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.app.Notification; | 9 import android.app.Notification; |
| 10 import android.app.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 * Handles launching a {@link CustomTabActivity}, which will sit on top of a
client's activity | 398 * Handles launching a {@link CustomTabActivity}, which will sit on top of a
client's activity |
| 399 * in the same task. | 399 * in the same task. |
| 400 */ | 400 */ |
| 401 private void launchCustomTabActivity() { | 401 private void launchCustomTabActivity() { |
| 402 boolean handled = CustomTabActivity.handleInActiveContentIfNeeded(getInt
ent()); | 402 boolean handled = CustomTabActivity.handleInActiveContentIfNeeded(getInt
ent()); |
| 403 if (handled) return; | 403 if (handled) return; |
| 404 | 404 |
| 405 // Create and fire a launch intent. | 405 // Create and fire a launch intent. |
| 406 startActivity(createCustomTabActivityIntent( | 406 startActivity(createCustomTabActivityIntent( |
| 407 this, getIntent(), !isCustomTabIntent(getIntent()) && mIsHerbInt
ent)); | 407 this, getIntent(), !isCustomTabIntent(getIntent()) && mIsHerbInt
ent)); |
| 408 if (mIsHerbIntent) overridePendingTransition(R.anim.slide_in_up, R.anim.
no_anim); | 408 if (mIsHerbIntent) overridePendingTransition(R.anim.activity_open_enter,
R.anim.no_anim); |
| 409 } | 409 } |
| 410 | 410 |
| 411 @SuppressLint("InlinedApi") | 411 @SuppressLint("InlinedApi") |
| 412 private void launchTabbedMode() { | 412 private void launchTabbedMode() { |
| 413 maybePrefetchDnsInBackground(); | 413 maybePrefetchDnsInBackground(); |
| 414 | 414 |
| 415 Intent newIntent = new Intent(getIntent()); | 415 Intent newIntent = new Intent(getIntent()); |
| 416 String className = MultiWindowUtils.getInstance().getTabbedActivityForIn
tent( | 416 String className = MultiWindowUtils.getInstance().getTabbedActivityForIn
tent( |
| 417 newIntent, this).getName(); | 417 newIntent, this).getName(); |
| 418 newIntent.setClassName(getApplicationContext().getPackageName(), classNa
me); | 418 newIntent.setClassName(getApplicationContext().getPackageName(), classNa
me); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 IntentHandler.ExternalAppId source = | 486 IntentHandler.ExternalAppId source = |
| 487 IntentHandler.determineExternalIntentSource(getPackageName(), in
tent); | 487 IntentHandler.determineExternalIntentSource(getPackageName(), in
tent); |
| 488 if (intent.getPackage() == null && source != IntentHandler.ExternalAppId
.CHROME) { | 488 if (intent.getPackage() == null && source != IntentHandler.ExternalAppId
.CHROME) { |
| 489 int flagsOfInterest = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_AC
TIVITY_NEW_DOCUMENT; | 489 int flagsOfInterest = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_AC
TIVITY_NEW_DOCUMENT; |
| 490 int maskedFlags = intent.getFlags() & flagsOfInterest; | 490 int maskedFlags = intent.getFlags() & flagsOfInterest; |
| 491 sIntentFlagsHistogram.record(maskedFlags); | 491 sIntentFlagsHistogram.record(maskedFlags); |
| 492 } | 492 } |
| 493 MediaNotificationUma.recordClickSource(intent); | 493 MediaNotificationUma.recordClickSource(intent); |
| 494 } | 494 } |
| 495 } | 495 } |
| OLD | NEW |