| OLD | NEW |
| 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 "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.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; | 21 class BlimpCompositorDependencies; |
| 22 class BlimpCompositorManager; | 22 class BlimpDocumentManager; |
| 23 class BrowserCompositor; | 23 class BrowserCompositor; |
| 24 class RenderWidgetFeature; | 24 class RenderWidgetFeature; |
| 25 | 25 |
| 26 namespace app { | 26 namespace app { |
| 27 | 27 |
| 28 // The native component of org.chromium.blimp.BlimpView. This builds and | 28 // The native component of org.chromium.blimp.BlimpView. This builds and |
| 29 // maintains a BlimpCompositorAndroid and handles notifying the compositor of | 29 // maintains a BlimpCompositorAndroid and handles notifying the compositor of |
| 30 // SurfaceView surface changes (size, creation, destruction, etc.). | 30 // SurfaceView surface changes (size, creation, destruction, etc.). |
| 31 class BlimpView { | 31 class BlimpView { |
| 32 public: | 32 public: |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void OnSwapBuffersCompleted(); | 98 void OnSwapBuffersCompleted(); |
| 99 | 99 |
| 100 void SetSurface(jobject surface); | 100 void SetSurface(jobject surface); |
| 101 | 101 |
| 102 // Reference to the Java object which owns this class. | 102 // Reference to the Java object which owns this class. |
| 103 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 103 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
| 104 | 104 |
| 105 const float device_scale_factor_; | 105 const float device_scale_factor_; |
| 106 | 106 |
| 107 std::unique_ptr<BlimpCompositorDependencies> compositor_dependencies_; | 107 std::unique_ptr<BlimpCompositorDependencies> compositor_dependencies_; |
| 108 std::unique_ptr<BlimpCompositorManager> compositor_manager_; | 108 std::unique_ptr<BlimpDocumentManager> document_manager_; |
| 109 std::unique_ptr<BrowserCompositor> compositor_; | 109 std::unique_ptr<BrowserCompositor> compositor_; |
| 110 | 110 |
| 111 // The format of the current surface owned by |compositor_|. See | 111 // The format of the current surface owned by |compositor_|. See |
| 112 // android.graphics.PixelFormat.java. | 112 // android.graphics.PixelFormat.java. |
| 113 int current_surface_format_; | 113 int current_surface_format_; |
| 114 | 114 |
| 115 gfx::AcceleratedWidget window_; | 115 gfx::AcceleratedWidget window_; |
| 116 | 116 |
| 117 base::WeakPtrFactory<BlimpView> weak_ptr_factory_; | 117 base::WeakPtrFactory<BlimpView> weak_ptr_factory_; |
| 118 | 118 |
| 119 DISALLOW_COPY_AND_ASSIGN(BlimpView); | 119 DISALLOW_COPY_AND_ASSIGN(BlimpView); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace app | 122 } // namespace app |
| 123 } // namespace client | 123 } // namespace client |
| 124 } // namespace blimp | 124 } // namespace blimp |
| 125 | 125 |
| 126 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ | 126 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_VIEW_H_ |
| OLD | NEW |