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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build Created 3 years, 7 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
Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
index 9df9a4591870428b9fa5a80804fd602ba473473a..a3c91085f3bf8b4c45d2c096af0bf88e9a3c93b4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
@@ -512,7 +512,7 @@ class SuggestionView extends ViewGroup {
}
classifications.add(0, new MatchClassification(0, MatchClassificationStyle.NONE));
- if (DeviceFormFactor.isTablet(getContext())) {
+ if (DeviceFormFactor.isTablet()) {
TextPaint tp = mContentsView.mTextLine1.getPaint();
mContentsView.mRequiredWidth =
tp.measureText(fillIntoEdit, 0, fillIntoEdit.length());
@@ -736,7 +736,7 @@ class SuggestionView extends ViewGroup {
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
- if (DeviceFormFactor.isTablet(getContext())) {
+ if (DeviceFormFactor.isTablet()) {
// Use the same image transform matrix as the navigation icon to ensure the same
// scaling, which requires centering vertically based on the height of the
// navigation icon view and not the image itself.
@@ -822,7 +822,7 @@ class SuggestionView extends ViewGroup {
// Align the text to be pixel perfectly aligned with the text in the url bar.
boolean isRTL = ApiCompatibilityUtils.isLayoutRtl(this);
- if (DeviceFormFactor.isTablet(getContext())) {
+ if (DeviceFormFactor.isTablet()) {
int textWidth = isRTL ? mTextRight : (r - l - mTextLeft);
final float maxRequiredWidth = mSuggestionDelegate.getMaxRequiredWidth();
final float maxMatchContentsWidth = mSuggestionDelegate.getMaxMatchContentsWidth();

Powered by Google App Engine
This is Rietveld 408576698