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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java

Issue 258273002: Cut and Copy option should not be avilable for password field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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.content.browser.input; 5 package org.chromium.content.browser.input;
6 6
7 import android.os.Handler; 7 import android.os.Handler;
8 import android.os.ResultReceiver; 8 import android.os.ResultReceiver;
9 import android.os.SystemClock; 9 import android.os.SystemClock;
10 import android.text.Editable; 10 import android.text.Editable;
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 if (mInputConnection != null) mInputConnection.restartInput(); 487 if (mInputConnection != null) mInputConnection.restartInput();
488 } 488 }
489 489
490 @CalledByNative 490 @CalledByNative
491 void detach() { 491 void detach() {
492 if (mDismissInput != null) mHandler.removeCallbacks(mDismissInput); 492 if (mDismissInput != null) mHandler.removeCallbacks(mDismissInput);
493 mNativeImeAdapterAndroid = 0; 493 mNativeImeAdapterAndroid = 0;
494 mTextInputType = 0; 494 mTextInputType = 0;
495 } 495 }
496 496
497 public boolean isPasswordType() {
jdduke (slow) 2014/04/30 14:54:50 I realize other public methods in this class lack
498 return mTextInputType == sTextInputTypePassword;
499 }
500
497 private native boolean nativeSendSyntheticKeyEvent(long nativeImeAdapterAndr oid, 501 private native boolean nativeSendSyntheticKeyEvent(long nativeImeAdapterAndr oid,
498 int eventType, long timestampMs, int keyCode, int unicodeChar); 502 int eventType, long timestampMs, int keyCode, int unicodeChar);
499 503
500 private native boolean nativeSendKeyEvent(long nativeImeAdapterAndroid, KeyE vent event, 504 private native boolean nativeSendKeyEvent(long nativeImeAdapterAndroid, KeyE vent event,
501 int action, int modifiers, long timestampMs, int keyCode, boolean is SystemKey, 505 int action, int modifiers, long timestampMs, int keyCode, boolean is SystemKey,
502 int unicodeChar); 506 int unicodeChar);
503 507
504 private native void nativeSetComposingText(long nativeImeAdapterAndroid, Str ing text, 508 private native void nativeSetComposingText(long nativeImeAdapterAndroid, Str ing text,
505 int newCursorPosition); 509 int newCursorPosition);
506 510
(...skipping 11 matching lines...) Expand all
518 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid , 522 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid ,
519 int before, int after); 523 int before, int after);
520 524
521 private native void nativeUnselect(long nativeImeAdapterAndroid); 525 private native void nativeUnselect(long nativeImeAdapterAndroid);
522 private native void nativeSelectAll(long nativeImeAdapterAndroid); 526 private native void nativeSelectAll(long nativeImeAdapterAndroid);
523 private native void nativeCut(long nativeImeAdapterAndroid); 527 private native void nativeCut(long nativeImeAdapterAndroid);
524 private native void nativeCopy(long nativeImeAdapterAndroid); 528 private native void nativeCopy(long nativeImeAdapterAndroid);
525 private native void nativePaste(long nativeImeAdapterAndroid); 529 private native void nativePaste(long nativeImeAdapterAndroid);
526 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid); 530 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid);
527 } 531 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698