| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_ANDROID_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class NavigationController; | 17 class NavigationControllerImpl; |
| 18 | 18 |
| 19 // Android wrapper around NavigationController that provides safer passage | 19 // Android wrapper around NavigationController that provides safer passage |
| 20 // from java and back to native and provides java with a means of communicating | 20 // from java and back to native and provides java with a means of communicating |
| 21 // with its native counterpart. | 21 // with its native counterpart. |
| 22 class CONTENT_EXPORT NavigationControllerAndroid { | 22 class CONTENT_EXPORT NavigationControllerAndroid { |
| 23 public: | 23 public: |
| 24 static bool Register(JNIEnv* env); | 24 static bool Register(JNIEnv* env); |
| 25 | 25 |
| 26 explicit NavigationControllerAndroid( | 26 explicit NavigationControllerAndroid( |
| 27 NavigationController* navigation_controller); | 27 NavigationControllerImpl* navigation_controller); |
| 28 ~NavigationControllerAndroid(); | 28 ~NavigationControllerAndroid(); |
| 29 | 29 |
| 30 NavigationController* navigation_controller() const { | 30 NavigationControllerImpl* navigation_controller() const { |
| 31 return navigation_controller_; | 31 return navigation_controller_; |
| 32 } | 32 } |
| 33 | 33 |
| 34 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | 34 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); |
| 35 | 35 |
| 36 jboolean CanGoBack(JNIEnv* env, | 36 jboolean CanGoBack(JNIEnv* env, |
| 37 const base::android::JavaParamRef<jobject>& obj); | 37 const base::android::JavaParamRef<jobject>& obj); |
| 38 jboolean CanGoForward(JNIEnv* env, | 38 jboolean CanGoForward(JNIEnv* env, |
| 39 const base::android::JavaParamRef<jobject>& obj); | 39 const base::android::JavaParamRef<jobject>& obj); |
| 40 jboolean CanGoToOffset(JNIEnv* env, | 40 jboolean CanGoToOffset(JNIEnv* env, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 const base::android::JavaParamRef<jobject>& obj); | 133 const base::android::JavaParamRef<jobject>& obj); |
| 134 void CopyStateFrom(JNIEnv* env, | 134 void CopyStateFrom(JNIEnv* env, |
| 135 const base::android::JavaParamRef<jobject>& obj, | 135 const base::android::JavaParamRef<jobject>& obj, |
| 136 jlong source_native_navigation_controller_android); | 136 jlong source_native_navigation_controller_android); |
| 137 void CopyStateFromAndPrune(JNIEnv* env, | 137 void CopyStateFromAndPrune(JNIEnv* env, |
| 138 const base::android::JavaParamRef<jobject>& obj, | 138 const base::android::JavaParamRef<jobject>& obj, |
| 139 jlong source_native_navigation_controller_android, | 139 jlong source_native_navigation_controller_android, |
| 140 jboolean replace_entry); | 140 jboolean replace_entry); |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 NavigationController* navigation_controller_; | 143 NavigationControllerImpl* navigation_controller_; |
| 144 base::android::ScopedJavaGlobalRef<jobject> obj_; | 144 base::android::ScopedJavaGlobalRef<jobject> obj_; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(NavigationControllerAndroid); | 146 DISALLOW_COPY_AND_ASSIGN(NavigationControllerAndroid); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace content | 149 } // namespace content |
| 150 | 150 |
| 151 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_ANDROID_H_ | 151 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_ANDROID_H_ |
| OLD | NEW |