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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE; | 53 virtual scoped_refptr<cc::Layer> GetLayer() const OVERRIDE; |
54 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; | 54 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; |
55 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; | 55 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; |
56 virtual void ShowPastePopup(int x, int y) OVERRIDE; | 56 virtual void ShowPastePopup(int x, int y) OVERRIDE; |
57 virtual unsigned int GetScaledContentTexture( | 57 virtual unsigned int GetScaledContentTexture( |
58 float scale, | 58 float scale, |
59 gfx::Size* out_size) OVERRIDE; | 59 gfx::Size* out_size) OVERRIDE; |
60 virtual float GetDpiScale() const OVERRIDE; | 60 virtual float GetDpiScale() const OVERRIDE; |
61 virtual void RequestContentClipping(const gfx::Rect& clipping, | 61 virtual void RequestContentClipping(const gfx::Rect& clipping, |
62 const gfx::Size& content_size) OVERRIDE; | 62 const gfx::Size& content_size) OVERRIDE; |
63 virtual void SetViewportSizeDipOverride( | |
64 const gfx::Size& viewport_size) OVERRIDE; | |
63 | 65 |
64 // -------------------------------------------------------------------------- | 66 // -------------------------------------------------------------------------- |
65 // Methods called from Java via JNI | 67 // Methods called from Java via JNI |
66 // -------------------------------------------------------------------------- | 68 // -------------------------------------------------------------------------- |
67 | 69 |
68 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); | 70 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); |
69 | 71 |
70 // Notifies the ContentViewCore that items were selected in the currently | 72 // Notifies the ContentViewCore that items were selected in the currently |
71 // showing select popup. | 73 // showing select popup. |
72 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); | 74 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 | 346 |
345 // A compositor layer containing any layer that should be shown. | 347 // A compositor layer containing any layer that should be shown. |
346 scoped_refptr<cc::Layer> root_layer_; | 348 scoped_refptr<cc::Layer> root_layer_; |
347 | 349 |
348 // Whether the renderer backing this ContentViewCore has crashed. | 350 // Whether the renderer backing this ContentViewCore has crashed. |
349 bool tab_crashed_; | 351 bool tab_crashed_; |
350 | 352 |
351 // Device scale factor. | 353 // Device scale factor. |
352 float dpi_scale_; | 354 float dpi_scale_; |
353 | 355 |
356 // This allows for specifying the viewport in DIP pixels directly to avoid | |
357 // rounding errors. | |
358 gfx::Size viewport_dip_size_override_; | |
aelias_OOO_until_Jul13
2013/09/06 02:01:35
I don't like this and it shouldn't be needed. The
aelias_OOO_until_Jul13
2013/09/06 02:14:22
On second thought, I guess it probably has more to
mkosiba (inactive)
2013/09/06 18:23:09
yes and no. The reason I did this is that when the
aelias_OOO_until_Jul13
2013/09/06 22:27:47
OK. I agree you need a way to specify both values
| |
359 | |
354 // Variables used to keep track of frame timestamps and deadlines. | 360 // Variables used to keep track of frame timestamps and deadlines. |
355 base::TimeDelta vsync_interval_; | 361 base::TimeDelta vsync_interval_; |
356 base::TimeDelta expected_browser_composite_time_; | 362 base::TimeDelta expected_browser_composite_time_; |
357 | 363 |
358 // The Android view that can be used to add and remove decoration layers | 364 // The Android view that can be used to add and remove decoration layers |
359 // like AutofillPopup. | 365 // like AutofillPopup. |
360 ui::ViewAndroid* view_android_; | 366 ui::ViewAndroid* view_android_; |
361 | 367 |
362 // The owning window that has a hold of main application activity. | 368 // The owning window that has a hold of main application activity. |
363 ui::WindowAndroid* window_android_; | 369 ui::WindowAndroid* window_android_; |
364 | 370 |
365 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 371 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
366 }; | 372 }; |
367 | 373 |
368 bool RegisterContentViewCore(JNIEnv* env); | 374 bool RegisterContentViewCore(JNIEnv* env); |
369 | 375 |
370 } // namespace content | 376 } // namespace content |
371 | 377 |
372 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 378 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |