| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Shows the disambiguation popup | 238 // Shows the disambiguation popup |
| 239 // |rect_pixels| --> window coordinates which |zoomed_bitmap| represents | 239 // |rect_pixels| --> window coordinates which |zoomed_bitmap| represents |
| 240 // |zoomed_bitmap| --> magnified image of potential touch targets | 240 // |zoomed_bitmap| --> magnified image of potential touch targets |
| 241 void ShowDisambiguationPopup( | 241 void ShowDisambiguationPopup( |
| 242 const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap); | 242 const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap); |
| 243 | 243 |
| 244 // Creates a java-side touch event, used for injecting touch event for | 244 // Creates a java-side touch event, used for injecting touch event for |
| 245 // testing/benchmarking purposes | 245 // testing/benchmarking purposes |
| 246 base::android::ScopedJavaLocalRef<jobject> CreateTouchEventSynthesizer(); | 246 base::android::ScopedJavaLocalRef<jobject> CreateTouchEventSynthesizer(); |
| 247 | 247 |
| 248 base::android::ScopedJavaLocalRef<jobject> GetContentVideoViewClient(); | |
| 249 | |
| 250 // Returns the context that the ContentViewCore was created with, it would | |
| 251 // typically be an Activity context for an on screen view. | |
| 252 base::android::ScopedJavaLocalRef<jobject> GetContext(); | |
| 253 | |
| 254 // Returns True if the given media should be blocked to load. | 248 // Returns True if the given media should be blocked to load. |
| 255 bool ShouldBlockMediaRequest(const GURL& url); | 249 bool ShouldBlockMediaRequest(const GURL& url); |
| 256 | 250 |
| 257 void DidStopFlinging(); | 251 void DidStopFlinging(); |
| 258 | 252 |
| 259 // Returns the viewport size after accounting for the viewport offset. | 253 // Returns the viewport size after accounting for the viewport offset. |
| 260 gfx::Size GetViewSize() const; | 254 gfx::Size GetViewSize() const; |
| 261 | 255 |
| 262 void SetAccessibilityEnabledInternal(bool enabled); | 256 void SetAccessibilityEnabledInternal(bool enabled); |
| 263 | 257 |
| 264 bool IsFullscreenRequiredForOrientationLock() const; | 258 bool IsFullscreenRequiredForOrientationLock() const; |
| 265 | 259 |
| 260 // Called once the page has entered / exited fullscreen. |
| 261 void OnDidEnterFullscreen(); |
| 262 void OnDidExitFullscreen(); |
| 263 |
| 266 // -------------------------------------------------------------------------- | 264 // -------------------------------------------------------------------------- |
| 267 // Methods called from native code | 265 // Methods called from native code |
| 268 // -------------------------------------------------------------------------- | 266 // -------------------------------------------------------------------------- |
| 269 | 267 |
| 270 gfx::Size GetPhysicalBackingSize() const; | 268 gfx::Size GetPhysicalBackingSize() const; |
| 271 gfx::Size GetViewportSizeDip() const; | 269 gfx::Size GetViewportSizeDip() const; |
| 272 float GetTopControlsLayoutHeightDip() const; | 270 float GetTopControlsLayoutHeightDip() const; |
| 273 | 271 |
| 274 void AttachLayer(scoped_refptr<cc::Layer> layer); | 272 void AttachLayer(scoped_refptr<cc::Layer> layer); |
| 275 void RemoveLayer(scoped_refptr<cc::Layer> layer); | 273 void RemoveLayer(scoped_refptr<cc::Layer> layer); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 java_bridge_dispatcher_host_; | 342 java_bridge_dispatcher_host_; |
| 345 | 343 |
| 346 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 344 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 347 }; | 345 }; |
| 348 | 346 |
| 349 bool RegisterContentViewCore(JNIEnv* env); | 347 bool RegisterContentViewCore(JNIEnv* env); |
| 350 | 348 |
| 351 } // namespace content | 349 } // namespace content |
| 352 | 350 |
| 353 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 351 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |