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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java

Issue 2683653007: Show a Google "G" in the omnibox on the New Tab Page. (Closed)
Patch Set: comment Created 3 years, 10 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.content.res.Configuration; 9 import android.content.res.Configuration;
10 import android.graphics.Canvas; 10 import android.graphics.Canvas;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 TraceEvent.end(TAG + ".initialize()"); 289 TraceEvent.end(TAG + ".initialize()");
290 } 290 }
291 291
292 /** 292 /**
293 * Sets up the hint text and event handlers for the search box text view. 293 * Sets up the hint text and event handlers for the search box text view.
294 */ 294 */
295 private void initializeSearchBoxTextView() { 295 private void initializeSearchBoxTextView() {
296 TraceEvent.begin(TAG + ".initializeSearchBoxTextView()"); 296 TraceEvent.begin(TAG + ".initializeSearchBoxTextView()");
297 final TextView searchBoxTextView = (TextView) mSearchBoxView 297 final TextView searchBoxTextView = (TextView) mSearchBoxView
298 .findViewById(R.id.search_box_text); 298 .findViewById(R.id.search_box_text);
299
300 if (!ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SHOW_GOOGLE_G_IN_ OMNIBOX)) {
301 // Not using the relative version of this call because we only want to clear
302 // the drawables.
303 searchBoxTextView.setCompoundDrawables(null, null, null, null);
304 }
305
299 String hintText = getResources().getString(R.string.search_or_type_url); 306 String hintText = getResources().getString(R.string.search_or_type_url);
300
301 if (!DeviceFormFactor.isTablet(getContext()) || mManager.isFakeOmniboxTe xtEnabledTablet()) { 307 if (!DeviceFormFactor.isTablet(getContext()) || mManager.isFakeOmniboxTe xtEnabledTablet()) {
302 searchBoxTextView.setHint(hintText); 308 searchBoxTextView.setHint(hintText);
303 } else { 309 } else {
304 searchBoxTextView.setContentDescription(hintText); 310 searchBoxTextView.setContentDescription(hintText);
305 } 311 }
306 searchBoxTextView.setOnClickListener(new View.OnClickListener() { 312 searchBoxTextView.setOnClickListener(new View.OnClickListener() {
307 @Override 313 @Override
308 public void onClick(View v) { 314 public void onClick(View v) {
309 mManager.focusSearchBox(false, null); 315 mManager.focusSearchBox(false, null);
310 } 316 }
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 @Override 854 @Override
849 public void onLoadTaskAdded() { 855 public void onLoadTaskAdded() {
850 mPendingLoadTasks++; 856 mPendingLoadTasks++;
851 } 857 }
852 858
853 @Override 859 @Override
854 public void onLoadTaskCompleted() { 860 public void onLoadTaskCompleted() {
855 loadTaskCompleted(); 861 loadTaskCompleted();
856 } 862 }
857 } 863 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698