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

Unified Diff: mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java

Issue 1630823002: Move mojo/runner to mojo/shell/standalone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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: mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java
diff --git a/mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java b/mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java
deleted file mode 100644
index 7e148acc90753160fcb8fb609b48d4ab71e927a7..0000000000000000000000000000000000000000
--- a/mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java
+++ /dev/null
@@ -1,53 +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.mojo.shell;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-
-import org.chromium.base.Log;
-
-/**
- * Activity for managing the Mojo Shell.
- */
-public class MojoShellActivity extends Activity {
- private static final String TAG = "MojoShellActivity";
- private static final String EXTRAS = "org.chromium.mojo.shell.extras";
-
- @Override
- protected void onCreate(final Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- String[] parameters = getIntent().getStringArrayExtra(EXTRAS);
- if (parameters != null) {
- for (String s : parameters) {
- s = s.replace("\\,", ",");
- }
- }
- if (Intent.ACTION_VIEW.equals(getIntent().getAction())) {
- Uri uri = getIntent().getData();
- if (uri != null) {
- Log.i(TAG, "MojoShellActivity opening " + uri);
- if (parameters == null) {
- parameters = new String[] {uri.toString()};
- } else {
- String[] newParameters = new String[parameters.length + 1];
- System.arraycopy(parameters, 0, newParameters, 0, parameters.length);
- newParameters[parameters.length] = uri.toString();
- parameters = newParameters;
- }
- }
- }
-
- // TODO(ppi): Gotcha - the call below will work only once per process lifetime, but the OS
- // has no obligation to kill the application process between destroying and restarting the
- // activity. If the application process is kept alive, initialization parameters sent with
- // the intent will be stale.
- ShellMain.ensureInitialized(this, parameters);
- ShellMain.start();
- }
-}

Powered by Google App Engine
This is Rietveld 408576698