summaryrefslogtreecommitdiffstats
path: root/android_webview/browser
diff options
context:
space:
mode:
Diffstat (limited to 'android_webview/browser')
-rw-r--r--android_webview/browser/browser_view_renderer.h2
-rw-r--r--android_webview/browser/in_process_view_renderer.cc19
-rw-r--r--android_webview/browser/in_process_view_renderer.h5
3 files changed, 11 insertions, 15 deletions
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h
index dad70ed..608d038 100644
--- a/android_webview/browser/browser_view_renderer.h
+++ b/android_webview/browser/browser_view_renderer.h
@@ -99,7 +99,7 @@ class BrowserViewRenderer {
virtual void EnableOnNewPicture(bool enabled) = 0;
// View update notifications.
- virtual void OnVisibilityChanged(bool view_visible, bool window_visible) = 0;
+ virtual void OnVisibilityChanged(bool visible) = 0;
virtual void OnSizeChanged(int width, int height) = 0;
virtual void OnAttachedToWindow(int width, int height) = 0;
virtual void OnDetachedFromWindow() = 0;
diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc
index acb6db8..ce55d1f 100644
--- a/android_webview/browser/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_view_renderer.cc
@@ -306,7 +306,7 @@ InProcessViewRenderer::InProcessViewRenderer(
java_helper_(java_helper),
web_contents_(web_contents),
compositor_(NULL),
- view_visible_(false),
+ visible_(false),
dip_scale_(0.0),
continuous_invalidate_(false),
block_invalidates_(false),
@@ -364,7 +364,7 @@ void InProcessViewRenderer::DrawGL(AwDrawGLInfo* draw_info) {
return;
TRACE_EVENT0("android_webview", "InProcessViewRenderer::DrawGL");
- DCHECK(view_visible_);
+ DCHECK(visible_);
// We need to watch if the current Android context has changed and enforce
// a clean-up in the compositor.
@@ -553,16 +553,13 @@ InProcessViewRenderer::CapturePicture() {
void InProcessViewRenderer::EnableOnNewPicture(bool enabled) {
}
-void InProcessViewRenderer::OnVisibilityChanged(bool view_visible,
- bool window_visible) {
- TRACE_EVENT_INSTANT2("android_webview",
+void InProcessViewRenderer::OnVisibilityChanged(bool visible) {
+ TRACE_EVENT_INSTANT1("android_webview",
"InProcessViewRenderer::OnVisibilityChanged",
TRACE_EVENT_SCOPE_THREAD,
- "view_visible",
- view_visible,
- "window_visible",
- window_visible);
- view_visible_ = window_visible && view_visible;
+ "visible",
+ visible);
+ visible_ = visible;
}
void InProcessViewRenderer::OnSizeChanged(int width, int height) {
@@ -603,7 +600,7 @@ bool InProcessViewRenderer::IsAttachedToWindow() {
}
bool InProcessViewRenderer::IsViewVisible() {
- return view_visible_;
+ return visible_;
}
gfx::Rect InProcessViewRenderer::GetScreenRect() {
diff --git a/android_webview/browser/in_process_view_renderer.h b/android_webview/browser/in_process_view_renderer.h
index db85926..673b6f3 100644
--- a/android_webview/browser/in_process_view_renderer.h
+++ b/android_webview/browser/in_process_view_renderer.h
@@ -42,8 +42,7 @@ class InProcessViewRenderer : public BrowserViewRenderer,
virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE;
virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE;
virtual void EnableOnNewPicture(bool enabled) OVERRIDE;
- virtual void OnVisibilityChanged(
- bool view_visible, bool window_visible) OVERRIDE;
+ virtual void OnVisibilityChanged(bool visible) OVERRIDE;
virtual void OnSizeChanged(int width, int height) OVERRIDE;
virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE;
virtual void OnAttachedToWindow(int width, int height) OVERRIDE;
@@ -77,7 +76,7 @@ class InProcessViewRenderer : public BrowserViewRenderer,
content::WebContents* web_contents_;
content::SynchronousCompositor* compositor_;
- bool view_visible_;
+ bool visible_;
float dip_scale_;
// When true, we should continuously invalidate and keep drawing, for example