| 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; | 5 package org.chromium.chrome.browser; |
| 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.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
| 10 import android.graphics.Color; | 10 import android.graphics.Color; |
| (...skipping 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2590 public AppBannerManager getAppBannerManagerForTesting() { | 2590 public AppBannerManager getAppBannerManagerForTesting() { |
| 2591 return mAppBannerManager; | 2591 return mAppBannerManager; |
| 2592 } | 2592 } |
| 2593 | 2593 |
| 2594 @VisibleForTesting | 2594 @VisibleForTesting |
| 2595 public boolean hasPrerenderedUrl(String url) { | 2595 public boolean hasPrerenderedUrl(String url) { |
| 2596 return nativeHasPrerenderedUrl(mNativeTabAndroid, url); | 2596 return nativeHasPrerenderedUrl(mNativeTabAndroid, url); |
| 2597 } | 2597 } |
| 2598 | 2598 |
| 2599 /** | 2599 /** |
| 2600 * Check if the tab is covered by its child activity. |
| 2601 * @return Whether the tab is covered by its child activity. |
| 2602 */ |
| 2603 public boolean isCoveredByChildActivity() { |
| 2604 // Default return value, this is only used by subclasses. |
| 2605 return false; |
| 2606 } |
| 2607 |
| 2608 /** |
| 2609 * Update whether the tab is covered by its child activity. |
| 2610 * @param isCoveredByChildActivity Whether the tab is covered by its child a
ctivity. |
| 2611 */ |
| 2612 public void setCoveredByChildActivity(boolean isCoveredByChildActivity) { |
| 2613 // Empty implementation, only used by subclasses. |
| 2614 } |
| 2615 |
| 2616 /** |
| 2600 * Ensures the counter is at least as high as the specified value. The coun
ter should always | 2617 * Ensures the counter is at least as high as the specified value. The coun
ter should always |
| 2601 * point to an unused ID (which will be handed out next time a request comes
in). Exposed so | 2618 * point to an unused ID (which will be handed out next time a request comes
in). Exposed so |
| 2602 * that anything externally loading tabs and ids can set enforce new tabs st
art at the correct | 2619 * that anything externally loading tabs and ids can set enforce new tabs st
art at the correct |
| 2603 * id. | 2620 * id. |
| 2604 * TODO(aurimas): Investigate reducing the visiblity of this method. | 2621 * TODO(aurimas): Investigate reducing the visiblity of this method. |
| 2605 * @param id The minimum id we should hand out to the next new tab. | 2622 * @param id The minimum id we should hand out to the next new tab. |
| 2606 */ | 2623 */ |
| 2607 public static void incrementIdCounterTo(int id) { | 2624 public static void incrementIdCounterTo(int id) { |
| 2608 int diff = id - sIdCounter.get(); | 2625 int diff = id - sIdCounter.get(); |
| 2609 if (diff <= 0) return; | 2626 if (diff <= 0) return; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2636 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 2653 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
| 2637 TabContentManager tabContentManager); | 2654 TabContentManager tabContentManager); |
| 2638 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, | 2655 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, |
| 2639 ContentViewCore content, boolean visible); | 2656 ContentViewCore content, boolean visible); |
| 2640 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, | 2657 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, |
| 2641 ContentViewCore content); | 2658 ContentViewCore content); |
| 2642 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 2659 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
| 2643 | 2660 |
| 2644 private static native void nativeRecordStartupToCommitUma(); | 2661 private static native void nativeRecordStartupToCommitUma(); |
| 2645 } | 2662 } |
| OLD | NEW |