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

Side by Side Diff: android_webview/browser/browser_view_renderer_impl.cc

Issue 12668003: Fix for crash in testWindows test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/browser_view_renderer_impl.h" 5 #include "android_webview/browser/browser_view_renderer_impl.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <sys/system_properties.h> 8 #include <sys/system_properties.h>
9 9
10 #include "android_webview/common/renderer_picture_map.h" 10 #include "android_webview/common/renderer_picture_map.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void BrowserViewRendererImpl::SetAwDrawSWFunctionTable( 151 void BrowserViewRendererImpl::SetAwDrawSWFunctionTable(
152 AwDrawSWFunctionTable* table) { 152 AwDrawSWFunctionTable* table) {
153 g_sw_draw_functions = table; 153 g_sw_draw_functions = table;
154 g_is_skia_version_compatible = 154 g_is_skia_version_compatible =
155 g_sw_draw_functions->is_skia_version_compatible(&SkGraphics::GetVersion); 155 g_sw_draw_functions->is_skia_version_compatible(&SkGraphics::GetVersion);
156 LOG_IF(WARNING, !g_is_skia_version_compatible) 156 LOG_IF(WARNING, !g_is_skia_version_compatible)
157 << "Skia versions are not compatible, rendering performance will suffer."; 157 << "Skia versions are not compatible, rendering performance will suffer.";
158 } 158 }
159 159
160 void BrowserViewRendererImpl::SetContents(ContentViewCore* content_view_core) { 160 void BrowserViewRendererImpl::SetContents(ContentViewCore* content_view_core) {
161 if (web_contents_) { 161 // TODO(joth): Allowing a NULL param is probably not needed, see b/8341990
Leandro GraciĆ” Gil 2013/03/08 11:46:56 The destructor is calling with a NULL param to rel
162 ContentViewCore* previous_content_view_core =
163 ContentViewCore::FromWebContents(web_contents_);
164 if (previous_content_view_core) {
165 previous_content_view_core->RemoveFrameInfoCallback(
166 update_frame_info_callback_);
167 }
168 }
169
170 web_contents_ = content_view_core ? 162 web_contents_ = content_view_core ?
171 content_view_core->GetWebContents() : NULL; 163 content_view_core->GetWebContents() : NULL;
172 view_renderer_host_->Observe(web_contents_); 164 view_renderer_host_->Observe(web_contents_);
173 165
174 if (!content_view_core) 166 if (!content_view_core)
175 return; 167 return;
176 168
177 content_view_core->AddFrameInfoCallback(update_frame_info_callback_); 169 content_view_core->AddFrameInfoCallback(update_frame_info_callback_);
178 dpi_scale_ = content_view_core->GetDpiScale(); 170 dpi_scale_ = content_view_core->GetDpiScale();
179 171
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 619
628 void BrowserViewRendererImpl::OnFrameInfoUpdated( 620 void BrowserViewRendererImpl::OnFrameInfoUpdated(
629 const gfx::SizeF& content_size, 621 const gfx::SizeF& content_size,
630 const gfx::Vector2dF& scroll_offset, 622 const gfx::Vector2dF& scroll_offset,
631 float page_scale_factor) { 623 float page_scale_factor) {
632 page_scale_ = page_scale_factor; 624 page_scale_ = page_scale_factor;
633 content_size_css_ = content_size; 625 content_size_css_ = content_size;
634 } 626 }
635 627
636 } // namespace android_webview 628 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698