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

Side by Side Diff: android_webview/native/aw_contents.h

Issue 287993004: [Android WebView] Implement Ubercomp for Render Thread support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 namespace content { 30 namespace content {
31 class WebContents; 31 class WebContents;
32 } 32 }
33 33
34 namespace android_webview { 34 namespace android_webview {
35 35
36 class AwContentsContainer; 36 class AwContentsContainer;
37 class AwContentsClientBridge; 37 class AwContentsClientBridge;
38 class AwPdfExporter; 38 class AwPdfExporter;
39 class AwWebContentsDelegate; 39 class AwWebContentsDelegate;
40 class HardwareRenderer; 40 class HardwareRendererInterface;
41 class PermissionRequestHandler; 41 class PermissionRequestHandler;
42 42
43 // Native side of java-class of same name. 43 // Native side of java-class of same name.
44 // Provides the ownership of and access to browser components required for 44 // Provides the ownership of and access to browser components required for
45 // WebView functionality; analogous to chrome's TabContents, but with a 45 // WebView functionality; analogous to chrome's TabContents, but with a
46 // level of indirection provided by the AwContentsContainer abstraction. 46 // level of indirection provided by the AwContentsContainer abstraction.
47 // 47 //
48 // Object lifetime: 48 // Object lifetime:
49 // For most purposes the java and native objects can be considered to have 49 // For most purposes the java and native objects can be considered to have
50 // 1:1 lifetime and relationship. The exception is the java instance that 50 // 1:1 lifetime and relationship. The exception is the java instance that
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void SetAwAutofillManagerDelegate(jobject delegate); 209 void SetAwAutofillManagerDelegate(jobject delegate);
210 210
211 void SetJsOnlineProperty(JNIEnv* env, jobject obj, jboolean network_up); 211 void SetJsOnlineProperty(JNIEnv* env, jobject obj, jboolean network_up);
212 void TrimMemory(JNIEnv* env, jobject obj, jint level, jboolean visible); 212 void TrimMemory(JNIEnv* env, jobject obj, jint level, jboolean visible);
213 213
214 private: 214 private:
215 void InitDataReductionProxyIfNecessary(); 215 void InitDataReductionProxyIfNecessary();
216 void InitAutofillIfNecessary(bool enabled); 216 void InitAutofillIfNecessary(bool enabled);
217 217
218 void InitializeHardwareDrawIfNeeded(); 218 void InitializeHardwareDrawIfNeeded();
219 void InitializeHardwareDrawOnRenderThread();
220 void ReleaseHardwareDrawOnRenderThread(); 219 void ReleaseHardwareDrawOnRenderThread();
221 220
222 JavaObjectWeakGlobalRef java_ref_; 221 JavaObjectWeakGlobalRef java_ref_;
223 scoped_ptr<content::WebContents> web_contents_; 222 scoped_ptr<content::WebContents> web_contents_;
224 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; 223 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_;
225 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; 224 scoped_ptr<AwContentsClientBridge> contents_client_bridge_;
226 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; 225 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_;
227 scoped_ptr<FindHelper> find_helper_; 226 scoped_ptr<FindHelper> find_helper_;
228 scoped_ptr<IconHelper> icon_helper_; 227 scoped_ptr<IconHelper> icon_helper_;
229 scoped_ptr<AwContents> pending_contents_; 228 scoped_ptr<AwContents> pending_contents_;
230 SharedRendererState shared_renderer_state_; 229 SharedRendererState shared_renderer_state_;
231 BrowserViewRenderer browser_view_renderer_; 230 BrowserViewRenderer browser_view_renderer_;
232 scoped_ptr<HardwareRenderer> hardware_renderer_; 231 scoped_ptr<HardwareRendererInterface> hardware_renderer_;
233 scoped_ptr<AwPdfExporter> pdf_exporter_; 232 scoped_ptr<AwPdfExporter> pdf_exporter_;
234 scoped_ptr<PermissionRequestHandler> permission_request_handler_; 233 scoped_ptr<PermissionRequestHandler> permission_request_handler_;
235 234
236 // GURL is supplied by the content layer as requesting frame. 235 // GURL is supplied by the content layer as requesting frame.
237 // Callback is supplied by the content layer, and is invoked with the result 236 // Callback is supplied by the content layer, and is invoked with the result
238 // from the permission prompt. 237 // from the permission prompt.
239 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; 238 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback;
240 // The first element in the list is always the currently pending request. 239 // The first element in the list is always the currently pending request.
241 std::list<OriginCallback> pending_geolocation_prompts_; 240 std::list<OriginCallback> pending_geolocation_prompts_;
242 241
242 base::Lock render_thread_lock_;
243 GLViewRendererManager::Key renderer_manager_key_; 243 GLViewRendererManager::Key renderer_manager_key_;
244 244
245 DISALLOW_COPY_AND_ASSIGN(AwContents); 245 DISALLOW_COPY_AND_ASSIGN(AwContents);
246 }; 246 };
247 247
248 bool RegisterAwContents(JNIEnv* env); 248 bool RegisterAwContents(JNIEnv* env);
249 249
250 } // namespace android_webview 250 } // namespace android_webview
251 251
252 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 252 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698