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

Unified Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java

Issue 141533006: [Android] Move the java content/ package to content_public/ to start the split. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small fixes and findbugs line update Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java
deleted file mode 100644
index 16e0654d2ca36b7cc63625613fb2b435d6129267..0000000000000000000000000000000000000000
--- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.content.browser.test.util;
-
-import android.os.IBinder;
-import android.os.ResultReceiver;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputConnection;
-
-import org.chromium.content.browser.ContentViewCore;
-import org.chromium.content.browser.input.InputMethodManagerWrapper;
-
-public class TestInputMethodManagerWrapper extends InputMethodManagerWrapper {
- private final ContentViewCore mContentViewCore;
- private InputConnection mInputConnection;
- private int mShowSoftInputCounter = 0;
- private int mUpdateSelectionCounter = 0;
- private EditorInfo mEditorInfo;
-
- public TestInputMethodManagerWrapper(ContentViewCore contentViewCore) {
- super(null);
- mContentViewCore = contentViewCore;
- }
-
- @Override
- public void restartInput(View view) {
- mEditorInfo = new EditorInfo();
- mInputConnection = mContentViewCore.onCreateInputConnection(mEditorInfo);
- }
-
- @Override
- public void showSoftInput(View view, int flags, ResultReceiver resultReceiver) {
- mShowSoftInputCounter++;
- if (mInputConnection != null) return;
- mEditorInfo = new EditorInfo();
- mInputConnection = mContentViewCore.onCreateInputConnection(mEditorInfo);
- }
-
- @Override
- public boolean isActive(View view) {
- if (mInputConnection == null) return false;
- return true;
- }
-
- @Override
- public boolean hideSoftInputFromWindow(IBinder windowToken, int flags,
- ResultReceiver resultReceiver) {
- boolean retVal = mInputConnection == null;
- mInputConnection = null;
- return retVal;
- }
-
- @Override
- public void updateSelection(View view, int selStart, int selEnd,
- int candidatesStart, int candidatesEnd) {
- mUpdateSelectionCounter++;
- }
-
- public int getShowSoftInputCounter() {
- return mShowSoftInputCounter;
- }
-
- public int getUpdateSelectionCounter() {
- return mUpdateSelectionCounter;
- }
-
- public EditorInfo getEditorInfo() {
- return mEditorInfo;
- }
-}
-

Powered by Google App Engine
This is Rietveld 408576698