| 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 CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ |
| 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void FinalizeLayers(JNIEnv* env, | 74 void FinalizeLayers(JNIEnv* env, |
| 75 const base::android::JavaParamRef<jobject>& jobj); | 75 const base::android::JavaParamRef<jobject>& jobj); |
| 76 void SetLayoutViewport(JNIEnv* env, | 76 void SetLayoutViewport(JNIEnv* env, |
| 77 const base::android::JavaParamRef<jobject>& object, | 77 const base::android::JavaParamRef<jobject>& object, |
| 78 jfloat x, | 78 jfloat x, |
| 79 jfloat y, | 79 jfloat y, |
| 80 jfloat width, | 80 jfloat width, |
| 81 jfloat height, | 81 jfloat height, |
| 82 jfloat visible_x_offset, | 82 jfloat visible_x_offset, |
| 83 jfloat visible_y_offset, | 83 jfloat visible_y_offset, |
| 84 jfloat overdraw_bottom_height, | |
| 85 jfloat dp_to_pixel); | 84 jfloat dp_to_pixel); |
| 86 void UpdateToolbarLayer(JNIEnv* env, | 85 void UpdateToolbarLayer(JNIEnv* env, |
| 87 const base::android::JavaParamRef<jobject>& object, | 86 const base::android::JavaParamRef<jobject>& object, |
| 88 jint toolbar_resource_id, | 87 jint toolbar_resource_id, |
| 89 jint toolbar_background_color, | 88 jint toolbar_background_color, |
| 90 jint url_bar_resource_id, | 89 jint url_bar_resource_id, |
| 91 jfloat url_bar_alpha, | 90 jfloat url_bar_alpha, |
| 92 jfloat top_offset, | 91 jfloat top_offset, |
| 93 jfloat brightness, | 92 jfloat brightness, |
| 94 bool visible, | 93 bool visible, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 ~CompositorView() override; | 132 ~CompositorView() override; |
| 134 | 133 |
| 135 // content::BrowserChildProcessObserver implementation: | 134 // content::BrowserChildProcessObserver implementation: |
| 136 void BrowserChildProcessHostDisconnected( | 135 void BrowserChildProcessHostDisconnected( |
| 137 const content::ChildProcessData& data) override; | 136 const content::ChildProcessData& data) override; |
| 138 void BrowserChildProcessCrashed(const content::ChildProcessData& data, | 137 void BrowserChildProcessCrashed(const content::ChildProcessData& data, |
| 139 int exit_code) override; | 138 int exit_code) override; |
| 140 | 139 |
| 141 void SetBackground(bool visible, SkColor color); | 140 void SetBackground(bool visible, SkColor color); |
| 142 | 141 |
| 143 int GetUsableContentHeight(); | |
| 144 | |
| 145 base::android::ScopedJavaGlobalRef<jobject> obj_; | 142 base::android::ScopedJavaGlobalRef<jobject> obj_; |
| 146 scoped_ptr<content::Compositor> compositor_; | 143 scoped_ptr<content::Compositor> compositor_; |
| 147 LayerTitleCache* layer_title_cache_; | 144 LayerTitleCache* layer_title_cache_; |
| 148 TabContentManager* tab_content_manager_; | 145 TabContentManager* tab_content_manager_; |
| 149 | 146 |
| 150 scoped_refptr<cc::SolidColorLayer> root_layer_; | 147 scoped_refptr<cc::SolidColorLayer> root_layer_; |
| 151 scoped_refptr<ToolbarLayer> toolbar_layer_; | 148 scoped_refptr<ToolbarLayer> toolbar_layer_; |
| 152 SceneLayer* scene_layer_; | 149 SceneLayer* scene_layer_; |
| 153 scoped_refptr<cc::Layer> scene_layer_layer_; | 150 scoped_refptr<cc::Layer> scene_layer_layer_; |
| 154 | 151 |
| 155 int current_surface_format_; | 152 int current_surface_format_; |
| 156 int content_width_; | 153 int content_width_; |
| 157 int content_height_; | 154 int content_height_; |
| 158 int overdraw_bottom_height_; | |
| 159 bool overlay_video_mode_; | 155 bool overlay_video_mode_; |
| 160 SkColor empty_background_color_; | 156 SkColor empty_background_color_; |
| 161 | 157 |
| 162 base::WeakPtrFactory<CompositorView> weak_factory_; | 158 base::WeakPtrFactory<CompositorView> weak_factory_; |
| 163 | 159 |
| 164 DISALLOW_COPY_AND_ASSIGN(CompositorView); | 160 DISALLOW_COPY_AND_ASSIGN(CompositorView); |
| 165 }; | 161 }; |
| 166 | 162 |
| 167 bool RegisterCompositorView(JNIEnv* env); | 163 bool RegisterCompositorView(JNIEnv* env); |
| 168 | 164 |
| 169 } // namespace android | 165 } // namespace android |
| 170 } // namespace chrome | 166 } // namespace chrome |
| 171 | 167 |
| 172 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ | 168 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ |
| OLD | NEW |