Rename the various shell MojoMains to ShellMain.

Arguably, it should just be Main. <shrug>

R=jamesr@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1045923003
diff --git a/shell/BUILD.gn b/shell/BUILD.gn
index d7c503b..e83e9e4 100644
--- a/shell/BUILD.gn
+++ b/shell/BUILD.gn
@@ -251,7 +251,7 @@
       "android/apk/src/org/chromium/mojo/shell/AndroidHandler.java",
       "android/apk/src/org/chromium/mojo/shell/Bootstrap.java",
       "android/apk/src/org/chromium/mojo/shell/Keyboard.java",
-      "android/apk/src/org/chromium/mojo/shell/MojoMain.java",
+      "android/apk/src/org/chromium/mojo/shell/ShellMain.java",
       "android/tests/src/org/chromium/mojo/shell/ShellTestBase.java",
     ]
     jni_package = "mojo/shell"
@@ -295,9 +295,9 @@
       "android/apk/src/org/chromium/mojo/shell/AndroidHandler.java",
       "android/apk/src/org/chromium/mojo/shell/FileHelper.java",
       "android/apk/src/org/chromium/mojo/shell/Keyboard.java",
-      "android/apk/src/org/chromium/mojo/shell/MojoMain.java",
       "android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java",
       "android/apk/src/org/chromium/mojo/shell/MojoShellApplication.java",
+      "android/apk/src/org/chromium/mojo/shell/ShellMain.java",
     ]
 
     deps = [
diff --git a/shell/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java b/shell/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java
index 023b929..a56c43d 100644
--- a/shell/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java
+++ b/shell/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java
@@ -32,10 +32,10 @@
         // TODO(qsr): We should be passing application context here as required by
         // InitApplicationContext on the native side. Currently we can't, as PlatformViewportAndroid
         // relies on this being the activity context.
-        MojoMain.ensureInitialized(this, getParametersFromIntent(getIntent()));
+        ShellMain.ensureInitialized(this, getParametersFromIntent(getIntent()));
 
-        // TODO(eseidel): MojoMain can fail, but we're ignoring the return.
-        MojoMain.start();
+        // TODO(eseidel): ShellMain can fail, but we're ignoring the return.
+        ShellMain.start();
     }
 
     private static String[] getParametersFromIntent(Intent intent) {
diff --git a/shell/android/apk/src/org/chromium/mojo/shell/MojoMain.java b/shell/android/apk/src/org/chromium/mojo/shell/ShellMain.java
similarity index 94%
rename from shell/android/apk/src/org/chromium/mojo/shell/MojoMain.java
rename to shell/android/apk/src/org/chromium/mojo/shell/ShellMain.java
index d383b8d..1f55fa2 100644
--- a/shell/android/apk/src/org/chromium/mojo/shell/MojoMain.java
+++ b/shell/android/apk/src/org/chromium/mojo/shell/ShellMain.java
@@ -20,8 +20,8 @@
  * A placeholder class to call native functions.
  **/
 @JNINamespace("mojo::shell")
-public class MojoMain {
-    private static final String TAG = "MojoMain";
+public class ShellMain {
+    private static final String TAG = "ShellMain";
 
     // Directory where applications bundled with the shell will be extracted.
     private static final String LOCAL_APP_DIRECTORY = "local_apps";
@@ -40,8 +40,7 @@
      * Initializes the native system.
      **/
     static void ensureInitialized(Context applicationContext, String[] parameters) {
-        if (sInitialized)
-            return;
+        if (sInitialized) return;
         try {
             FileHelper.extractFromAssets(applicationContext, NETWORK_LIBRARY_APP,
                     getLocalAppsDir(applicationContext), false);
@@ -60,7 +59,7 @@
                     getTmpDir(applicationContext).getAbsolutePath());
             sInitialized = true;
         } catch (Exception e) {
-            Log.e(TAG, "MojoMain initialization failed.", e);
+            Log.e(TAG, "ShellMain initialization failed.", e);
             throw new RuntimeException(e);
         }
     }
diff --git a/shell/android/library_loader.cc b/shell/android/library_loader.cc
index c6d31de..d5230ac 100644
--- a/shell/android/library_loader.cc
+++ b/shell/android/library_loader.cc
@@ -17,9 +17,9 @@
 base::android::RegistrationMethod kMojoRegisteredMethods[] = {
     {"AndroidHandler", mojo::shell::RegisterAndroidHandlerJni},
     {"Keyboard", mojo::shell::RegisterKeyboardJni},
-    {"MojoMain", mojo::shell::RegisterMojoMain},
     {"PlatformViewportAndroid",
      native_viewport::PlatformViewportAndroid::Register},
+    {"ShellMain", mojo::shell::RegisterShellMain},
 };
 
 bool RegisterJNI(JNIEnv* env) {
diff --git a/shell/android/main.cc b/shell/android/main.cc
index fb0e745..aa26a13 100644
--- a/shell/android/main.cc
+++ b/shell/android/main.cc
@@ -19,7 +19,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/threading/simple_thread.h"
-#include "jni/MojoMain_jni.h"
+#include "jni/ShellMain_jni.h"
 #include "mojo/common/message_pump_mojo.h"
 #include "shell/android/android_handler_loader.h"
 #include "shell/android/background_application_loader.h"
@@ -96,8 +96,8 @@
 void QuitShellThread() {
   g_shell_thread.Get()->Join();
   g_shell_thread.Pointer()->reset();
-  Java_MojoMain_finishActivity(base::android::AttachCurrentThread(),
-                               g_main_activiy.Get().obj());
+  Java_ShellMain_finishActivity(base::android::AttachCurrentThread(),
+                                g_main_activiy.Get().obj());
   exit(0);
 }
 
@@ -208,7 +208,7 @@
       base::android::ConvertJavaStringToUTF8(env, jurl));
 }
 
-bool RegisterMojoMain(JNIEnv* env) {
+bool RegisterShellMain(JNIEnv* env) {
   return RegisterNativesImpl(env);
 }
 
diff --git a/shell/android/main.h b/shell/android/main.h
index bc2e9f1..43ea16a 100644
--- a/shell/android/main.h
+++ b/shell/android/main.h
@@ -2,17 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SHELL_ANDROID_MOJO_MAIN_H_
-#define SHELL_ANDROID_MOJO_MAIN_H_
+#ifndef SHELL_ANDROID_MAIN_H_
+#define SHELL_ANDROID_MAIN_H_
 
 #include <jni.h>
 
 namespace mojo {
 namespace shell {
 
-bool RegisterMojoMain(JNIEnv* env);
+bool RegisterShellMain(JNIEnv* env);
 
 }  // namespace shell
 }  // namespace mojo
 
-#endif  // SHELL_ANDROID_MOJO_MAIN_H_
+#endif  // SHELL_ANDROID_MAIN_H_