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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years 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.contextualsearch; 5 package org.chromium.chrome.browser.contextualsearch;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.view.ContextMenu; 8 import android.view.ContextMenu;
9 9
10 import org.chromium.base.annotations.CalledByNative; 10 import org.chromium.base.annotations.CalledByNative;
(...skipping 22 matching lines...) Expand all
33 /** 33 /**
34 * The current ContentViewCore for the Tab which this helper is monitoring. 34 * The current ContentViewCore for the Tab which this helper is monitoring.
35 */ 35 */
36 private ContentViewCore mBaseContentViewCore; 36 private ContentViewCore mBaseContentViewCore;
37 37
38 /** 38 /**
39 * The GestureListener used for handling events from the current ContentView Core. 39 * The GestureListener used for handling events from the current ContentView Core.
40 */ 40 */
41 private GestureStateListener mGestureStateListener; 41 private GestureStateListener mGestureStateListener;
42 42
43 private long mNativeHelper = 0; 43 private long mNativeHelper;
44 44
45 private final Tab mTab; 45 private final Tab mTab;
46 46
47 /** 47 /**
48 * Creates a contextual search tab helper for the given tab. 48 * Creates a contextual search tab helper for the given tab.
49 * @param tab The tab whose contextual search actions will be handled by thi s helper. 49 * @param tab The tab whose contextual search actions will be handled by thi s helper.
50 */ 50 */
51 public static void createForTab(Tab tab) { 51 public static void createForTab(Tab tab) {
52 new ContextualSearchTabHelper(tab); 52 new ContextualSearchTabHelper(tab);
53 } 53 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 if (manager != null) { 258 if (manager != null) {
259 boolean isEnabled = !PrefServiceBridge.getInstance().isContextualSea rchDisabled() 259 boolean isEnabled = !PrefServiceBridge.getInstance().isContextualSea rchDisabled()
260 && !PrefServiceBridge.getInstance().isContextualSearchUninit ialized(); 260 && !PrefServiceBridge.getInstance().isContextualSearchUninit ialized();
261 manager.onContextualSearchPrefChanged(isEnabled); 261 manager.onContextualSearchPrefChanged(isEnabled);
262 } 262 }
263 } 263 }
264 264
265 private native long nativeInit(Profile profile); 265 private native long nativeInit(Profile profile);
266 private native void nativeDestroy(long nativeContextualSearchTabHelper); 266 private native void nativeDestroy(long nativeContextualSearchTabHelper);
267 } 267 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698