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

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

Issue 687433002: Remove mojo/shell and (most) service implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove mojo/gles2, disable mojo apps in component build Created 6 years, 2 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/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java
diff --git a/mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java b/mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java
deleted file mode 100644
index ba2a3243935a966f7da5c722b0fdf1bc1532ccb2..0000000000000000000000000000000000000000
--- a/mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java
+++ /dev/null
@@ -1,67 +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_apk;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.os.Bundle;
-import android.util.Log;
-import android.widget.EditText;
-
-import org.chromium.base.library_loader.LibraryLoader;
-import org.chromium.base.library_loader.ProcessInitException;
-
-/**
- * Activity for managing the Mojo Shell.
- */
-public class MojoShellActivity extends Activity {
- private static final String TAG = "MojoShellActivity";
-
- @Override
- protected void onCreate(final Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- try {
- LibraryLoader.ensureInitialized();
- } catch (ProcessInitException e) {
- Log.e(TAG, "libmojo_shell initialization failed.", e);
- finish();
- return;
- }
-
- MojoMain.ensureInitialized(this);
-
- String appUrl = getUrlFromIntent(getIntent());
- if (appUrl == null) {
- Log.i(TAG, "No URL provided via intent, prompting user...");
- AlertDialog.Builder alert = new AlertDialog.Builder(this);
- alert.setTitle("Enter a URL");
- alert.setMessage("Enter a URL");
- final EditText input = new EditText(this);
- alert.setView(input);
- alert.setPositiveButton("Load", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int button) {
- String url = input.getText().toString();
- startWithURL(url);
- }
- });
- alert.show();
- } else {
- startWithURL(appUrl);
- }
- }
-
- private static String getUrlFromIntent(Intent intent) {
- return intent != null ? intent.getDataString() : null;
- }
-
- private void startWithURL(String url) {
- MojoMain.start(url);
- Log.i(TAG, "Mojo started: " + url);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698