| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 jboolean CanGoToOffset(JNIEnv* env, jobject obj, jint offset); | 106 jboolean CanGoToOffset(JNIEnv* env, jobject obj, jint offset); |
| 107 void GoBack(JNIEnv* env, jobject obj); | 107 void GoBack(JNIEnv* env, jobject obj); |
| 108 void GoForward(JNIEnv* env, jobject obj); | 108 void GoForward(JNIEnv* env, jobject obj); |
| 109 void GoToOffset(JNIEnv* env, jobject obj, jint offset); | 109 void GoToOffset(JNIEnv* env, jobject obj, jint offset); |
| 110 void StopLoading(JNIEnv* env, jobject obj); | 110 void StopLoading(JNIEnv* env, jobject obj); |
| 111 void Reload(JNIEnv* env, jobject obj); | 111 void Reload(JNIEnv* env, jobject obj); |
| 112 jboolean NeedsReload(JNIEnv* env, jobject obj); | 112 jboolean NeedsReload(JNIEnv* env, jobject obj); |
| 113 void ClearHistory(JNIEnv* env, jobject obj); | 113 void ClearHistory(JNIEnv* env, jobject obj); |
| 114 void SetClient(JNIEnv* env, jobject obj, jobject jclient); | 114 void SetClient(JNIEnv* env, jobject obj, jobject jclient); |
| 115 jint EvaluateJavaScript(JNIEnv* env, jobject obj, jstring script); | 115 jint EvaluateJavaScript(JNIEnv* env, jobject obj, jstring script); |
| 116 virtual int GetNativeImeAdapter(JNIEnv* env, jobject obj) OVERRIDE; |
| 116 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE; | 117 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() OVERRIDE; |
| 117 void AddJavascriptInterface(JNIEnv* env, | 118 void AddJavascriptInterface(JNIEnv* env, |
| 118 jobject obj, | 119 jobject obj, |
| 119 jobject object, | 120 jobject object, |
| 120 jstring name, | 121 jstring name, |
| 121 jboolean require_annotation); | 122 jboolean require_annotation); |
| 122 void RemoveJavascriptInterface(JNIEnv* env, jobject obj, jstring name); | 123 void RemoveJavascriptInterface(JNIEnv* env, jobject obj, jstring name); |
| 123 int GetNavigationHistory(JNIEnv* env, jobject obj, jobject context); | 124 int GetNavigationHistory(JNIEnv* env, jobject obj, jobject context); |
| 124 | 125 |
| 125 // -------------------------------------------------------------------------- | 126 // -------------------------------------------------------------------------- |
| 126 // Public methods that call to Java via JNI | 127 // Public methods that call to Java via JNI |
| 127 // -------------------------------------------------------------------------- | 128 // -------------------------------------------------------------------------- |
| 128 | 129 |
| 129 // Creates a popup menu with |items|. | 130 // Creates a popup menu with |items|. |
| 130 // |multiple| defines if it should support multi-select. | 131 // |multiple| defines if it should support multi-select. |
| 131 // If not |multiple|, |selected_item| sets the initially selected item. | 132 // If not |multiple|, |selected_item| sets the initially selected item. |
| 132 // Otherwise, item's "checked" flag selects it. | 133 // Otherwise, item's "checked" flag selects it. |
| 133 void ShowSelectPopupMenu(const std::vector<WebMenuItem>& items, | 134 void ShowSelectPopupMenu(const std::vector<WebMenuItem>& items, |
| 134 int selected_item, | 135 int selected_item, |
| 135 bool multiple); | 136 bool multiple); |
| 136 | 137 |
| 137 void OnTabCrashed(const base::ProcessHandle handle); | 138 void OnTabCrashed(const base::ProcessHandle handle); |
| 139 void ImeUpdateAdapter(int native_ime_adapter, int text_input_type, |
| 140 const std::string& text, |
| 141 int selection_start, int selection_end, |
| 142 int composition_start, int composition_end, |
| 143 bool show_ime_if_needed); |
| 138 void SetTitle(const string16& title); | 144 void SetTitle(const string16& title); |
| 139 | 145 |
| 140 bool HasFocus(); | 146 bool HasFocus(); |
| 141 void ConfirmTouchEvent(bool handled); | 147 void ConfirmTouchEvent(bool handled); |
| 142 void DidSetNeedTouchEvents(bool need_touch_events); | 148 void DidSetNeedTouchEvents(bool need_touch_events); |
| 143 void OnSelectionChanged(const std::string& text); | 149 void OnSelectionChanged(const std::string& text); |
| 144 void OnSelectionBoundsChanged(int startx, | 150 void OnSelectionBoundsChanged(int startx, |
| 145 int starty, | 151 int starty, |
| 146 base::i18n::TextDirection start_dir, | 152 base::i18n::TextDirection start_dir, |
| 147 int endx, | 153 int endx, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 bool tab_crashed_; | 212 bool tab_crashed_; |
| 207 | 213 |
| 208 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 214 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 209 }; | 215 }; |
| 210 | 216 |
| 211 bool RegisterContentViewCore(JNIEnv* env); | 217 bool RegisterContentViewCore(JNIEnv* env); |
| 212 | 218 |
| 213 } // namespace content | 219 } // namespace content |
| 214 | 220 |
| 215 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 221 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |