| 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.externalnav; | 5 package org.chromium.chrome.browser.externalnav; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.content.ComponentName; | 8 import android.content.ComponentName; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.content.DialogInterface; | 10 import android.content.DialogInterface; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 == ApplicationState.HAS_RUNNING_ACTIVITIES; | 324 == ApplicationState.HAS_RUNNING_ACTIVITIES; |
| 325 } | 325 } |
| 326 | 326 |
| 327 @Override | 327 @Override |
| 328 public boolean isDocumentMode() { | 328 public boolean isDocumentMode() { |
| 329 return FeatureUtilities.isDocumentMode(mActivity); | 329 return FeatureUtilities.isDocumentMode(mActivity); |
| 330 } | 330 } |
| 331 | 331 |
| 332 private static void logTransactionTooLargeOrRethrow(RuntimeException e, Inte
nt intent) { | 332 private static void logTransactionTooLargeOrRethrow(RuntimeException e, Inte
nt intent) { |
| 333 // See http://crbug.com/369574. | 333 // See http://crbug.com/369574. |
| 334 if (e.getCause() != null && e.getCause() instanceof TransactionTooLargeE
xception) { | 334 if (e.getCause() instanceof TransactionTooLargeException) { |
| 335 Log.e(TAG, "Could not resolve Activity for intent " + intent.toStrin
g(), e); | 335 Log.e(TAG, "Could not resolve Activity for intent " + intent.toStrin
g(), e); |
| 336 } else { | 336 } else { |
| 337 throw e; | 337 throw e; |
| 338 } | 338 } |
| 339 } | 339 } |
| 340 | 340 |
| 341 private void closeTab(Tab tab) { | 341 private void closeTab(Tab tab) { |
| 342 mActivity.getTabModelSelector().closeTab(tab); | 342 mActivity.getTabModelSelector().closeTab(tab); |
| 343 } | 343 } |
| 344 } | 344 } |
| OLD | NEW |