OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "android_webview/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/aw_browser_main_parts.h" | 8 #include "android_webview/browser/aw_browser_main_parts.h" |
9 #include "android_webview/browser/browser_view_renderer_impl.h" | |
10 #include "android_webview/browser/gpu_memory_buffer_impl.h" | 9 #include "android_webview/browser/gpu_memory_buffer_impl.h" |
| 10 #include "android_webview/browser/in_process_view_renderer.h" |
11 #include "android_webview/browser/net_disk_cache_remover.h" | 11 #include "android_webview/browser/net_disk_cache_remover.h" |
12 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 12 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
13 #include "android_webview/common/aw_hit_test_data.h" | 13 #include "android_webview/common/aw_hit_test_data.h" |
14 #include "android_webview/native/aw_browser_dependency_factory.h" | 14 #include "android_webview/native/aw_browser_dependency_factory.h" |
15 #include "android_webview/native/aw_contents_client_bridge.h" | 15 #include "android_webview/native/aw_contents_client_bridge.h" |
16 #include "android_webview/native/aw_contents_io_thread_client_impl.h" | 16 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
17 #include "android_webview/native/aw_web_contents_delegate.h" | 17 #include "android_webview/native/aw_web_contents_delegate.h" |
18 #include "android_webview/native/java_browser_view_renderer_helper.h" | 18 #include "android_webview/native/java_browser_view_renderer_helper.h" |
19 #include "android_webview/native/state_serializer.h" | 19 #include "android_webview/native/state_serializer.h" |
20 #include "android_webview/public/browser/draw_gl.h" | 20 #include "android_webview/public/browser/draw_gl.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 AwContents::AwContents(JNIEnv* env, | 121 AwContents::AwContents(JNIEnv* env, |
122 jobject obj, | 122 jobject obj, |
123 jobject web_contents_delegate, | 123 jobject web_contents_delegate, |
124 jobject contents_client_bridge) | 124 jobject contents_client_bridge) |
125 : java_ref_(env, obj), | 125 : java_ref_(env, obj), |
126 web_contents_delegate_( | 126 web_contents_delegate_( |
127 new AwWebContentsDelegate(env, web_contents_delegate)), | 127 new AwWebContentsDelegate(env, web_contents_delegate)), |
128 contents_client_bridge_( | 128 contents_client_bridge_( |
129 new AwContentsClientBridge(env, contents_client_bridge)), | 129 new AwContentsClientBridge(env, contents_client_bridge)), |
130 browser_view_renderer_( | 130 browser_view_renderer_( |
131 BrowserViewRendererImpl::Create(this, &java_renderer_helper)) { | 131 new InProcessViewRenderer(this, &java_renderer_helper)) { |
132 android_webview::AwBrowserDependencyFactory* dependency_factory = | 132 android_webview::AwBrowserDependencyFactory* dependency_factory = |
133 android_webview::AwBrowserDependencyFactory::GetInstance(); | 133 android_webview::AwBrowserDependencyFactory::GetInstance(); |
134 | 134 |
135 // TODO(joth): rather than create and set the WebContents here, expose the | 135 // TODO(joth): rather than create and set the WebContents here, expose the |
136 // factory method to java side and have that orchestrate the construction | 136 // factory method to java side and have that orchestrate the construction |
137 // order. | 137 // order. |
138 SetWebContents(dependency_factory->CreateWebContents()); | 138 SetWebContents(dependency_factory->CreateWebContents()); |
139 } | 139 } |
140 | 140 |
141 void AwContents::SetWebContents(content::WebContents* web_contents) { | 141 void AwContents::SetWebContents(content::WebContents* web_contents) { |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 return browser_view_renderer_->CapturePicture(); | 706 return browser_view_renderer_->CapturePicture(); |
707 } | 707 } |
708 | 708 |
709 void AwContents::EnableOnNewPicture(JNIEnv* env, | 709 void AwContents::EnableOnNewPicture(JNIEnv* env, |
710 jobject obj, | 710 jobject obj, |
711 jboolean enabled) { | 711 jboolean enabled) { |
712 browser_view_renderer_->EnableOnNewPicture(enabled); | 712 browser_view_renderer_->EnableOnNewPicture(enabled); |
713 } | 713 } |
714 | 714 |
715 } // namespace android_webview | 715 } // namespace android_webview |
OLD | NEW |