Use the mojo::shell namespace consistently under shell/.

(Esp. under shell/application_manager/.)

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/972433004
diff --git a/shell/android/android_handler.cc b/shell/android/android_handler.cc
index 916d9f7..88b1cfd 100644
--- a/shell/android/android_handler.cc
+++ b/shell/android/android_handler.cc
@@ -23,6 +23,7 @@
 using base::android::GetApplicationContext;
 
 namespace mojo {
+namespace shell {
 
 namespace {
 
@@ -64,9 +65,8 @@
   }
 
   // Run the application.
-  base::ScopedNativeLibrary app_library_from_runner(
-      shell::LoadAndRunNativeApplication(app_path, NativeRunner::DeleteAppPath,
-                                         application_request.Pass()));
+  base::ScopedNativeLibrary app_library_from_runner(LoadAndRunNativeApplication(
+      app_path, NativeRunner::DeleteAppPath, application_request.Pass()));
 }
 
 }  // namespace
@@ -107,4 +107,5 @@
   return RegisterNativesImpl(env);
 }
 
+}  // namespace shell
 }  // namespace mojo
diff --git a/shell/android/android_handler.h b/shell/android/android_handler.h
index c371647..1e1ad96 100644
--- a/shell/android/android_handler.h
+++ b/shell/android/android_handler.h
@@ -17,6 +17,7 @@
 }
 
 namespace mojo {
+namespace shell {
 
 class AndroidHandler : public ApplicationDelegate,
                        public ContentHandlerFactory::Delegate {
@@ -39,6 +40,7 @@
 
 bool RegisterAndroidHandlerJni(JNIEnv* env);
 
+}  // namespace shell
 }  // namespace mojo
 
 #endif  // MOJO_SHELL_ANDROID_CONTENT_HANDLER_H_
diff --git a/shell/android/apk/src/org/chromium/mojo/shell/AndroidHandler.java b/shell/android/apk/src/org/chromium/mojo/shell/AndroidHandler.java
index cba1f7d..610ff16 100644
--- a/shell/android/apk/src/org/chromium/mojo/shell/AndroidHandler.java
+++ b/shell/android/apk/src/org/chromium/mojo/shell/AndroidHandler.java
@@ -22,7 +22,7 @@
  * TODO(ppi): create a seperate instance for each application being bootstrapped to keep track of
  * the temporary files and clean them up once the execution finishes.
  */
-@JNINamespace("mojo")
+@JNINamespace("mojo::shell")
 public class AndroidHandler {
     private static final String TAG = "AndroidHandler";
 
diff --git a/shell/android/apk/src/org/chromium/mojo/shell/Bootstrap.java b/shell/android/apk/src/org/chromium/mojo/shell/Bootstrap.java
index b0a0719..9916c83 100644
--- a/shell/android/apk/src/org/chromium/mojo/shell/Bootstrap.java
+++ b/shell/android/apk/src/org/chromium/mojo/shell/Bootstrap.java
@@ -15,9 +15,8 @@
  * Java class with the application classloader in the call stack. We load this class in the
  * application classloader and call into native from it to achieve that.
  */
-@JNINamespace("mojo")
+@JNINamespace("mojo::shell")
 public class Bootstrap implements Runnable {
-
     private final Context mContext;
     private final File mBootstrapNativeLibrary;
     private final File mApplicationNativeLibrary;
diff --git a/shell/android/background_application_loader.cc b/shell/android/background_application_loader.cc
index 6260c2f..f35c45e 100644
--- a/shell/android/background_application_loader.cc
+++ b/shell/android/background_application_loader.cc
@@ -9,6 +9,7 @@
 #include "shell/application_manager/application_manager.h"
 
 namespace mojo {
+namespace shell {
 
 BackgroundApplicationLoader::BackgroundApplicationLoader(
     scoped_ptr<ApplicationLoader> real_loader,
@@ -68,4 +69,5 @@
   loader_->Load(url, application_request.Pass());
 }
 
+}  // namespace shell
 }  // namespace mojo
diff --git a/shell/android/background_application_loader.h b/shell/android/background_application_loader.h
index 8baacbb..9dcee40 100644
--- a/shell/android/background_application_loader.h
+++ b/shell/android/background_application_loader.h
@@ -13,6 +13,7 @@
 #include "shell/application_manager/application_loader.h"
 
 namespace mojo {
+namespace shell {
 
 class BackgroundApplicationLoader
     : public ApplicationLoader,
@@ -57,6 +58,7 @@
   DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationLoader);
 };
 
+}  // namespace shell
 }  // namespace mojo
 
 #endif  // SHELL_ANDROID_BACKGROUND_APPLICATION_LOADER_H_
diff --git a/shell/android/background_application_loader_unittest.cc b/shell/android/background_application_loader_unittest.cc
index bf8873d..e07d79d 100644
--- a/shell/android/background_application_loader_unittest.cc
+++ b/shell/android/background_application_loader_unittest.cc
@@ -8,7 +8,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace mojo {
-
+namespace shell {
 namespace {
 
 class DummyLoader : public ApplicationLoader {
@@ -29,8 +29,6 @@
   bool simulate_app_quit_;
 };
 
-}  // namespace
-
 // Tests that the loader can start and stop gracefully.
 TEST(BackgroundApplicationLoaderTest, StartStop) {
   scoped_ptr<ApplicationLoader> real_loader(new DummyLoader());
@@ -48,4 +46,6 @@
   loader.Load(GURL(), GetProxy(&application));
 }
 
+}  // namespace
+}  // namespace shell
 }  // namespace mojo
