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

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

Issue 14888002: Android WebView Merged-Thread Hardware Draw (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 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 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" 9 #include "android_webview/browser/browser_view_renderer_impl.h"
10 #include "android_webview/browser/gpu_memory_buffer_impl.h" 10 #include "android_webview/browser/gpu_memory_buffer_impl.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_render_view_host_ext.h"
13 #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"
14 #include "android_webview/common/aw_hit_test_data.h" 13 #include "android_webview/common/aw_hit_test_data.h"
15 #include "android_webview/native/aw_browser_dependency_factory.h" 14 #include "android_webview/native/aw_browser_dependency_factory.h"
16 #include "android_webview/native/aw_contents_client_bridge.h" 15 #include "android_webview/native/aw_contents_client_bridge.h"
17 #include "android_webview/native/aw_contents_io_thread_client_impl.h" 16 #include "android_webview/native/aw_contents_io_thread_client_impl.h"
18 #include "android_webview/native/aw_web_contents_delegate.h" 17 #include "android_webview/native/aw_web_contents_delegate.h"
19 #include "android_webview/native/java_browser_view_renderer_helper.h" 18 #include "android_webview/native/java_browser_view_renderer_helper.h"
20 #include "android_webview/native/state_serializer.h" 19 #include "android_webview/native/state_serializer.h"
21 #include "android_webview/public/browser/draw_gl.h" 20 #include "android_webview/public/browser/draw_gl.h"
22 #include "base/android/jni_android.h" 21 #include "base/android/jni_android.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (find_helper_.get()) { 137 if (find_helper_.get()) {
139 find_helper_->SetListener(NULL); 138 find_helper_->SetListener(NULL);
140 } 139 }
141 icon_helper_.reset(new IconHelper(web_contents_.get())); 140 icon_helper_.reset(new IconHelper(web_contents_.get()));
142 icon_helper_->SetListener(this); 141 icon_helper_->SetListener(this);
143 web_contents_->SetUserData(kAwContentsUserDataKey, 142 web_contents_->SetUserData(kAwContentsUserDataKey,
144 new AwContentsUserData(this)); 143 new AwContentsUserData(this));
145 AwContentsClientBridgeBase::Associate(web_contents_.get(), 144 AwContentsClientBridgeBase::Associate(web_contents_.get(),
146 contents_client_bridge_.get()); 145 contents_client_bridge_.get());
147 web_contents_->SetDelegate(web_contents_delegate_.get()); 146 web_contents_->SetDelegate(web_contents_delegate_.get());
148 render_view_host_ext_.reset(new AwRenderViewHostExt(web_contents_.get())); 147 render_view_host_ext_.reset(
148 new AwRenderViewHostExt(this, web_contents_.get()));
149 } 149 }
150 150
151 void AwContents::SetWebContents(JNIEnv* env, jobject obj, jint new_wc) { 151 void AwContents::SetWebContents(JNIEnv* env, jobject obj, jint new_wc) {
152 SetWebContents(reinterpret_cast<content::WebContents*>(new_wc)); 152 SetWebContents(reinterpret_cast<content::WebContents*>(new_wc));
153 } 153 }
154 154
155 AwContents::~AwContents() { 155 AwContents::~AwContents() {
156 DCHECK(AwContents::FromWebContents(web_contents_.get()) == this); 156 DCHECK(AwContents::FromWebContents(web_contents_.get()) == this);
157 web_contents_->RemoveUserData(kAwContentsUserDataKey); 157 web_contents_->RemoveUserData(kAwContentsUserDataKey);
158 if (find_helper_.get()) 158 if (find_helper_.get())
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 return browser_view_renderer_->CapturePicture(); 651 return browser_view_renderer_->CapturePicture();
652 } 652 }
653 653
654 void AwContents::EnableOnNewPicture(JNIEnv* env, 654 void AwContents::EnableOnNewPicture(JNIEnv* env,
655 jobject obj, 655 jobject obj,
656 jboolean enabled) { 656 jboolean enabled) {
657 browser_view_renderer_->EnableOnNewPicture(enabled); 657 browser_view_renderer_->EnableOnNewPicture(enabled);
658 } 658 }
659 659
660 } // namespace android_webview 660 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698