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

Side by Side Diff: chrome/browser/android/compositor/compositor_view.h

Issue 1706293005: StaticTabSceneLayer owns ToolbarLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix findbugs issue Created 4 years, 7 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 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 dp_to_pixel); 84 jfloat dp_to_pixel);
85 void UpdateToolbarLayer(JNIEnv* env,
86 const base::android::JavaParamRef<jobject>& object,
87 jint toolbar_resource_id,
88 jint toolbar_background_color,
89 jint url_bar_resource_id,
90 jfloat url_bar_alpha,
91 jfloat top_offset,
92 jfloat brightness,
93 bool visible,
94 bool show_shadow);
95 void UpdateProgressBar(JNIEnv* env,
96 const base::android::JavaParamRef<jobject>& object,
97 jint progress_bar_x,
98 jint progress_bar_y,
99 jint progress_bar_width,
100 jint progress_bar_height,
101 jint progress_bar_color,
102 jint progress_bar_background_x,
103 jint progress_bar_background_y,
104 jint progress_bar_background_width,
105 jint progress_bar_background_height,
106 jint progress_bar_background_color);
107
108 void SurfaceCreated(JNIEnv* env, 85 void SurfaceCreated(JNIEnv* env,
109 const base::android::JavaParamRef<jobject>& object); 86 const base::android::JavaParamRef<jobject>& object);
110 void SurfaceDestroyed(JNIEnv* env, 87 void SurfaceDestroyed(JNIEnv* env,
111 const base::android::JavaParamRef<jobject>& object); 88 const base::android::JavaParamRef<jobject>& object);
112 void SurfaceChanged(JNIEnv* env, 89 void SurfaceChanged(JNIEnv* env,
113 const base::android::JavaParamRef<jobject>& object, 90 const base::android::JavaParamRef<jobject>& object,
114 jint format, 91 jint format,
115 jint width, 92 jint width,
116 jint height, 93 jint height,
117 const base::android::JavaParamRef<jobject>& surface); 94 const base::android::JavaParamRef<jobject>& surface);
(...skipping 20 matching lines...) Expand all
138 int exit_code) override; 115 int exit_code) override;
139 116
140 void SetBackground(bool visible, SkColor color); 117 void SetBackground(bool visible, SkColor color);
141 118
142 base::android::ScopedJavaGlobalRef<jobject> obj_; 119 base::android::ScopedJavaGlobalRef<jobject> obj_;
143 std::unique_ptr<content::Compositor> compositor_; 120 std::unique_ptr<content::Compositor> compositor_;
144 LayerTitleCache* layer_title_cache_; 121 LayerTitleCache* layer_title_cache_;
145 TabContentManager* tab_content_manager_; 122 TabContentManager* tab_content_manager_;
146 123
147 scoped_refptr<cc::SolidColorLayer> root_layer_; 124 scoped_refptr<cc::SolidColorLayer> root_layer_;
148 scoped_refptr<ToolbarLayer> toolbar_layer_;
149 SceneLayer* scene_layer_; 125 SceneLayer* scene_layer_;
150 scoped_refptr<cc::Layer> scene_layer_layer_; 126 scoped_refptr<cc::Layer> scene_layer_layer_;
151 127
152 int current_surface_format_; 128 int current_surface_format_;
153 int content_width_; 129 int content_width_;
154 int content_height_; 130 int content_height_;
155 bool overlay_video_mode_; 131 bool overlay_video_mode_;
156 SkColor empty_background_color_; 132 SkColor empty_background_color_;
157 133
158 base::WeakPtrFactory<CompositorView> weak_factory_; 134 base::WeakPtrFactory<CompositorView> weak_factory_;
159 135
160 DISALLOW_COPY_AND_ASSIGN(CompositorView); 136 DISALLOW_COPY_AND_ASSIGN(CompositorView);
161 }; 137 };
162 138
163 bool RegisterCompositorView(JNIEnv* env); 139 bool RegisterCompositorView(JNIEnv* env);
164 140
165 } // namespace android 141 } // namespace android
166 } // namespace chrome 142 } // namespace chrome
167 143
168 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_ 144 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_COMPOSITOR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698