diff --git a/shell/android/bootstrap.cc b/shell/android/bootstrap.cc
index 823258c..a1c4573 100644
--- a/shell/android/bootstrap.cc
+++ b/shell/android/bootstrap.cc
@@ -10,6 +10,7 @@
 #include "shell/android/run_android_application_function.h"
 
 namespace mojo {
+namespace shell {
 
 void Bootstrap(JNIEnv* env,
                jobject,
@@ -28,13 +29,14 @@
   return RegisterNativesImpl(env);
 }
 
+}  // namespace shell
 }  // namespace mojo
 
 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
   base::android::InitVM(vm);
   JNIEnv* env = base::android::AttachCurrentThread();
 
-  if (!mojo::RegisterBootstrapJni(env))
+  if (!mojo::shell::RegisterBootstrapJni(env))
     return -1;
 
   return JNI_VERSION_1_4;
diff --git a/shell/android/library_loader.cc b/shell/android/library_loader.cc
index 0aff50b..b0992c1 100644
--- a/shell/android/library_loader.cc
+++ b/shell/android/library_loader.cc
@@ -15,7 +15,7 @@
 namespace {
 
 base::android::RegistrationMethod kMojoRegisteredMethods[] = {
-    {"AndroidHandler", mojo::RegisterAndroidHandlerJni},
+    {"AndroidHandler", mojo::shell::RegisterAndroidHandlerJni},
     {"Keyboard", mojo::shell::RegisterKeyboardJni},
     {"MojoMain", mojo::shell::RegisterMojoMain},
     {"PlatformViewportAndroid",
diff --git a/shell/android/run_android_application_function.h b/shell/android/run_android_application_function.h
index 490d724..3ed1744 100644
--- a/shell/android/run_android_application_function.h
+++ b/shell/android/run_android_application_function.h
@@ -8,16 +8,20 @@
 #include "base/android/jni_android.h"
 #include "base/files/file_path.h"
 
+namespace mojo {
+namespace shell {
+
 // Type of the function that we inject from the main .so of the Mojo shell to
 // the helper libbootstrap.so. This function will set the thunks in the
 // application .so and call into application MojoMain. Injecting the function
 // from the main .so ensures that the thunks are set correctly.
 
-namespace mojo {
 typedef void (*RunAndroidApplicationFn)(JNIEnv* env,
                                         jobject j_context,
                                         const base::FilePath& app_path,
                                         jint j_handle);
-}
+
+}  // namespace shell
+}  // namespace mojo
 
 #endif  // SHELL_ANDROID_RUN_ANDROID_APPLICATION_FUNCTION_H_
diff --git a/shell/android/ui_application_loader_android.cc b/shell/android/ui_application_loader_android.cc
index dbce95b..acd3185 100644
--- a/shell/android/ui_application_loader_android.cc
+++ b/shell/android/ui_application_loader_android.cc
@@ -9,6 +9,7 @@
 #include "shell/application_manager/application_manager.h"
 
 namespace mojo {
+namespace shell {
 
 UIApplicationLoader::UIApplicationLoader(
     scoped_ptr<ApplicationLoader> real_loader,
@@ -43,4 +44,5 @@
   loader_.reset();
 }
 
+}  // namespace shell
 }  // namespace mojo
diff --git a/shell/android/ui_application_loader_android.h b/shell/android/ui_application_loader_android.h
index 1730a35..3e785bb 100644
--- a/shell/android/ui_application_loader_android.h
+++ b/shell/android/ui_application_loader_android.h
@@ -14,6 +14,7 @@
 }
 
 namespace mojo {
+namespace shell {
 
 class ApplicationManager;
 
@@ -47,6 +48,7 @@
   DISALLOW_COPY_AND_ASSIGN(UIApplicationLoader);
 };
 
+}  // namespace shell
 }  // namespace mojo
 
 #endif  // SHELL_ANDROID_UI_APPLICATION_LOADER_ANDROID_H_