| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/android/jni_helper.h" | 10 #include "base/android/jni_helper.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 virtual void Destroy(JNIEnv* env, jobject obj) OVERRIDE; | 40 virtual void Destroy(JNIEnv* env, jobject obj) OVERRIDE; |
| 41 | 41 |
| 42 // -------------------------------------------------------------------------- | 42 // -------------------------------------------------------------------------- |
| 43 // Methods called from Java via JNI | 43 // Methods called from Java via JNI |
| 44 // -------------------------------------------------------------------------- | 44 // -------------------------------------------------------------------------- |
| 45 | 45 |
| 46 // Notifies the ContentViewCore that items were selected in the currently | 46 // Notifies the ContentViewCore that items were selected in the currently |
| 47 // showing select popup. | 47 // showing select popup. |
| 48 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); | 48 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); |
| 49 | 49 |
| 50 void LoadUrlWithoutUrlSanitization(JNIEnv* env, | 50 void LoadUrl( |
| 51 jobject, | 51 JNIEnv* env, jobject obj, |
| 52 jstring jurl, | 52 jstring url, |
| 53 int page_transition); | 53 jint load_url_type, |
| 54 void LoadUrlWithoutUrlSanitizationWithUserAgentOverride( | 54 jint transition_type, |
| 55 JNIEnv* env, | 55 jint ua_override_option, |
| 56 jobject, | 56 jbyteArray post_data, |
| 57 jstring jurl, | 57 jstring base_url_for_data_url, |
| 58 int page_transition, | 58 jstring virtual_url_for_data_url); |
| 59 jstring user_agent_override); | |
| 60 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const; | 59 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const; |
| 61 base::android::ScopedJavaLocalRef<jstring> GetTitle( | 60 base::android::ScopedJavaLocalRef<jstring> GetTitle( |
| 62 JNIEnv* env, jobject obj) const; | 61 JNIEnv* env, jobject obj) const; |
| 63 jboolean IsIncognito(JNIEnv* env, jobject obj); | 62 jboolean IsIncognito(JNIEnv* env, jobject obj); |
| 64 jboolean Crashed(JNIEnv* env, jobject obj) const { return tab_crashed_; } | 63 jboolean Crashed(JNIEnv* env, jobject obj) const { return tab_crashed_; } |
| 65 jboolean TouchEvent(JNIEnv* env, | 64 jboolean TouchEvent(JNIEnv* env, |
| 66 jobject obj, | 65 jobject obj, |
| 67 jlong time_ms, | 66 jlong time_ms, |
| 68 jint type, | 67 jint type, |
| 69 jobjectArray pts); | 68 jobjectArray pts); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 bool force); | 153 bool force); |
| 155 void StartContentIntent(const GURL& content_url); | 154 void StartContentIntent(const GURL& content_url); |
| 156 | 155 |
| 157 // -------------------------------------------------------------------------- | 156 // -------------------------------------------------------------------------- |
| 158 // Methods called from native code | 157 // Methods called from native code |
| 159 // -------------------------------------------------------------------------- | 158 // -------------------------------------------------------------------------- |
| 160 | 159 |
| 161 gfx::Rect GetBounds() const; | 160 gfx::Rect GetBounds() const; |
| 162 | 161 |
| 163 WebContents* web_contents() const { return web_contents_; } | 162 WebContents* web_contents() const { return web_contents_; } |
| 164 void LoadUrl(const GURL& url, int page_transition); | 163 |
| 165 void LoadUrlWithUserAgentOverride( | 164 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; |
| 166 const GURL& url, | |
| 167 int page_transition, | |
| 168 const std::string& user_agent_override); | |
| 169 | 165 |
| 170 private: | 166 private: |
| 171 // NotificationObserver implementation. | 167 // NotificationObserver implementation. |
| 172 virtual void Observe(int type, | 168 virtual void Observe(int type, |
| 173 const NotificationSource& source, | 169 const NotificationSource& source, |
| 174 const NotificationDetails& details) OVERRIDE; | 170 const NotificationDetails& details) OVERRIDE; |
| 175 | 171 |
| 176 // -------------------------------------------------------------------------- | 172 // -------------------------------------------------------------------------- |
| 177 // Private methods that call to Java via JNI | 173 // Private methods that call to Java via JNI |
| 178 // -------------------------------------------------------------------------- | 174 // -------------------------------------------------------------------------- |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 bool tab_crashed_; | 207 bool tab_crashed_; |
| 212 | 208 |
| 213 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 209 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 214 }; | 210 }; |
| 215 | 211 |
| 216 bool RegisterContentViewCore(JNIEnv* env); | 212 bool RegisterContentViewCore(JNIEnv* env); |
| 217 | 213 |
| 218 } // namespace content | 214 } // namespace content |
| 219 | 215 |
| 220 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 216 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |