Remove java ViewAndroid class
The java ViewAndroid class was only surving two purposes:
1) Implement content::PowerSaveBlocker with anchor views.
This is only used from content, and is mostly implemented
in content already, so just move the entire implementation
to content PowerSaveBlocker without going through a ui
layer interface.
2) Hold the ViewAndroidDelegate. Just have the native class
hold this object directly instead.
Other required changes:
* Updated to one anchor view per PowerSaveBlocker instead
one per ContentViewCore and keeping a count.
* PowerSaveBlockerImpl::Delegate is made a
WebContentsObserver to observer WebContents destruction.
* Removed an instrumentation test that's no longer
relevant.
BUG=469803
Review URL: https://codereview.chromium.org/1041823004
Cr-Commit-Position: refs/heads/master@{#324357}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 368ffdcf..55a291d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3220,7 +3220,7 @@
PowerSaveBlocker::kReasonVideoPlayback, "Playing video");
#if defined(OS_ANDROID)
static_cast<PowerSaveBlockerImpl*>(video_power_save_blocker_.get())
- ->InitDisplaySleepBlocker(GetView()->GetNativeView());
+ ->InitDisplaySleepBlocker(this);
#endif
}