| OLD | NEW |
| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 void ExtractSmartClipData(JNIEnv* env, | 217 void ExtractSmartClipData(JNIEnv* env, |
| 218 jobject obj, | 218 jobject obj, |
| 219 jint x, | 219 jint x, |
| 220 jint y, | 220 jint y, |
| 221 jint width, | 221 jint width, |
| 222 jint height); | 222 jint height); |
| 223 | 223 |
| 224 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj); | 224 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj); |
| 225 | 225 |
| 226 void TextSurroundingSelectionRequest(JNIEnv* env, |
| 227 jobject obj, |
| 228 jint max_length); |
| 229 |
| 226 // -------------------------------------------------------------------------- | 230 // -------------------------------------------------------------------------- |
| 227 // Public methods that call to Java via JNI | 231 // Public methods that call to Java via JNI |
| 228 // -------------------------------------------------------------------------- | 232 // -------------------------------------------------------------------------- |
| 229 | 233 |
| 230 void OnSmartClipDataExtracted(const base::string16& result); | 234 void OnSmartClipDataExtracted(const base::string16& result); |
| 231 | 235 |
| 232 // Creates a popup menu with |items|. | 236 // Creates a popup menu with |items|. |
| 233 // |multiple| defines if it should support multi-select. | 237 // |multiple| defines if it should support multi-select. |
| 234 // If not |multiple|, |selected_item| sets the initially selected item. | 238 // If not |multiple|, |selected_item| sets the initially selected item. |
| 235 // Otherwise, item's "checked" flag selects it. | 239 // Otherwise, item's "checked" flag selects it. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // Returns True if the given media should be blocked to load. | 291 // Returns True if the given media should be blocked to load. |
| 288 bool ShouldBlockMediaRequest(const GURL& url); | 292 bool ShouldBlockMediaRequest(const GURL& url); |
| 289 | 293 |
| 290 void DidStopFlinging(); | 294 void DidStopFlinging(); |
| 291 | 295 |
| 292 // Returns the viewport size after accounting for the viewport offset. | 296 // Returns the viewport size after accounting for the viewport offset. |
| 293 gfx::Size GetViewSize() const; | 297 gfx::Size GetViewSize() const; |
| 294 | 298 |
| 295 void SetAccessibilityEnabledInternal(bool enabled); | 299 void SetAccessibilityEnabledInternal(bool enabled); |
| 296 | 300 |
| 301 void OnTextSurroundingSelectionResponse(const base::string16& content, |
| 302 unsigned start_offset, |
| 303 unsigned end_offset); |
| 304 |
| 297 // -------------------------------------------------------------------------- | 305 // -------------------------------------------------------------------------- |
| 298 // Methods called from native code | 306 // Methods called from native code |
| 299 // -------------------------------------------------------------------------- | 307 // -------------------------------------------------------------------------- |
| 300 | 308 |
| 301 gfx::Size GetPhysicalBackingSize() const; | 309 gfx::Size GetPhysicalBackingSize() const; |
| 302 gfx::Size GetViewportSizeDip() const; | 310 gfx::Size GetViewportSizeDip() const; |
| 303 gfx::Size GetViewportSizeOffsetDip() const; | 311 gfx::Size GetViewportSizeOffsetDip() const; |
| 304 float GetOverdrawBottomHeightDip() const; | 312 float GetOverdrawBottomHeightDip() const; |
| 305 | 313 |
| 306 void AttachLayer(scoped_refptr<cc::Layer> layer); | 314 void AttachLayer(scoped_refptr<cc::Layer> layer); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 java_bridge_dispatcher_host_manager_; | 389 java_bridge_dispatcher_host_manager_; |
| 382 | 390 |
| 383 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 391 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 384 }; | 392 }; |
| 385 | 393 |
| 386 bool RegisterContentViewCore(JNIEnv* env); | 394 bool RegisterContentViewCore(JNIEnv* env); |
| 387 | 395 |
| 388 } // namespace content | 396 } // namespace content |
| 389 | 397 |
| 390 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 398 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |