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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2319913002: Fixed touch offset for Blimp (Closed)
Patch Set: Changed to use top controls height Created 4 years, 3 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/fullscreen/FullscreenManager.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/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index edbaa1c0980a64a49dd6cdcdce10687735bf9045..700966859bbbcf7a78627e46fccb4497d4d534f9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -23,9 +23,9 @@ import android.view.ContextThemeWrapper;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
-import android.view.ViewGroup.LayoutParams;
import android.view.accessibility.AccessibilityEvent;
import android.widget.FrameLayout;
+import android.widget.FrameLayout.LayoutParams;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ApplicationStatus;
@@ -2876,6 +2876,19 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
mFullscreenManager.showControlsTransient();
updateFullscreenEnabledState();
}
+
+ // For blimp, set a top margin equal to the top controls height.
+ if (getBlimpContents() != null && mFullscreenManager != null) {
Khushal 2016/09/08 00:59:59 Can you also do this when we create the BlimpConte
shaktisahu 2016/09/08 02:19:00 The BlimpContents is created inside the Tab.initia
+ ViewGroup blimpView = getBlimpContents().getView();
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) blimpView.getLayoutParams();
+ if (lp == null) {
+ lp = new FrameLayout.LayoutParams(
+ LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
+ }
+
+ lp.topMargin = mFullscreenManager.getTopControlsHeight();
+ blimpView.setLayoutParams(lp);
+ }
}
/**
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698