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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/ViewResourceFrameLayout.java

Issue 1221333007: Get rid of ToolbarViewResourceFrameLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarViewResourceAdapter.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/widget/ViewResourceFrameLayout.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/ViewResourceFrameLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/ViewResourceFrameLayout.java
index e891d9159f8343a843b9c99c7cfb1b590c845790..cb29467b50a8c27c1a8e1ccde19be7a294f14534 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/ViewResourceFrameLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/ViewResourceFrameLayout.java
@@ -19,6 +19,7 @@ import org.chromium.ui.resources.dynamics.ViewResourceAdapter;
*/
public class ViewResourceFrameLayout extends FrameLayout {
private ViewResourceAdapter mResourceAdapter;
+ private boolean mInitializedForCapture;
David Trainor- moved to gerrit 2015/07/06 20:54:37 Are we sure we want this to default to false? If
Yusuf 2015/07/06 20:58:22 Good catch. We actually want it to default to true
/**
* Constructs a ViewResourceFrameLayout.
@@ -56,14 +57,22 @@ public class ViewResourceFrameLayout extends FrameLayout {
/**
* @return Whether the control container is ready for capturing snapshots.
*/
- protected boolean isReadyForCapture() {
- return true;
+ protected boolean isInitializedForCapture() {
+ return mInitializedForCapture;
+ }
+
+ /**
+ * Update whether the control container is ready to have the bitmap representation of
+ * itself be captured.
+ */
+ public void setInitializedForCapture(boolean ready) {
+ mInitializedForCapture = ready;
}
@Override
public ViewParent invalidateChildInParent(int[] location, Rect dirty) {
ViewParent retVal = super.invalidateChildInParent(location, dirty);
- if (isReadyForCapture()) mResourceAdapter.invalidate(dirty);
+ if (isInitializedForCapture()) mResourceAdapter.invalidate(dirty);
return retVal;
}
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarViewResourceAdapter.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698