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 | 9 |
10 #include <list> | 10 #include <list> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "android_webview/browser/aw_browser_permission_request_delegate.h" | 15 #include "android_webview/browser/aw_browser_permission_request_delegate.h" |
16 #include "android_webview/browser/aw_message_port_message_filter.h" | |
17 #include "android_webview/browser/browser_view_renderer.h" | 16 #include "android_webview/browser/browser_view_renderer.h" |
18 #include "android_webview/browser/browser_view_renderer_client.h" | 17 #include "android_webview/browser/browser_view_renderer_client.h" |
19 #include "android_webview/browser/find_helper.h" | 18 #include "android_webview/browser/find_helper.h" |
20 #include "android_webview/browser/gl_view_renderer_manager.h" | 19 #include "android_webview/browser/gl_view_renderer_manager.h" |
21 #include "android_webview/browser/icon_helper.h" | 20 #include "android_webview/browser/icon_helper.h" |
22 #include "android_webview/browser/render_thread_manager.h" | 21 #include "android_webview/browser/render_thread_manager.h" |
23 #include "android_webview/browser/render_thread_manager_client.h" | 22 #include "android_webview/browser/render_thread_manager_client.h" |
24 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 23 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" |
25 #include "android_webview/native/permission/permission_request_handler_client.h" | 24 #include "android_webview/native/permission/permission_request_handler_client.h" |
26 #include "base/android/jni_weak_ref.h" | 25 #include "base/android/jni_weak_ref.h" |
27 #include "base/android/scoped_java_ref.h" | 26 #include "base/android/scoped_java_ref.h" |
28 #include "base/callback_forward.h" | 27 #include "base/callback_forward.h" |
29 #include "base/macros.h" | 28 #include "base/macros.h" |
30 #include "content/public/browser/web_contents_observer.h" | 29 #include "content/public/browser/web_contents_observer.h" |
31 | 30 |
32 class SkBitmap; | 31 class SkBitmap; |
33 class TabContents; | 32 class TabContents; |
34 struct AwDrawGLInfo; | 33 struct AwDrawGLInfo; |
35 | 34 |
36 namespace content { | 35 namespace content { |
36 class MessagePortDelegate; | |
sgurun-gerrit only
2016/09/30 23:40:59
remove
Yusuf
2016/10/04 21:33:14
Done.
| |
37 class WebContents; | 37 class WebContents; |
38 } | 38 } |
39 | 39 |
40 namespace android_webview { | 40 namespace android_webview { |
41 | 41 |
42 class AwContentsContainer; | 42 class AwContentsContainer; |
43 class AwContentsClientBridge; | 43 class AwContentsClientBridge; |
44 class AwGLFunctor; | 44 class AwGLFunctor; |
45 class AwPdfExporter; | 45 class AwPdfExporter; |
46 class AwWebContentsDelegate; | 46 class AwWebContentsDelegate; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
307 // Sets the java client | 307 // Sets the java client |
308 void SetAwAutofillClient(const base::android::JavaRef<jobject>& client); | 308 void SetAwAutofillClient(const base::android::JavaRef<jobject>& client); |
309 | 309 |
310 void SetJsOnlineProperty(JNIEnv* env, | 310 void SetJsOnlineProperty(JNIEnv* env, |
311 const base::android::JavaParamRef<jobject>& obj, | 311 const base::android::JavaParamRef<jobject>& obj, |
312 jboolean network_up); | 312 jboolean network_up); |
313 void TrimMemory(JNIEnv* env, | 313 void TrimMemory(JNIEnv* env, |
314 const base::android::JavaParamRef<jobject>& obj, | 314 const base::android::JavaParamRef<jobject>& obj, |
315 jint level, | 315 jint level, |
316 jboolean visible); | 316 jboolean visible); |
317 | |
318 scoped_refptr<AwMessagePortMessageFilter> GetMessagePortMessageFilter(); | |
319 void PostMessageToFrame( | 317 void PostMessageToFrame( |
320 JNIEnv* env, | 318 JNIEnv* env, |
321 const base::android::JavaParamRef<jobject>& obj, | 319 const base::android::JavaParamRef<jobject>& obj, |
322 const base::android::JavaParamRef<jstring>& frame_id, | 320 const base::android::JavaParamRef<jstring>& frame_id, |
323 const base::android::JavaParamRef<jstring>& message, | 321 const base::android::JavaParamRef<jstring>& message, |
324 const base::android::JavaParamRef<jstring>& target_origin, | 322 const base::android::JavaParamRef<jstring>& target_origin, |
325 const base::android::JavaParamRef<jintArray>& sent_ports); | 323 const base::android::JavaParamRef<jintArray>& sent_ports); |
326 void CreateMessageChannel( | 324 void CreateMessageChannel( |
327 JNIEnv* env, | 325 JNIEnv* env, |
328 const base::android::JavaParamRef<jobject>& obj, | 326 const base::android::JavaParamRef<jobject>& obj, |
(...skipping 27 matching lines...) Expand all Loading... | |
356 BrowserViewRenderer browser_view_renderer_; // Must outlive |web_contents_|. | 354 BrowserViewRenderer browser_view_renderer_; // Must outlive |web_contents_|. |
357 std::unique_ptr<content::WebContents> web_contents_; | 355 std::unique_ptr<content::WebContents> web_contents_; |
358 std::unique_ptr<AwWebContentsDelegate> web_contents_delegate_; | 356 std::unique_ptr<AwWebContentsDelegate> web_contents_delegate_; |
359 std::unique_ptr<AwContentsClientBridge> contents_client_bridge_; | 357 std::unique_ptr<AwContentsClientBridge> contents_client_bridge_; |
360 std::unique_ptr<AwRenderViewHostExt> render_view_host_ext_; | 358 std::unique_ptr<AwRenderViewHostExt> render_view_host_ext_; |
361 std::unique_ptr<FindHelper> find_helper_; | 359 std::unique_ptr<FindHelper> find_helper_; |
362 std::unique_ptr<IconHelper> icon_helper_; | 360 std::unique_ptr<IconHelper> icon_helper_; |
363 std::unique_ptr<AwContents> pending_contents_; | 361 std::unique_ptr<AwContents> pending_contents_; |
364 std::unique_ptr<AwPdfExporter> pdf_exporter_; | 362 std::unique_ptr<AwPdfExporter> pdf_exporter_; |
365 std::unique_ptr<PermissionRequestHandler> permission_request_handler_; | 363 std::unique_ptr<PermissionRequestHandler> permission_request_handler_; |
366 scoped_refptr<AwMessagePortMessageFilter> message_port_message_filter_; | |
367 | 364 |
368 // GURL is supplied by the content layer as requesting frame. | 365 // GURL is supplied by the content layer as requesting frame. |
369 // Callback is supplied by the content layer, and is invoked with the result | 366 // Callback is supplied by the content layer, and is invoked with the result |
370 // from the permission prompt. | 367 // from the permission prompt. |
371 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 368 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
372 // The first element in the list is always the currently pending request. | 369 // The first element in the list is always the currently pending request. |
373 std::list<OriginCallback> pending_geolocation_prompts_; | 370 std::list<OriginCallback> pending_geolocation_prompts_; |
374 | 371 |
375 GLViewRendererManager::Key renderer_manager_key_; | 372 GLViewRendererManager::Key renderer_manager_key_; |
376 | 373 |
377 DISALLOW_COPY_AND_ASSIGN(AwContents); | 374 DISALLOW_COPY_AND_ASSIGN(AwContents); |
378 }; | 375 }; |
379 | 376 |
380 bool RegisterAwContents(JNIEnv* env); | 377 bool RegisterAwContents(JNIEnv* env); |
381 | 378 |
382 } // namespace android_webview | 379 } // namespace android_webview |
383 | 380 |
384 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 381 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |