Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 #include "ui/gfx/rect_f.h" | 25 #include "ui/gfx/rect_f.h" |
| 26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
| 27 | 27 |
| 28 namespace ui { | 28 namespace ui { |
| 29 class ViewAndroid; | 29 class ViewAndroid; |
| 30 class WindowAndroid; | 30 class WindowAndroid; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 class RenderWidgetHostViewAndroid; | 34 class RenderWidgetHostViewAndroid; |
| 35 class Compositor; | |
| 35 struct MenuItem; | 36 struct MenuItem; |
| 36 | 37 |
| 37 // TODO(jrg): this is a shell. Upstream the rest. | 38 // TODO(jrg): this is a shell. Upstream the rest. |
| 38 class ContentViewCoreImpl : public ContentViewCore, | 39 class ContentViewCoreImpl : public ContentViewCore, |
| 39 public NotificationObserver, | 40 public NotificationObserver, |
| 40 public WebContentsObserver { | 41 public WebContentsObserver { |
| 41 public: | 42 public: |
| 42 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); | 43 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); |
| 43 ContentViewCoreImpl(JNIEnv* env, | 44 ContentViewCoreImpl(JNIEnv* env, |
| 44 jobject obj, | 45 jobject obj, |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 gfx::Size GetPhysicalBackingSize() const; | 297 gfx::Size GetPhysicalBackingSize() const; |
| 297 gfx::Size GetViewportSizeDip() const; | 298 gfx::Size GetViewportSizeDip() const; |
| 298 gfx::Size GetViewportSizeOffsetDip() const; | 299 gfx::Size GetViewportSizeOffsetDip() const; |
| 299 float GetOverdrawBottomHeightDip() const; | 300 float GetOverdrawBottomHeightDip() const; |
| 300 | 301 |
| 301 void AttachLayer(scoped_refptr<cc::Layer> layer); | 302 void AttachLayer(scoped_refptr<cc::Layer> layer); |
| 302 void RemoveLayer(scoped_refptr<cc::Layer> layer); | 303 void RemoveLayer(scoped_refptr<cc::Layer> layer); |
| 303 void AddBeginFrameSubscriber(); | 304 void AddBeginFrameSubscriber(); |
| 304 void RemoveBeginFrameSubscriber(); | 305 void RemoveBeginFrameSubscriber(); |
| 305 void SetNeedsAnimate(); | 306 void SetNeedsAnimate(); |
| 307 void SetCompositor(Compositor* compositor); | |
|
no sievers
2013/10/16 23:34:23
We actually need a public content API for this to
powei
2013/10/19 00:05:18
Done.
| |
| 308 Compositor* GetCompositor() const { return compositor_; } | |
| 306 | 309 |
| 307 private: | 310 private: |
| 308 class ContentViewUserData; | 311 class ContentViewUserData; |
| 309 | 312 |
| 310 friend class ContentViewUserData; | 313 friend class ContentViewUserData; |
| 311 virtual ~ContentViewCoreImpl(); | 314 virtual ~ContentViewCoreImpl(); |
| 312 | 315 |
| 313 // NotificationObserver implementation. | 316 // NotificationObserver implementation. |
| 314 virtual void Observe(int type, | 317 virtual void Observe(int type, |
| 315 const NotificationSource& source, | 318 const NotificationSource& source, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 // like AutofillPopup. | 379 // like AutofillPopup. |
| 377 ui::ViewAndroid* view_android_; | 380 ui::ViewAndroid* view_android_; |
| 378 | 381 |
| 379 // The owning window that has a hold of main application activity. | 382 // The owning window that has a hold of main application activity. |
| 380 ui::WindowAndroid* window_android_; | 383 ui::WindowAndroid* window_android_; |
| 381 | 384 |
| 382 // The cache of device's current orientation set from Java side, this value | 385 // The cache of device's current orientation set from Java side, this value |
| 383 // will be sent to Renderer once it is ready. | 386 // will be sent to Renderer once it is ready. |
| 384 int device_orientation_; | 387 int device_orientation_; |
| 385 | 388 |
| 389 // ContentViewCore does not own the compositor. This reference is kept to | |
| 390 // allow for adding observers to the compositor. | |
| 391 Compositor* compositor_; | |
| 392 | |
| 386 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 393 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 387 }; | 394 }; |
| 388 | 395 |
| 389 bool RegisterContentViewCore(JNIEnv* env); | 396 bool RegisterContentViewCore(JNIEnv* env); |
| 390 | 397 |
| 391 } // namespace content | 398 } // namespace content |
| 392 | 399 |
| 393 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 400 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |