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

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

Issue 292113008: Plumbing for browser process to access text surrounding selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@adb_install_humans
Patch Set: rebase - use int Created 6 years, 6 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 jobject obj, 217 jobject obj,
218 jint x, 218 jint x,
219 jint y, 219 jint y,
220 jint width, 220 jint width,
221 jint height); 221 jint height);
222 222
223 void SetBackgroundOpaque(JNIEnv* env, jobject jobj, jboolean opaque); 223 void SetBackgroundOpaque(JNIEnv* env, jobject jobj, jboolean opaque);
224 224
225 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj); 225 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj);
226 226
227 void TextSurroundingSelectionRequest(JNIEnv* env,
228 jobject obj,
229 jint max_length);
230
227 // -------------------------------------------------------------------------- 231 // --------------------------------------------------------------------------
228 // Public methods that call to Java via JNI 232 // Public methods that call to Java via JNI
229 // -------------------------------------------------------------------------- 233 // --------------------------------------------------------------------------
230 234
231 void OnSmartClipDataExtracted(const base::string16& result); 235 void OnSmartClipDataExtracted(const base::string16& result);
232 236
233 // Creates a popup menu with |items|. 237 // Creates a popup menu with |items|.
234 // |multiple| defines if it should support multi-select. 238 // |multiple| defines if it should support multi-select.
235 // If not |multiple|, |selected_item| sets the initially selected item. 239 // If not |multiple|, |selected_item| sets the initially selected item.
236 // Otherwise, item's "checked" flag selects it. 240 // Otherwise, item's "checked" flag selects it.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // Returns True if the given media should be blocked to load. 292 // Returns True if the given media should be blocked to load.
289 bool ShouldBlockMediaRequest(const GURL& url); 293 bool ShouldBlockMediaRequest(const GURL& url);
290 294
291 void DidStopFlinging(); 295 void DidStopFlinging();
292 296
293 // Returns the viewport size after accounting for the viewport offset. 297 // Returns the viewport size after accounting for the viewport offset.
294 gfx::Size GetViewSize() const; 298 gfx::Size GetViewSize() const;
295 299
296 void SetAccessibilityEnabledInternal(bool enabled); 300 void SetAccessibilityEnabledInternal(bool enabled);
297 301
302 void OnTextSurroundingSelectionResponse(const base::string16& content,
303 int start_offset,
304 int end_offset);
305
298 // -------------------------------------------------------------------------- 306 // --------------------------------------------------------------------------
299 // Methods called from native code 307 // Methods called from native code
300 // -------------------------------------------------------------------------- 308 // --------------------------------------------------------------------------
301 309
302 gfx::Size GetPhysicalBackingSize() const; 310 gfx::Size GetPhysicalBackingSize() const;
303 gfx::Size GetViewportSizeDip() const; 311 gfx::Size GetViewportSizeDip() const;
304 gfx::Size GetViewportSizeOffsetDip() const; 312 gfx::Size GetViewportSizeOffsetDip() const;
305 float GetOverdrawBottomHeightDip() const; 313 float GetOverdrawBottomHeightDip() const;
306 314
307 void AttachLayer(scoped_refptr<cc::Layer> layer); 315 void AttachLayer(scoped_refptr<cc::Layer> layer);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 java_bridge_dispatcher_host_manager_; 385 java_bridge_dispatcher_host_manager_;
378 386
379 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 387 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
380 }; 388 };
381 389
382 bool RegisterContentViewCore(JNIEnv* env); 390 bool RegisterContentViewCore(JNIEnv* env);
383 391
384 } // namespace content 392 } // namespace content
385 393
386 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 394 #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