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

Side by Side Diff: blimp/client/app/android/blimp_view.h

Issue 2274323002: Expose Blimp dependencies to the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@khushal_baseline_1
Patch Set: Fix linux build break Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ 5 #ifndef BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_
6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ 6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "blimp/client/app/android/blimp_compositor_manager_android.h" 12 #include "blimp/client/feature/compositor/blimp_compositor_manager.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Size; 16 class Size;
17 } 17 }
18 18
19 namespace blimp { 19 namespace blimp {
20 namespace client { 20 namespace client {
21 class BlimpCompositorDependencies;
22 class BlimpCompositorManager;
21 class BrowserCompositor; 23 class BrowserCompositor;
22 class RenderWidgetFeature; 24 class RenderWidgetFeature;
23 25
24 // The native component of org.chromium.blimp.BlimpView. This builds and 26 // The native component of org.chromium.blimp.BlimpView. This builds and
25 // maintains a BlimpCompositorAndroid and handles notifying the compositor of 27 // maintains a BlimpCompositorAndroid and handles notifying the compositor of
26 // SurfaceView surface changes (size, creation, destruction, etc.). 28 // SurfaceView surface changes (size, creation, destruction, etc.).
27 class BlimpView { 29 class BlimpView {
28 public: 30 public:
29 static bool RegisterJni(JNIEnv* env); 31 static bool RegisterJni(JNIEnv* env);
30 32
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 95
94 void OnSwapBuffersCompleted(); 96 void OnSwapBuffersCompleted();
95 97
96 void SetSurface(jobject surface); 98 void SetSurface(jobject surface);
97 99
98 // Reference to the Java object which owns this class. 100 // Reference to the Java object which owns this class.
99 base::android::ScopedJavaGlobalRef<jobject> java_obj_; 101 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
100 102
101 const float device_scale_factor_; 103 const float device_scale_factor_;
102 104
105 std::unique_ptr<BlimpCompositorDependencies> compositor_dependencies_;
106 std::unique_ptr<BlimpCompositorManager> compositor_manager_;
103 std::unique_ptr<BrowserCompositor> compositor_; 107 std::unique_ptr<BrowserCompositor> compositor_;
104 108
105 std::unique_ptr<BlimpCompositorManagerAndroid> compositor_manager_;
106
107 // The format of the current surface owned by |compositor_|. See 109 // The format of the current surface owned by |compositor_|. See
108 // android.graphics.PixelFormat.java. 110 // android.graphics.PixelFormat.java.
109 int current_surface_format_; 111 int current_surface_format_;
110 112
111 gfx::AcceleratedWidget window_; 113 gfx::AcceleratedWidget window_;
112 114
113 base::WeakPtrFactory<BlimpView> weak_ptr_factory_; 115 base::WeakPtrFactory<BlimpView> weak_ptr_factory_;
114 116
115 DISALLOW_COPY_AND_ASSIGN(BlimpView); 117 DISALLOW_COPY_AND_ASSIGN(BlimpView);
116 }; 118 };
117 119
118 } // namespace client 120 } // namespace client
119 } // namespace blimp 121 } // namespace blimp
120 122
121 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ 123 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_
OLDNEW
« no previous file with comments | « blimp/client/app/android/blimp_compositor_manager_android.cc ('k') | blimp/client/app/android/blimp_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698