summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authortedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-25 03:18:46 +0000
committertedchoc@chromium.org <tedchoc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-25 03:18:46 +0000
commita08029b412a3b9a2b00a6356e5eba8e8fdb623c6 (patch)
tree91a633827f0878126537e0b31967d09e3e828c1f /media
parent70dfa1f43de08da9e6556cf2bfc2c079f06f5f02 (diff)
downloadchromium_src-a08029b412a3b9a2b00a6356e5eba8e8fdb623c6.zip
chromium_src-a08029b412a3b9a2b00a6356e5eba8e8fdb623c6.tar.gz
chromium_src-a08029b412a3b9a2b00a6356e5eba8e8fdb623c6.tar.bz2
Implement the skeleton of an android content shell.
Many TODOs here that will allow a quicker distribution of work to get the remaining pieces upstreamed. BUG=118591 TEST= Review URL: http://codereview.chromium.org/10035034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/android/media_jni_registrar.cc25
-rw-r--r--media/base/android/media_jni_registrar.h17
-rw-r--r--media/media.gyp2
3 files changed, 44 insertions, 0 deletions
diff --git a/media/base/android/media_jni_registrar.cc b/media/base/android/media_jni_registrar.cc
new file mode 100644
index 0000000..bc44d41
--- /dev/null
+++ b/media/base/android/media_jni_registrar.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 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.
+
+#include "media/base/android/media_jni_registrar.h"
+
+#include "base/basictypes.h"
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+
+#include "media/base/android/media_player_bridge.h"
+
+namespace media {
+
+static base::android::RegistrationMethod kMediaRegisteredMethods[] = {
+ { "MediaPlayerListener",
+ MediaPlayerBridge::RegisterMediaPlayerListener },
+};
+
+bool RegisterJni(JNIEnv* env) {
+ return base::android::RegisterNativeMethods(
+ env, kMediaRegisteredMethods, arraysize(kMediaRegisteredMethods));
+}
+
+} // namespace media
diff --git a/media/base/android/media_jni_registrar.h b/media/base/android/media_jni_registrar.h
new file mode 100644
index 0000000..b0ad6c6b
--- /dev/null
+++ b/media/base/android/media_jni_registrar.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2012 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.
+
+#ifndef MEDIA_BASE_ANDROID_MEDIA_JNI_REGISTRAR_H_
+#define MEDIA_BASE_ANDROID_MEDIA_JNI_REGISTRAR_H_
+
+#include <jni.h>
+
+namespace media {
+
+// Register all JNI bindings necessary for media.
+bool RegisterJni(JNIEnv* env);
+
+} // namespace media
+
+#endif // MEDIA_BASE_ANDROID_MEDIA_JNI_REGISTRAR_H_
diff --git a/media/media.gyp b/media/media.gyp
index 1ccfa2b..9d90312 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -119,6 +119,8 @@
'audio/win/wavein_input_win.h',
'audio/win/waveout_output_win.cc',
'audio/win/waveout_output_win.h',
+ 'base/android/media_jni_registrar.cc',
+ 'base/android/media_jni_registrar.h',
'base/audio_decoder.cc',
'base/audio_decoder.h',
'base/audio_decoder_config.cc',