summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/PluginActivity.java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-09-08 05:48:06 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-09-08 05:48:06 -0700
commit67dffd93e045e08e446df11e370597a9463f010c (patch)
tree832b6bb3629ec561b6b070275530a42564e7f52d /core/java/android/webkit/PluginActivity.java
parent7390c5af7a0c2379fa72218ea63a714f843edf0f (diff)
parentb127dc29bbe41dde9cb30e178bd252f48e84e533 (diff)
Merge change 23485 into eclair
* changes: Adding classes to enable plugins to use the java view system.
Diffstat (limited to 'core/java/android/webkit/PluginActivity.java')
-rw-r--r--core/java/android/webkit/PluginActivity.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/core/java/android/webkit/PluginActivity.java b/core/java/android/webkit/PluginActivity.java
new file mode 100644
index 000000000000..47af0154615c
--- /dev/null
+++ b/core/java/android/webkit/PluginActivity.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.webkit;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+
+/**
+ * @hide
+ */
+public class PluginActivity extends Activity {
+
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ //TODO remove the hardcoding and read from the intents extras
+ PluginStub stub = PluginUtil.getPluginStub(this, "com.android.sampleplugin", "com.android.sampleplugin.SamplePluginStub", -1);
+
+ if (stub != null) {
+ View pluginView = stub.getFullScreenView(this);
+ setContentView(pluginView);
+ } else {
+ finish();
+ }
+ }
+}