Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Unified Diff: blimp/client/app/android/blimp_view.h

Issue 2241623002: blimp: Move compositing, input and render widget feature to client/core. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments from #7 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: blimp/client/app/android/blimp_view.h
diff --git a/blimp/client/app/android/blimp_view.h b/blimp/client/app/android/blimp_view.h
index fa60dec50657243c9888f81bf011805b8a3b3abe..1be5ebc4eae4cb1596ef080071bf08ca8ad322a9 100644
--- a/blimp/client/app/android/blimp_view.h
+++ b/blimp/client/app/android/blimp_view.h
@@ -9,7 +9,8 @@
#include "base/android/jni_android.h"
#include "base/macros.h"
-#include "blimp/client/app/android/blimp_compositor_manager_android.h"
+#include "base/memory/weak_ptr.h"
+#include "blimp/client/core/contents/blimp_contents_manager.h"
#include "ui/gfx/native_widget_types.h"
namespace gfx {
@@ -18,13 +19,13 @@ class Size;
namespace blimp {
namespace client {
-
+class BlimpContents;
class RenderWidgetFeature;
// The native component of org.chromium.blimp.BlimpView. This builds and
// maintains a BlimpCompositorAndroid and handles notifying the compositor of
// SurfaceView surface changes (size, creation, destruction, etc.).
-class BlimpView : public BlimpCompositorManagerClient {
+class BlimpView {
public:
static bool RegisterJni(JNIEnv* env);
@@ -91,17 +92,19 @@ class BlimpView : public BlimpCompositorManagerClient {
virtual ~BlimpView();
void ReleaseAcceleratedWidget();
-
- // BlimpCompositorManagerClient implementation.
- void OnSwapBuffersCompleted() override;
- void DidCommitAndDrawFrame() override;
+ void OnSwapBuffersCompleted();
// Reference to the Java object which owns this class.
base::android::ScopedJavaGlobalRef<jobject> java_obj_;
const float device_scale_factor_;
- std::unique_ptr<BlimpCompositorManagerAndroid> compositor_manager_;
+ // Manager used to create BlimpContents.
+ BlimpContentsManager blimp_contents_manager_;
+
+ // There is a 1:1 mapping between a Tab and BlimpContents. Since we support
+ // only a single tab, we keep a single BlimpContents.
+ std::unique_ptr<BlimpContentsImpl> blimp_contents_;
// The format of the current surface owned by |compositor_|. See
// android.graphics.PixelFormat.java.
@@ -109,6 +112,9 @@ class BlimpView : public BlimpCompositorManagerClient {
gfx::AcceleratedWidget window_;
+ // BlimpConnectionStatistics* blimp_connection_statistics_;
+ base::WeakPtrFactory<BlimpView> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BlimpView);
};

Powered by Google App Engine
This is Rietveld 408576698