OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.content.browser.framehost; | 5 package org.chromium.content.browser.framehost; |
6 | 6 |
| 7 import org.chromium.base.UnguessableToken; |
7 import org.chromium.base.annotations.CalledByNative; | 8 import org.chromium.base.annotations.CalledByNative; |
8 import org.chromium.base.annotations.JNINamespace; | 9 import org.chromium.base.annotations.JNINamespace; |
9 import org.chromium.content_public.browser.RenderFrameHost; | 10 import org.chromium.content_public.browser.RenderFrameHost; |
10 | 11 |
11 /** | 12 /** |
12 * The RenderFrameHostImpl Java wrapper to allow communicating with the native R
enderFrameHost | 13 * The RenderFrameHostImpl Java wrapper to allow communicating with the native R
enderFrameHost |
13 * object. | 14 * object. |
14 */ | 15 */ |
15 @JNINamespace("content") | 16 @JNINamespace("content") |
16 public class RenderFrameHostImpl implements RenderFrameHost { | 17 public class RenderFrameHostImpl implements RenderFrameHost { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 * Returns whether we're in incognito mode. | 57 * Returns whether we're in incognito mode. |
57 * | 58 * |
58 * TODO(timloh): This function shouldn't really be on here. If we end up | 59 * TODO(timloh): This function shouldn't really be on here. If we end up |
59 * needing more logic from the native BrowserContext, we should add a | 60 * needing more logic from the native BrowserContext, we should add a |
60 * wrapper for that and move this function there. | 61 * wrapper for that and move this function there. |
61 */ | 62 */ |
62 public boolean isIncognito() { | 63 public boolean isIncognito() { |
63 return mIncognito; | 64 return mIncognito; |
64 } | 65 } |
65 | 66 |
| 67 @Override |
| 68 public UnguessableToken getAndroidOverlayRoutingToken() { |
| 69 if (mNativeRenderFrameHostAndroid == 0) return null; |
| 70 return nativeGetAndroidOverlayRoutingToken(mNativeRenderFrameHostAndroid
); |
| 71 } |
| 72 |
66 private native String nativeGetLastCommittedURL(long nativeRenderFrameHostAn
droid); | 73 private native String nativeGetLastCommittedURL(long nativeRenderFrameHostAn
droid); |
| 74 private native UnguessableToken nativeGetAndroidOverlayRoutingToken( |
| 75 long nativeRenderFrameHostAndroid); |
67 } | 76 } |
OLD | NEW |