| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 bool enable_showing, | 206 bool enable_showing, |
| 207 bool animate); | 207 bool animate); |
| 208 void ShowImeIfNeeded(JNIEnv* env, jobject obj); | 208 void ShowImeIfNeeded(JNIEnv* env, jobject obj); |
| 209 | 209 |
| 210 void ShowInterstitialPage(JNIEnv* env, | 210 void ShowInterstitialPage(JNIEnv* env, |
| 211 jobject obj, | 211 jobject obj, |
| 212 jstring jurl, | 212 jstring jurl, |
| 213 jint delegate); | 213 jint delegate); |
| 214 jboolean IsShowingInterstitialPage(JNIEnv* env, jobject obj); | 214 jboolean IsShowingInterstitialPage(JNIEnv* env, jobject obj); |
| 215 | 215 |
| 216 jboolean ConsumePendingRendererFrame(JNIEnv* env, jobject obj); | |
| 217 | |
| 218 void AttachExternalVideoSurface(JNIEnv* env, | 216 void AttachExternalVideoSurface(JNIEnv* env, |
| 219 jobject obj, | 217 jobject obj, |
| 220 jint player_id, | 218 jint player_id, |
| 221 jobject jsurface); | 219 jobject jsurface); |
| 222 void DetachExternalVideoSurface(JNIEnv* env, jobject obj, jint player_id); | 220 void DetachExternalVideoSurface(JNIEnv* env, jobject obj, jint player_id); |
| 223 | 221 |
| 224 // -------------------------------------------------------------------------- | 222 // -------------------------------------------------------------------------- |
| 225 // Public methods that call to Java via JNI | 223 // Public methods that call to Java via JNI |
| 226 // -------------------------------------------------------------------------- | 224 // -------------------------------------------------------------------------- |
| 227 | 225 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 275 |
| 278 gfx::Size GetPhysicalBackingSize() const; | 276 gfx::Size GetPhysicalBackingSize() const; |
| 279 gfx::Size GetViewportSizeDip() const; | 277 gfx::Size GetViewportSizeDip() const; |
| 280 gfx::Size GetViewportSizeOffsetDip() const; | 278 gfx::Size GetViewportSizeOffsetDip() const; |
| 281 float GetOverdrawBottomHeightDip() const; | 279 float GetOverdrawBottomHeightDip() const; |
| 282 | 280 |
| 283 InputEventAckState FilterInputEvent(const WebKit::WebInputEvent& input_event); | 281 InputEventAckState FilterInputEvent(const WebKit::WebInputEvent& input_event); |
| 284 | 282 |
| 285 void AttachLayer(scoped_refptr<cc::Layer> layer); | 283 void AttachLayer(scoped_refptr<cc::Layer> layer); |
| 286 void RemoveLayer(scoped_refptr<cc::Layer> layer); | 284 void RemoveLayer(scoped_refptr<cc::Layer> layer); |
| 287 void DidProduceRendererFrame(); | |
| 288 | 285 |
| 289 private: | 286 private: |
| 290 class ContentViewUserData; | 287 class ContentViewUserData; |
| 291 | 288 |
| 292 friend class ContentViewUserData; | 289 friend class ContentViewUserData; |
| 293 virtual ~ContentViewCoreImpl(); | 290 virtual ~ContentViewCoreImpl(); |
| 294 | 291 |
| 295 // NotificationObserver implementation. | 292 // NotificationObserver implementation. |
| 296 virtual void Observe(int type, | 293 virtual void Observe(int type, |
| 297 const NotificationSource& source, | 294 const NotificationSource& source, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 328 |
| 332 // A compositor layer containing any layer that should be shown. | 329 // A compositor layer containing any layer that should be shown. |
| 333 scoped_refptr<cc::Layer> root_layer_; | 330 scoped_refptr<cc::Layer> root_layer_; |
| 334 | 331 |
| 335 // Whether the renderer backing this ContentViewCore has crashed. | 332 // Whether the renderer backing this ContentViewCore has crashed. |
| 336 bool tab_crashed_; | 333 bool tab_crashed_; |
| 337 | 334 |
| 338 // Whether input events will be consistently delivered at vsync time. | 335 // Whether input events will be consistently delivered at vsync time. |
| 339 bool input_events_delivered_at_vsync_; | 336 bool input_events_delivered_at_vsync_; |
| 340 | 337 |
| 341 // Whether a new frame from the renderer is waiting to be displayed by the | |
| 342 // browser compositor. | |
| 343 bool renderer_frame_pending_; | |
| 344 | |
| 345 // Device scale factor. | 338 // Device scale factor. |
| 346 float dpi_scale_; | 339 float dpi_scale_; |
| 347 | 340 |
| 348 // The owning window that has a hold of main application activity. | 341 // The owning window that has a hold of main application activity. |
| 349 ui::WindowAndroid* window_android_; | 342 ui::WindowAndroid* window_android_; |
| 350 | 343 |
| 351 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_; | 344 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_; |
| 352 | 345 |
| 353 // Optional browser-side input event filtering. | 346 // Optional browser-side input event filtering. |
| 354 scoped_ptr<SyncInputEventFilter> input_event_filter_; | 347 scoped_ptr<SyncInputEventFilter> input_event_filter_; |
| 355 | 348 |
| 356 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 349 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 357 }; | 350 }; |
| 358 | 351 |
| 359 bool RegisterContentViewCore(JNIEnv* env); | 352 bool RegisterContentViewCore(JNIEnv* env); |
| 360 | 353 |
| 361 } // namespace content | 354 } // namespace content |
| 362 | 355 |
| 363 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 356 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |