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

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

Issue 2133873004: content: Move Surfaces related code out of RWHVA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed overscroll change Created 4 years, 4 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
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 bee676ccad0a560288c9ea6fa10aa8d949b1b53b..e3aff2c27fdac04111268ec54b40ceb8cfbd8799 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -223,13 +223,11 @@ ContentViewCoreImpl::ContentViewCoreImpl(
DCHECK(window_android);
DCHECK(!view_android_delegate.is_null());
window_android->AddChild(&view_);
- view_.SetLayer(cc::SolidColorLayer::Create());
- view_.GetLayer()->SetBackgroundColor(GetBackgroundColor(env, obj));
+ view_.SetLayer(cc::Layer::Create());
gfx::Size physical_size(
Java_ContentViewCore_getPhysicalBackingWidthPix(env, obj),
Java_ContentViewCore_getPhysicalBackingHeightPix(env, obj));
view_.GetLayer()->SetBounds(physical_size);
- view_.GetLayer()->SetIsDrawable(true);
// Currently, the only use case we have for overriding a user agent involves
// spoofing a desktop Linux user agent for "Request desktop site".
@@ -478,8 +476,6 @@ void ContentViewCoreImpl::SetTitle(const base::string16& title) {
}
void ContentViewCoreImpl::OnBackgroundColorChanged(SkColor color) {
- view_.GetLayer()->SetBackgroundColor(color);
-
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
@@ -832,18 +828,6 @@ float ContentViewCoreImpl::GetTopControlsHeightDip() const {
return GetTopControlsHeightPix() / dpi_scale();
}
-void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) {
- view_.GetLayer()->InsertChild(layer, 0);
- view_.GetLayer()->SetIsDrawable(false);
-}
-
-void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) {
- layer->RemoveFromParent();
-
- if (view_.GetLayer()->children().empty())
- view_.GetLayer()->SetIsDrawable(true);
-}
-
void ContentViewCoreImpl::MoveRangeSelectionExtent(const gfx::PointF& extent) {
if (!web_contents_)
return;
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698