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

Unified Diff: content/shell/browser/shell_android.cc

Issue 2431753002: Mus experiment in content shell on Android.
Patch Set: Fix mac bot Created 4 years, 1 month 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
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/shell/browser/shell_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_android.cc
diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc
index c38e902a4b020640384156032ca9c60c93da25a0..485ab904ab27d266ef48b0bb366995ec9c246893 100644
--- a/content/shell/browser/shell_android.cc
+++ b/content/shell/browser/shell_android.cc
@@ -13,8 +13,11 @@
#include "base/strings/string_piece.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/service_manager_connection.h"
#include "content/shell/android/shell_manager.h"
+#include "content/shell/common/shell_switches.h"
#include "jni/Shell_jni.h"
+#include "services/service_manager/public/cpp/connector.h"
using base::android::AttachCurrentThread;
using base::android::ConvertUTF8ToJavaString;
@@ -104,6 +107,22 @@ bool Shell::Register(JNIEnv* env) {
return RegisterNativesImpl(env);
}
+void Shell::StartMusDemo(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& caller) {
+ DCHECK(!mus_demo_connection_);
+
+ mus_demo_connection_ =
+ content::ServiceManagerConnection::GetForProcess()->GetConnector()
+ ->Connect("service:mus_demo");
+}
+
+// static
+jboolean ShowMusDemoButton(JNIEnv* env,
+ const base::android::JavaParamRef<jclass>& jcaller) {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kShowMusDemoButton);
+}
+
// static
void CloseShell(JNIEnv* env,
const JavaParamRef<jclass>& clazz,
« no previous file with comments | « content/shell/browser/shell.h ('k') | content/shell/browser/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698