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

Side by Side Diff: content/browser/web_contents/web_contents_android.h

Issue 2487713002: Resolves layering violation in SynchronousCompositorHost creation (Closed)
Patch Set: checking synchronous_compositor_client_ Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/android/jni_android.h" 12 #include "base/android/jni_android.h"
13 #include "base/android/scoped_java_ref.h" 13 #include "base/android/scoped_java_ref.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/supports_user_data.h" 17 #include "base/supports_user_data.h"
18 #include "content/browser/frame_host/navigation_controller_android.h" 18 #include "content/browser/frame_host/navigation_controller_android.h"
19 #include "content/browser/renderer_host/render_widget_host_view_android.h" 19 #include "content/browser/renderer_host/render_widget_host_view_android.h"
20 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
21 21
22 namespace content { 22 namespace content {
23 23
24 class SynchronousCompositorClient;
25 class WebContentsImpl; 24 class WebContentsImpl;
26 25
27 // Android wrapper around WebContents that provides safer passage from java and 26 // Android wrapper around WebContents that provides safer passage from java and
28 // back to native and provides java with a means of communicating with its 27 // back to native and provides java with a means of communicating with its
29 // native counterpart. 28 // native counterpart.
30 class CONTENT_EXPORT WebContentsAndroid 29 class CONTENT_EXPORT WebContentsAndroid
31 : public base::SupportsUserData::Data { 30 : public base::SupportsUserData::Data {
32 public: 31 public:
33 static bool Register(JNIEnv* env); 32 static bool Register(JNIEnv* env);
34 33
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 const base::android::JavaParamRef<jobject>& color_type, 167 const base::android::JavaParamRef<jobject>& color_type,
169 jfloat scale, 168 jfloat scale,
170 jfloat x, 169 jfloat x,
171 jfloat y, 170 jfloat y,
172 jfloat width, 171 jfloat width,
173 jfloat height); 172 jfloat height);
174 173
175 void ReloadLoFiImages(JNIEnv* env, 174 void ReloadLoFiImages(JNIEnv* env,
176 const base::android::JavaParamRef<jobject>& obj); 175 const base::android::JavaParamRef<jobject>& obj);
177 176
178 void set_synchronous_compositor_client(SynchronousCompositorClient* client) {
179 synchronous_compositor_client_ = client;
180 }
181 SynchronousCompositorClient* synchronous_compositor_client() const {
182 return synchronous_compositor_client_;
183 }
184
185 int DownloadImage(JNIEnv* env, 177 int DownloadImage(JNIEnv* env,
186 const base::android::JavaParamRef<jobject>& obj, 178 const base::android::JavaParamRef<jobject>& obj,
187 const base::android::JavaParamRef<jstring>& url, 179 const base::android::JavaParamRef<jstring>& url,
188 jboolean is_fav_icon, 180 jboolean is_fav_icon,
189 jint max_bitmap_size, 181 jint max_bitmap_size,
190 jboolean bypass_cache, 182 jboolean bypass_cache,
191 const base::android::JavaParamRef<jobject>& jcallback); 183 const base::android::JavaParamRef<jobject>& jcallback);
192 184
193 void SetMediaSession( 185 void SetMediaSession(
194 const base::android::ScopedJavaLocalRef<jobject>& j_media_session); 186 const base::android::ScopedJavaLocalRef<jobject>& j_media_session);
(...skipping 12 matching lines...) Expand all
207 base::android::ScopedJavaGlobalRef<jobject>* callback, 199 base::android::ScopedJavaGlobalRef<jobject>* callback,
208 int id, 200 int id,
209 int http_status_code, 201 int http_status_code,
210 const GURL& url, 202 const GURL& url,
211 const std::vector<SkBitmap>& bitmaps, 203 const std::vector<SkBitmap>& bitmaps,
212 const std::vector<gfx::Size>& sizes); 204 const std::vector<gfx::Size>& sizes);
213 205
214 WebContentsImpl* web_contents_; 206 WebContentsImpl* web_contents_;
215 NavigationControllerAndroid navigation_controller_; 207 NavigationControllerAndroid navigation_controller_;
216 base::android::ScopedJavaGlobalRef<jobject> obj_; 208 base::android::ScopedJavaGlobalRef<jobject> obj_;
217 SynchronousCompositorClient* synchronous_compositor_client_;
218 209
219 base::WeakPtrFactory<WebContentsAndroid> weak_factory_; 210 base::WeakPtrFactory<WebContentsAndroid> weak_factory_;
220 211
221 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid); 212 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid);
222 }; 213 };
223 214
224 } // namespace content 215 } // namespace content
225 216
226 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ 217 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | content/browser/web_contents/web_contents_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698