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_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // Methods called from native code | 290 // Methods called from native code |
291 // -------------------------------------------------------------------------- | 291 // -------------------------------------------------------------------------- |
292 | 292 |
293 gfx::Size GetPhysicalBackingSize() const; | 293 gfx::Size GetPhysicalBackingSize() const; |
294 gfx::Size GetViewportSizeDip() const; | 294 gfx::Size GetViewportSizeDip() const; |
295 gfx::Size GetViewportSizeOffsetDip() const; | 295 gfx::Size GetViewportSizeOffsetDip() const; |
296 float GetOverdrawBottomHeightDip() const; | 296 float GetOverdrawBottomHeightDip() const; |
297 | 297 |
298 void AttachLayer(scoped_refptr<cc::Layer> layer); | 298 void AttachLayer(scoped_refptr<cc::Layer> layer); |
299 void RemoveLayer(scoped_refptr<cc::Layer> layer); | 299 void RemoveLayer(scoped_refptr<cc::Layer> layer); |
300 void SetVSyncNotificationEnabled(bool enabled); | 300 void SetNeedsBeginFrame(bool enabled); |
301 void SetNeedsAnimate(); | 301 void SetNeedsAnimate(); |
302 | 302 |
303 private: | 303 private: |
304 class ContentViewUserData; | 304 class ContentViewUserData; |
305 | 305 |
306 friend class ContentViewUserData; | 306 friend class ContentViewUserData; |
307 virtual ~ContentViewCoreImpl(); | 307 virtual ~ContentViewCoreImpl(); |
308 | 308 |
309 // NotificationObserver implementation. | 309 // NotificationObserver implementation. |
310 virtual void Observe(int type, | 310 virtual void Observe(int type, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 342 |
343 // A compositor layer containing any layer that should be shown. | 343 // A compositor layer containing any layer that should be shown. |
344 scoped_refptr<cc::Layer> root_layer_; | 344 scoped_refptr<cc::Layer> root_layer_; |
345 | 345 |
346 // Whether the renderer backing this ContentViewCore has crashed. | 346 // Whether the renderer backing this ContentViewCore has crashed. |
347 bool tab_crashed_; | 347 bool tab_crashed_; |
348 | 348 |
349 // Device scale factor. | 349 // Device scale factor. |
350 float dpi_scale_; | 350 float dpi_scale_; |
351 | 351 |
| 352 // Variables used to keep track of frame timestamps and deadlines. |
| 353 base::TimeDelta vsync_interval_; |
| 354 base::TimeDelta expected_browser_composite_time_; |
| 355 |
352 // The Android view that can be used to add and remove decoration layers | 356 // The Android view that can be used to add and remove decoration layers |
353 // like AutofillPopup. | 357 // like AutofillPopup. |
354 ui::ViewAndroid* view_android_; | 358 ui::ViewAndroid* view_android_; |
355 | 359 |
356 // The owning window that has a hold of main application activity. | 360 // The owning window that has a hold of main application activity. |
357 ui::WindowAndroid* window_android_; | 361 ui::WindowAndroid* window_android_; |
358 | 362 |
359 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_; | 363 std::vector<UpdateFrameInfoCallback> update_frame_info_callbacks_; |
360 | 364 |
361 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 365 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
362 }; | 366 }; |
363 | 367 |
364 bool RegisterContentViewCore(JNIEnv* env); | 368 bool RegisterContentViewCore(JNIEnv* env); |
365 | 369 |
366 } // namespace content | 370 } // namespace content |
367 | 371 |
368 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 372 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |