OLD | NEW |
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 Loading... |
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 JavaObjectWeakGlobalRef java_ref_; | 220 JavaObjectWeakGlobalRef java_ref_; |
221 scoped_ptr<content::WebContents> web_contents_; | 221 scoped_ptr<content::WebContents> web_contents_; |
222 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 222 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
223 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; | 223 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; |
224 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 224 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
225 scoped_ptr<FindHelper> find_helper_; | 225 scoped_ptr<FindHelper> find_helper_; |
226 scoped_ptr<IconHelper> icon_helper_; | 226 scoped_ptr<IconHelper> icon_helper_; |
227 scoped_ptr<AwContents> pending_contents_; | 227 scoped_ptr<AwContents> pending_contents_; |
228 SharedRendererState shared_renderer_state_; | 228 SharedRendererState shared_renderer_state_; |
229 BrowserViewRenderer browser_view_renderer_; | 229 BrowserViewRenderer browser_view_renderer_; |
230 scoped_ptr<HardwareRenderer> hardware_renderer_; | 230 scoped_ptr<HardwareRendererInterface> hardware_renderer_; |
231 scoped_ptr<AwPdfExporter> pdf_exporter_; | 231 scoped_ptr<AwPdfExporter> pdf_exporter_; |
232 scoped_ptr<PermissionRequestHandler> permission_request_handler_; | 232 scoped_ptr<PermissionRequestHandler> permission_request_handler_; |
233 | 233 |
234 // GURL is supplied by the content layer as requesting frame. | 234 // GURL is supplied by the content layer as requesting frame. |
235 // Callback is supplied by the content layer, and is invoked with the result | 235 // Callback is supplied by the content layer, and is invoked with the result |
236 // from the permission prompt. | 236 // from the permission prompt. |
237 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 237 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
238 // The first element in the list is always the currently pending request. | 238 // The first element in the list is always the currently pending request. |
239 std::list<OriginCallback> pending_geolocation_prompts_; | 239 std::list<OriginCallback> pending_geolocation_prompts_; |
240 | 240 |
241 base::Lock render_thread_lock_; | 241 base::Lock render_thread_lock_; |
242 GLViewRendererManager::Key renderer_manager_key_; | 242 GLViewRendererManager::Key renderer_manager_key_; |
243 | 243 |
244 DISALLOW_COPY_AND_ASSIGN(AwContents); | 244 DISALLOW_COPY_AND_ASSIGN(AwContents); |
245 }; | 245 }; |
246 | 246 |
247 bool RegisterAwContents(JNIEnv* env); | 247 bool RegisterAwContents(JNIEnv* env); |
248 | 248 |
249 } // namespace android_webview | 249 } // namespace android_webview |
250 | 250 |
251 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 251 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |