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

Unified Diff: ui/android/java/src/org/chromium/ui/gfx/NativeWindow.java

Issue 14169011: [Android] Rename NativeWindow to WindowAndroid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Return Activity context for now Created 7 years, 8 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
« no previous file with comments | « ui/android/java/src/org/chromium/ui/gfx/ActivityNativeWindow.java ('k') | ui/android/ui_jni_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/gfx/NativeWindow.java
diff --git a/ui/android/java/src/org/chromium/ui/gfx/NativeWindow.java b/ui/android/java/src/org/chromium/ui/gfx/NativeWindow.java
deleted file mode 100644
index 3782d309f73af821245ba51828e1f578701076b2..0000000000000000000000000000000000000000
--- a/ui/android/java/src/org/chromium/ui/gfx/NativeWindow.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2012 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.ui.gfx;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-
-import org.chromium.base.JNINamespace;
-
-/**
- * The window base class that has the minimum functionality.
- */
-@JNINamespace("ui")
-public abstract class NativeWindow {
-
- // Native pointer to the c++ WindowAndroid object.
- private int mNativeWindowAndroid = 0;
-
- private Context mContext;
-
- /**
- * An interface that intent callback objects have to implement.
- */
- public interface IntentCallback {
- /**
- * Handles the data returned by the requested intent.
- * @param window A window reference.
- * @param resultCode Result code of the requested intent.
- * @param contentResolver An instance of ContentResolver class for accessing returned data.
- * @param data The data returned by the intent.
- */
- public void onIntentCompleted(NativeWindow window, int resultCode,
- ContentResolver contentResolver, Intent data);
- }
-
- /**
- * Constructs a Window object, saves a reference to the context.
- * @param context
- */
- public NativeWindow(Context context) {
- mNativeWindowAndroid = 0;
- mContext = context;
- }
-
- /**
- * Stub overridden by extending class.
- */
- abstract public void sendBroadcast(Intent intent);
-
- /**
- * Stub overridden by extending class.
- */
- abstract public boolean showIntent(Intent intent, IntentCallback callback, String error);
-
- /**
- * Stub overridden by extending class.
- */
- abstract public void showError(String error);
-
- /**
- * @return context.
- */
- public Context getContext() {
- return mContext;
- }
-
- /**
- * Destroys the c++ WindowAndroid object if one has been created.
- */
- public void destroy() {
- if (mNativeWindowAndroid != 0) {
- nativeDestroy(mNativeWindowAndroid);
- mNativeWindowAndroid = 0;
- }
- }
-
- /**
- * Returns a pointer to the c++ AndroidWindow object and calls the initializer if
- * the object has not been previously initialized.
- * @return A pointer to the c++ AndroidWindow.
- */
- public int getNativePointer() {
- if (mNativeWindowAndroid == 0) {
- mNativeWindowAndroid = nativeInit();
- }
- return mNativeWindowAndroid;
- }
-
- private native int nativeInit();
- private native void nativeDestroy(int nativeWindowAndroid);
-
-}
« no previous file with comments | « ui/android/java/src/org/chromium/ui/gfx/ActivityNativeWindow.java ('k') | ui/android/ui_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698