| 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 jstring extra_headers, |
| 57 jstring jurl, | 57 jbyteArray post_data, |
| 58 int page_transition, | 58 jstring base_url_for_data_url, |
| 59 jstring user_agent_override); | 59 jstring virtual_url_for_data_url); |
| 60 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const; | 60 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const; |
| 61 base::android::ScopedJavaLocalRef<jstring> GetTitle( | 61 base::android::ScopedJavaLocalRef<jstring> GetTitle( |
| 62 JNIEnv* env, jobject obj) const; | 62 JNIEnv* env, jobject obj) const; |
| 63 jboolean IsIncognito(JNIEnv* env, jobject obj); | 63 jboolean IsIncognito(JNIEnv* env, jobject obj); |
| 64 jboolean Crashed(JNIEnv* env, jobject obj) const { return tab_crashed_; } | 64 jboolean Crashed(JNIEnv* env, jobject obj) const { return tab_crashed_; } |
| 65 jboolean TouchEvent(JNIEnv* env, | 65 jboolean TouchEvent(JNIEnv* env, |
| 66 jobject obj, | 66 jobject obj, |
| 67 jlong time_ms, | 67 jlong time_ms, |
| 68 jint type, | 68 jint type, |
| 69 jobjectArray pts); | 69 jobjectArray pts); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void DidStartLoading(); | 151 void DidStartLoading(); |
| 152 void StartContentIntent(const GURL& content_url); | 152 void StartContentIntent(const GURL& content_url); |
| 153 | 153 |
| 154 // -------------------------------------------------------------------------- | 154 // -------------------------------------------------------------------------- |
| 155 // Methods called from native code | 155 // Methods called from native code |
| 156 // -------------------------------------------------------------------------- | 156 // -------------------------------------------------------------------------- |
| 157 | 157 |
| 158 gfx::Rect GetBounds() const; | 158 gfx::Rect GetBounds() const; |
| 159 | 159 |
| 160 WebContents* web_contents() const { return web_contents_; } | 160 WebContents* web_contents() const { return web_contents_; } |
| 161 void LoadUrl(const GURL& url, int page_transition); | 161 |
| 162 void LoadUrlWithUserAgentOverride( | 162 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; |
| 163 const GURL& url, | |
| 164 int page_transition, | |
| 165 const std::string& user_agent_override); | |
| 166 | 163 |
| 167 private: | 164 private: |
| 168 // NotificationObserver implementation. | 165 // NotificationObserver implementation. |
| 169 virtual void Observe(int type, | 166 virtual void Observe(int type, |
| 170 const NotificationSource& source, | 167 const NotificationSource& source, |
| 171 const NotificationDetails& details) OVERRIDE; | 168 const NotificationDetails& details) OVERRIDE; |
| 172 | 169 |
| 173 // -------------------------------------------------------------------------- | 170 // -------------------------------------------------------------------------- |
| 174 // Private methods that call to Java via JNI | 171 // Private methods that call to Java via JNI |
| 175 // -------------------------------------------------------------------------- | 172 // -------------------------------------------------------------------------- |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 bool tab_crashed_; | 205 bool tab_crashed_; |
| 209 | 206 |
| 210 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 207 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 211 }; | 208 }; |
| 212 | 209 |
| 213 bool RegisterContentViewCore(JNIEnv* env); | 210 bool RegisterContentViewCore(JNIEnv* env); |
| 214 | 211 |
| 215 } // namespace content | 212 } // namespace content |
| 216 | 213 |
| 217 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 214 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |