Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
| index a3093989bc9aee50284d64adfc8379434f8d4896..44638495236d0941d90a74b3193b432e914d76a3 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
| @@ -10,6 +10,7 @@ import android.graphics.PixelFormat; |
| import android.view.Surface; |
| import android.view.SurfaceHolder; |
| import android.view.SurfaceView; |
| +import android.view.View; |
| import android.widget.FrameLayout; |
| import org.chromium.base.CalledByNative; |
| @@ -156,6 +157,18 @@ public class ContentViewRenderView extends FrameLayout { |
| nativeSetNeedsComposite(mNativeContentViewRenderView); |
| } |
| + boolean mWindowShown; |
|
David Trainor- moved to gerrit
2015/01/15 01:16:07
private, move to top of file with other variables.
Changwan Ryu
2015/01/15 01:51:34
Removed.
|
| + |
| + @Override |
| + protected void onWindowVisibilityChanged(int visibility) { |
| + boolean windowShown = visibility == View.VISIBLE; |
|
David Trainor- moved to gerrit
2015/01/15 01:16:07
See earlier comment in TabManager.
Changwan Ryu
2015/01/15 01:51:34
Done.
|
| + if (windowShown != mWindowShown) { |
| + if (!windowShown) onWindowHidden(); |
| + mWindowShown = windowShown; |
| + } |
| + super.onWindowVisibilityChanged(visibility); |
| + } |
| + |
| /** |
| * This method should be subclassed to provide actions to be performed once the view is ready to |
| * render. |
| @@ -164,6 +177,13 @@ public class ContentViewRenderView extends FrameLayout { |
| } |
| /** |
| + * This method should be subclassed to provide actions to be performed once the window is |
| + * hidden. |
| + */ |
| + protected void onWindowHidden() { |
| + } |
| + |
| + /** |
| * This method could be subclassed optionally to provide a custom SurfaceView object to |
| * this ContentViewRenderView. |
| * @param context The context used to create the SurfaceView object. |