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 20 matching lines...) Expand all Loading... |
31 namespace content { | 31 namespace content { |
32 class WebContents; | 32 class WebContents; |
33 } | 33 } |
34 | 34 |
35 namespace android_webview { | 35 namespace android_webview { |
36 | 36 |
37 class AwContentsContainer; | 37 class AwContentsContainer; |
38 class AwContentsClientBridge; | 38 class AwContentsClientBridge; |
39 class AwPdfExporter; | 39 class AwPdfExporter; |
40 class AwWebContentsDelegate; | 40 class AwWebContentsDelegate; |
41 class HardwareRendererInterface; | 41 class HardwareRenderer; |
42 class PermissionRequestHandler; | 42 class PermissionRequestHandler; |
43 | 43 |
44 // Native side of java-class of same name. | 44 // Native side of java-class of same name. |
45 // Provides the ownership of and access to browser components required for | 45 // Provides the ownership of and access to browser components required for |
46 // WebView functionality; analogous to chrome's TabContents, but with a | 46 // WebView functionality; analogous to chrome's TabContents, but with a |
47 // level of indirection provided by the AwContentsContainer abstraction. | 47 // level of indirection provided by the AwContentsContainer abstraction. |
48 // | 48 // |
49 // Object lifetime: | 49 // Object lifetime: |
50 // For most purposes the java and native objects can be considered to have | 50 // For most purposes the java and native objects can be considered to have |
51 // 1:1 lifetime and relationship. The exception is the java instance that | 51 // 1:1 lifetime and relationship. The exception is the java instance that |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 JavaObjectWeakGlobalRef java_ref_; | 232 JavaObjectWeakGlobalRef java_ref_; |
233 scoped_ptr<content::WebContents> web_contents_; | 233 scoped_ptr<content::WebContents> web_contents_; |
234 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 234 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
235 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; | 235 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; |
236 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 236 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
237 scoped_ptr<FindHelper> find_helper_; | 237 scoped_ptr<FindHelper> find_helper_; |
238 scoped_ptr<IconHelper> icon_helper_; | 238 scoped_ptr<IconHelper> icon_helper_; |
239 scoped_ptr<AwContents> pending_contents_; | 239 scoped_ptr<AwContents> pending_contents_; |
240 SharedRendererState shared_renderer_state_; | 240 SharedRendererState shared_renderer_state_; |
241 BrowserViewRenderer browser_view_renderer_; | 241 BrowserViewRenderer browser_view_renderer_; |
242 scoped_ptr<HardwareRendererInterface> hardware_renderer_; | 242 scoped_ptr<HardwareRenderer> hardware_renderer_; |
243 scoped_ptr<AwPdfExporter> pdf_exporter_; | 243 scoped_ptr<AwPdfExporter> pdf_exporter_; |
244 scoped_ptr<PermissionRequestHandler> permission_request_handler_; | 244 scoped_ptr<PermissionRequestHandler> permission_request_handler_; |
245 | 245 |
246 // GURL is supplied by the content layer as requesting frame. | 246 // GURL is supplied by the content layer as requesting frame. |
247 // Callback is supplied by the content layer, and is invoked with the result | 247 // Callback is supplied by the content layer, and is invoked with the result |
248 // from the permission prompt. | 248 // from the permission prompt. |
249 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 249 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
250 // The first element in the list is always the currently pending request. | 250 // The first element in the list is always the currently pending request. |
251 std::list<OriginCallback> pending_geolocation_prompts_; | 251 std::list<OriginCallback> pending_geolocation_prompts_; |
252 | 252 |
253 base::Lock render_thread_lock_; | 253 base::Lock render_thread_lock_; |
254 GLViewRendererManager::Key renderer_manager_key_; | 254 GLViewRendererManager::Key renderer_manager_key_; |
255 | 255 |
256 DISALLOW_COPY_AND_ASSIGN(AwContents); | 256 DISALLOW_COPY_AND_ASSIGN(AwContents); |
257 }; | 257 }; |
258 | 258 |
259 bool RegisterAwContents(JNIEnv* env); | 259 bool RegisterAwContents(JNIEnv* env); |
260 | 260 |
261 } // namespace android_webview | 261 } // namespace android_webview |
262 | 262 |
263 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 263 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |