Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 414423002: Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_android.h" 10 #include "base/android/jni_android.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual void ShowPastePopup(int x, int y) OVERRIDE; 54 virtual void ShowPastePopup(int x, int y) OVERRIDE;
55 virtual void GetScaledContentBitmap( 55 virtual void GetScaledContentBitmap(
56 float scale, 56 float scale,
57 SkColorType color_type, 57 SkColorType color_type,
58 gfx::Rect src_subrect, 58 gfx::Rect src_subrect,
59 const base::Callback<void(bool, const SkBitmap&)>& result_callback) 59 const base::Callback<void(bool, const SkBitmap&)>& result_callback)
60 OVERRIDE; 60 OVERRIDE;
61 virtual float GetDpiScale() const OVERRIDE; 61 virtual float GetDpiScale() const OVERRIDE;
62 virtual void PauseVideo() OVERRIDE; 62 virtual void PauseVideo() OVERRIDE;
63 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE; 63 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE;
64 virtual void RequestTextSurroundingSelection(
65 int max_length,
66 const base::Callback<void(const base::string16& content,
67 int start_offset,
68 int end_offset)>& callback) OVERRIDE;
69 64
70 // -------------------------------------------------------------------------- 65 // --------------------------------------------------------------------------
71 // Methods called from Java via JNI 66 // Methods called from Java via JNI
72 // -------------------------------------------------------------------------- 67 // --------------------------------------------------------------------------
73 68
74 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env, 69 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env,
75 jobject obj); 70 jobject obj);
76 71
77 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); 72 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj);
78 73
79 // Notifies the ContentViewCore that items were selected in the currently 74 // Notifies the ContentViewCore that items were selected in the currently
80 // showing select popup. 75 // showing select popup.
81 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); 76 // void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices);
82 77
83 void LoadUrl( 78 void LoadUrl(
84 JNIEnv* env, jobject obj, 79 JNIEnv* env, jobject obj,
85 jstring url, 80 jstring url,
86 jint load_url_type, 81 jint load_url_type,
87 jint transition_type, 82 jint transition_type,
88 jstring j_referrer_url, 83 jstring j_referrer_url,
89 jint referrer_policy, 84 jint referrer_policy,
90 jint ua_override_option, 85 jint ua_override_option,
91 jstring extra_headers, 86 jstring extra_headers,
92 jbyteArray post_data, 87 jbyteArray post_data,
93 jstring base_url_for_data_url, 88 jstring base_url_for_data_url,
94 jstring virtual_url_for_data_url, 89 jstring virtual_url_for_data_url,
95 jboolean can_load_local_resources, 90 jboolean can_load_local_resources,
96 jboolean is_renderer_initiated); 91 jboolean is_renderer_initiated);
97 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const;
98 jboolean IsIncognito(JNIEnv* env, jobject obj);
99 void SendOrientationChangeEvent(JNIEnv* env, jobject obj, jint orientation); 92 void SendOrientationChangeEvent(JNIEnv* env, jobject obj, jint orientation);
100 jboolean OnTouchEvent(JNIEnv* env, 93 jboolean OnTouchEvent(JNIEnv* env,
101 jobject obj, 94 jobject obj,
102 jobject motion_event, 95 jobject motion_event,
103 jlong time_ms, 96 jlong time_ms,
104 jint android_action, 97 jint android_action,
105 jint pointer_count, 98 jint pointer_count,
106 jint history_size, 99 jint history_size,
107 jint action_index, 100 jint action_index,
108 jfloat pos_x_0, 101 jfloat pos_x_0,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void LongPress(JNIEnv* env, jobject obj, jlong time_ms, 138 void LongPress(JNIEnv* env, jobject obj, jlong time_ms,
146 jfloat x, jfloat y); 139 jfloat x, jfloat y);
147 void PinchBegin(JNIEnv* env, jobject obj, jlong time_ms, jfloat x, jfloat y); 140 void PinchBegin(JNIEnv* env, jobject obj, jlong time_ms, jfloat x, jfloat y);
148 void PinchEnd(JNIEnv* env, jobject obj, jlong time_ms); 141 void PinchEnd(JNIEnv* env, jobject obj, jlong time_ms);
149 void PinchBy(JNIEnv* env, jobject obj, jlong time_ms, 142 void PinchBy(JNIEnv* env, jobject obj, jlong time_ms,
150 jfloat x, jfloat y, jfloat delta); 143 jfloat x, jfloat y, jfloat delta);
151 void SelectBetweenCoordinates(JNIEnv* env, jobject obj, 144 void SelectBetweenCoordinates(JNIEnv* env, jobject obj,
152 jfloat x1, jfloat y1, 145 jfloat x1, jfloat y1,
153 jfloat x2, jfloat y2); 146 jfloat x2, jfloat y2);
154 void MoveCaret(JNIEnv* env, jobject obj, jfloat x, jfloat y); 147 void MoveCaret(JNIEnv* env, jobject obj, jfloat x, jfloat y);
155 void HideTextHandles(JNIEnv* env, jobject obj);
156
157 void ResetGestureDetection(JNIEnv* env, jobject obj);
158 void SetDoubleTapSupportEnabled(JNIEnv* env, jobject obj, jboolean enabled);
159 void SetMultiTouchZoomSupportEnabled(JNIEnv* env,
160 jobject obj,
161 jboolean enabled);
162 148
163 void ClearHistory(JNIEnv* env, jobject obj); 149 void ClearHistory(JNIEnv* env, jobject obj);
164 void EvaluateJavaScript(JNIEnv* env, 150 void EvaluateJavaScript(JNIEnv* env,
165 jobject obj, 151 jobject obj,
166 jstring script, 152 jstring script,
167 jobject callback, 153 jobject callback,
168 jboolean start_renderer); 154 jboolean start_renderer);
169 void PostMessageToFrame(JNIEnv* env, jobject obj, jstring frame_id, 155 void PostMessageToFrame(JNIEnv* env, jobject obj, jstring frame_id,
170 jstring message, jstring source_origin, jstring target_origin); 156 jstring message, jstring source_origin, jstring target_origin);
171 long GetNativeImeAdapter(JNIEnv* env, jobject obj); 157 long GetNativeImeAdapter(JNIEnv* env, jobject obj);
(...skipping 28 matching lines...) Expand all
200 186
201 void SetAccessibilityEnabled(JNIEnv* env, jobject obj, bool enabled); 187 void SetAccessibilityEnabled(JNIEnv* env, jobject obj, bool enabled);
202 188
203 void ExtractSmartClipData(JNIEnv* env, 189 void ExtractSmartClipData(JNIEnv* env,
204 jobject obj, 190 jobject obj,
205 jint x, 191 jint x,
206 jint y, 192 jint y,
207 jint width, 193 jint width,
208 jint height); 194 jint height);
209 195
210 void SetBackgroundOpaque(JNIEnv* env, jobject jobj, jboolean opaque);
211
212 // Notifies the main frame that it can continue navigation (if it was deferred
213 // immediately at first response).
214 void ResumeResponseDeferredAtStart(JNIEnv* env, jobject obj);
215
216 void SetHasPendingNavigationTransitionForTesting(JNIEnv* env, jobject obj);
217
218 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj); 196 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj);
219 197
220 // -------------------------------------------------------------------------- 198 // --------------------------------------------------------------------------
221 // Public methods that call to Java via JNI 199 // Public methods that call to Java via JNI
222 // -------------------------------------------------------------------------- 200 // --------------------------------------------------------------------------
223 201
224 // This method is invoked when the request is deferred immediately after 202 // This method is invoked when the request is deferred immediately after
225 // receiving response headers. 203 // receiving response headers.
226 void DidDeferAfterResponseStarted( 204 void DidDeferAfterResponseStarted(
227 const scoped_refptr<net::HttpResponseHeaders>& headers, 205 const scoped_refptr<net::HttpResponseHeaders>& headers,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 java_bridge_dispatcher_host_; 366 java_bridge_dispatcher_host_;
389 367
390 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 368 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
391 }; 369 };
392 370
393 bool RegisterContentViewCore(JNIEnv* env); 371 bool RegisterContentViewCore(JNIEnv* env);
394 372
395 } // namespace content 373 } // namespace content
396 374
397 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 375 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.cc » ('j') | content/browser/android/content_view_core_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698