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

Unified Diff: ui/android/delegated_frame_host_android.cc

Issue 2585993002: Revert of [android] Make RWHVAndroid a BeginFrameObserver. (Closed)
Patch Set: Created 4 years 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 | « ui/android/delegated_frame_host_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/delegated_frame_host_android.cc
diff --git a/ui/android/delegated_frame_host_android.cc b/ui/android/delegated_frame_host_android.cc
index 7dcae4546e3074c82c3d1ec9175c4ee854705665..f9f6e448cb34a7e4144f9cb698aaa667db100b39 100644
--- a/ui/android/delegated_frame_host_android.cc
+++ b/ui/android/delegated_frame_host_android.cc
@@ -70,16 +70,17 @@
} // namespace
-DelegatedFrameHostAndroid::DelegatedFrameHostAndroid(ui::ViewAndroid* view,
- SkColor background_color,
- Client* client)
+DelegatedFrameHostAndroid::DelegatedFrameHostAndroid(
+ ui::ViewAndroid* view,
+ SkColor background_color,
+ ReturnResourcesCallback return_resources_callback)
: frame_sink_id_(
ui::ContextProviderFactory::GetInstance()->AllocateFrameSinkId()),
view_(view),
- client_(client),
+ return_resources_callback_(return_resources_callback),
background_layer_(cc::SolidColorLayer::Create()) {
DCHECK(view_);
- DCHECK(client_);
+ DCHECK(!return_resources_callback_.is_null());
surface_manager_ =
ui::ContextProviderFactory::GetInstance()->GetSurfaceManager();
@@ -241,12 +242,13 @@
void DelegatedFrameHostAndroid::ReturnResources(
const cc::ReturnedResourceArray& resources) {
- client_->ReturnResources(resources);
+ return_resources_callback_.Run(resources);
}
void DelegatedFrameHostAndroid::SetBeginFrameSource(
cc::BeginFrameSource* begin_frame_source) {
- client_->SetBeginFrameSource(begin_frame_source);
+ // TODO(enne): hook this up instead of making RWHVAndroid a
+ // WindowAndroidObserver.
}
void DelegatedFrameHostAndroid::UpdateBackgroundLayer() {
« no previous file with comments | « ui/android/delegated_frame_host_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698