| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/media.h" | 5 #include "media/base/media.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 #if defined(OS_ANDROID) |
| 10 #include "base/android/jni_android.h" |
| 11 #include "media/base/android/media_jni_registrar.h" |
| 12 #endif |
| 13 |
| 9 // This file is intended for platforms that don't need to load any media | 14 // This file is intended for platforms that don't need to load any media |
| 10 // libraries (e.g., Android and iOS). | 15 // libraries (e.g., Android and iOS). |
| 11 namespace media { | 16 namespace media { |
| 12 | 17 |
| 13 bool InitializeMediaLibrary(const base::FilePath& module_dir) { | 18 bool InitializeMediaLibrary(const base::FilePath& module_dir) { |
| 14 return true; | 19 return true; |
| 15 } | 20 } |
| 16 | 21 |
| 17 void InitializeMediaLibraryForTesting() { | 22 void InitializeMediaLibraryForTesting() { |
| 23 #if defined(OS_ANDROID) |
| 24 // Register JNI bindings for android. |
| 25 JNIEnv* env = base::android::AttachCurrentThread(); |
| 26 RegisterJni(env); |
| 27 #endif |
| 18 } | 28 } |
| 19 | 29 |
| 20 bool IsMediaLibraryInitialized() { | 30 bool IsMediaLibraryInitialized() { |
| 21 return true; | 31 return true; |
| 22 } | 32 } |
| 23 | 33 |
| 24 } // namespace media | 34 } // namespace media |
| OLD | NEW |