Chromium Code Reviews| 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 #include "content/browser/frame_host/render_frame_host_android.h" | 5 #include "content/browser/frame_host/render_frame_host_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/browser/frame_host/render_frame_host_delegate.h" | 9 #include "content/browser/frame_host/render_frame_host_delegate.h" |
| 10 #include "content/browser/frame_host/render_frame_host_impl.h" | 10 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 11 #include "content/public/browser/browser_context.h" | |
| 12 #include "content/public/browser/site_instance.h" | |
| 11 #include "jni/RenderFrameHostImpl_jni.h" | 13 #include "jni/RenderFrameHostImpl_jni.h" |
| 12 | 14 |
| 13 using base::android::AttachCurrentThread; | 15 using base::android::AttachCurrentThread; |
| 14 using base::android::ConvertUTF8ToJavaString; | 16 using base::android::ConvertUTF8ToJavaString; |
| 15 using base::android::JavaParamRef; | 17 using base::android::JavaParamRef; |
| 16 using base::android::JavaRef; | 18 using base::android::JavaRef; |
| 17 using base::android::ScopedJavaLocalRef; | 19 using base::android::ScopedJavaLocalRef; |
| 18 | 20 |
| 19 namespace content { | 21 namespace content { |
| 20 | 22 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 48 return obj_.get(env); | 50 return obj_.get(env); |
| 49 } | 51 } |
| 50 | 52 |
| 51 ScopedJavaLocalRef<jstring> RenderFrameHostAndroid::GetLastCommittedURL( | 53 ScopedJavaLocalRef<jstring> RenderFrameHostAndroid::GetLastCommittedURL( |
| 52 JNIEnv* env, | 54 JNIEnv* env, |
| 53 const JavaParamRef<jobject>& obj) const { | 55 const JavaParamRef<jobject>& obj) const { |
| 54 return ConvertUTF8ToJavaString( | 56 return ConvertUTF8ToJavaString( |
| 55 env, render_frame_host_->GetLastCommittedURL().spec()); | 57 env, render_frame_host_->GetLastCommittedURL().spec()); |
| 56 } | 58 } |
| 57 | 59 |
| 60 jboolean RenderFrameHostAndroid::IsIncognito( | |
|
boliu
2017/03/23 18:12:51
I feel RFH has no business exposing whether it's I
Timothy Loh
2017/03/24 03:11:31
For now I added a comment in the header file -- I'
boliu
2017/03/24 03:54:49
Can skip SiteInstance if there is no need.
This i
| |
| 61 JNIEnv* env, | |
| 62 const JavaParamRef<jobject>& obj) const { | |
| 63 return render_frame_host_->GetSiteInstance() | |
| 64 ->GetBrowserContext() | |
| 65 ->IsOffTheRecord(); | |
| 66 } | |
| 67 | |
| 58 } // namespace content | 68 } // namespace content |
| OLD | NEW |