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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 385643002: [Android] Clean up ViewAndroid and WindowAndroid checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 16e83d8a457ae3969bb8eed13a164c4879ec6290..c91af2e030d6eca1c1c536ed0f46913fe436e4f8 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -226,6 +226,8 @@ ContentViewCoreImpl::ContentViewCoreImpl(
accessibility_enabled_(false) {
CHECK(web_contents) <<
"A ContentViewCoreImpl should be created with a valid WebContents.";
+ DCHECK(view_android_);
+ DCHECK(window_android_);
root_layer_->SetBackgroundColor(GetBackgroundColor(env, obj));
gfx::Size physical_size(
@@ -393,10 +395,8 @@ void ContentViewCoreImpl::UpdateFrameInfo(
if (obj.is_null())
return;
- if (window_android_) {
- window_android_->set_content_offset(
- gfx::ScaleVector2d(content_offset, dpi_scale_));
- }
+ window_android_->set_content_offset(
+ gfx::ScaleVector2d(content_offset, dpi_scale_));
Java_ContentViewCore_updateFrameInfo(
env, obj.obj(),
@@ -796,14 +796,10 @@ void ContentViewCoreImpl::LoadUrl(
}
ui::ViewAndroid* ContentViewCoreImpl::GetViewAndroid() const {
- // view_android_ should never be null for Chrome.
- DCHECK(view_android_);
return view_android_;
}
ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const {
- // This should never be NULL for Chrome, but will be NULL for WebView.
- DCHECK(window_android_);
return window_android_;
}
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698