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

Side by Side Diff: base/android/java/src/org/chromium/base/SystemMessageHandler.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.base; 5 package org.chromium.base;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.os.Build; 8 import android.os.Build;
9 import android.os.Handler; 9 import android.os.Handler;
10 import android.os.Message; 10 import android.os.Message;
11 11
12 import org.chromium.base.annotations.CalledByNative; 12 import org.chromium.base.annotations.CalledByNative;
13 import org.chromium.base.annotations.MainDex; 13 import org.chromium.base.annotations.MainDex;
14 14
15 import java.lang.reflect.InvocationTargetException; 15 import java.lang.reflect.InvocationTargetException;
16 import java.lang.reflect.Method; 16 import java.lang.reflect.Method;
17 17
18 @MainDex 18 @MainDex
19 class SystemMessageHandler extends Handler { 19 class SystemMessageHandler extends Handler {
20 20
21 private static final String TAG = "cr.SysMessageHandler"; 21 private static final String TAG = "cr.SysMessageHandler";
22 22
23 private static final int SCHEDULED_WORK = 1; 23 private static final int SCHEDULED_WORK = 1;
24 private static final int DELAYED_SCHEDULED_WORK = 2; 24 private static final int DELAYED_SCHEDULED_WORK = 2;
25 25
26 // Native class pointer set by the constructor of the SharedClient native cl ass. 26 // Native class pointer set by the constructor of the SharedClient native cl ass.
27 private long mMessagePumpDelegateNative = 0; 27 private long mMessagePumpDelegateNative;
28 private long mMessagePumpNative = 0; 28 private long mMessagePumpNative;
29 private long mDelayedScheduledTimeTicks = 0; 29 private long mDelayedScheduledTimeTicks;
30 30
31 protected SystemMessageHandler(long messagePumpDelegateNative, long messageP umpNative) { 31 protected SystemMessageHandler(long messagePumpDelegateNative, long messageP umpNative) {
32 mMessagePumpDelegateNative = messagePumpDelegateNative; 32 mMessagePumpDelegateNative = messagePumpDelegateNative;
33 mMessagePumpNative = messagePumpNative; 33 mMessagePumpNative = messagePumpNative;
34 } 34 }
35 35
36 @Override 36 @Override
37 public void handleMessage(Message msg) { 37 public void handleMessage(Message msg) {
38 if (msg.what == DELAYED_SCHEDULED_WORK) { 38 if (msg.what == DELAYED_SCHEDULED_WORK) {
39 mDelayedScheduledTimeTicks = 0; 39 mDelayedScheduledTimeTicks = 0;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 @CalledByNative 158 @CalledByNative
159 private static SystemMessageHandler create( 159 private static SystemMessageHandler create(
160 long messagePumpDelegateNative, long messagePumpNative) { 160 long messagePumpDelegateNative, long messagePumpNative) {
161 return new SystemMessageHandler(messagePumpDelegateNative, messagePumpNa tive); 161 return new SystemMessageHandler(messagePumpDelegateNative, messagePumpNa tive);
162 } 162 }
163 163
164 private native void nativeDoRunLoopOnce( 164 private native void nativeDoRunLoopOnce(
165 long messagePumpDelegateNative, long messagePumpNative, long delayed ScheduledTimeTicks); 165 long messagePumpDelegateNative, long messagePumpNative, long delayed ScheduledTimeTicks);
166 } 166 }
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/PerfTraceEvent.java ('k') | base/android/java/src/org/chromium/base/ThreadUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698