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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.ntp; 5 package org.chromium.chrome.browser.ntp;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.Canvas; 9 import android.graphics.Canvas;
10 import android.graphics.Point; 10 import android.graphics.Point;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 if (!ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SHOW_GOOGLE_G_IN_ OMNIBOX)) { 312 if (!ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SHOW_GOOGLE_G_IN_ OMNIBOX)) {
313 searchBoxTextView.setCompoundDrawablePadding(0); 313 searchBoxTextView.setCompoundDrawablePadding(0);
314 314
315 // Not using the relative version of this call because we only want to clear 315 // Not using the relative version of this call because we only want to clear
316 // the drawables. 316 // the drawables.
317 searchBoxTextView.setCompoundDrawables(null, null, null, null); 317 searchBoxTextView.setCompoundDrawables(null, null, null, null);
318 } 318 }
319 319
320 String hintText = getResources().getString(R.string.search_or_type_url); 320 String hintText = getResources().getString(R.string.search_or_type_url);
321 if (!DeviceFormFactor.isTablet(getContext())) { 321 if (!DeviceFormFactor.isTablet()) {
322 searchBoxTextView.setHint(hintText); 322 searchBoxTextView.setHint(hintText);
323 } else { 323 } else {
324 searchBoxTextView.setContentDescription(hintText); 324 searchBoxTextView.setContentDescription(hintText);
325 } 325 }
326 searchBoxTextView.setOnClickListener(new View.OnClickListener() { 326 searchBoxTextView.setOnClickListener(new View.OnClickListener() {
327 @Override 327 @Override
328 public void onClick(View v) { 328 public void onClick(View v) {
329 mManager.focusSearchBox(false, null); 329 mManager.focusSearchBox(false, null);
330 } 330 }
331 }); 331 });
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 } 923 }
924 } 924 }
925 925
926 private class UpdateSearchBoxOnScrollRunnable implements Runnable { 926 private class UpdateSearchBoxOnScrollRunnable implements Runnable {
927 @Override 927 @Override
928 public void run() { 928 public void run() {
929 updateSearchBoxOnScroll(); 929 updateSearchBoxOnScroll();
930 } 930 }
931 } 931 }
932 } 932 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698