| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/android/child_process_launcher_android.h" | 5 #include "content/browser/android/child_process_launcher_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> |
| 9 | 10 |
| 10 #include "base/android/context_utils.h" | 11 #include "base/android/context_utils.h" |
| 11 #include "base/android/jni_android.h" | 12 #include "base/android/jni_android.h" |
| 12 #include "base/android/jni_array.h" | 13 #include "base/android/jni_array.h" |
| 13 #include "base/logging.h" | 14 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "content/browser/frame_host/render_frame_host_impl.h" | 16 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 16 #include "content/browser/media/android/browser_media_player_manager.h" | 17 #include "content/browser/media/android/browser_media_player_manager.h" |
| 17 #include "content/browser/media/media_web_contents_observer.h" | 18 #include "content/browser/media/media_web_contents_observer.h" |
| 18 #include "content/browser/web_contents/web_contents_impl.h" | 19 #include "content/browser/web_contents/web_contents_impl.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 74 } |
| 74 | 75 |
| 75 media::MediaPlayerAndroid* player = player_manager->GetPlayer(player_id); | 76 media::MediaPlayerAndroid* player = player_manager->GetPlayer(player_id); |
| 76 if (!player) { | 77 if (!player) { |
| 77 DVLOG(1) << "Cannot find media player for player_id " << player_id; | 78 DVLOG(1) << "Cannot find media player for player_id " << player_id; |
| 78 return; | 79 return; |
| 79 } | 80 } |
| 80 | 81 |
| 81 if (player != player_manager->GetFullscreenPlayer()) { | 82 if (player != player_manager->GetFullscreenPlayer()) { |
| 82 gfx::ScopedJavaSurface scoped_surface(surface); | 83 gfx::ScopedJavaSurface scoped_surface(surface); |
| 83 player->SetVideoSurface(scoped_surface.Pass()); | 84 player->SetVideoSurface(std::move(scoped_surface)); |
| 84 } | 85 } |
| 85 #else | 86 #else |
| 86 NOTREACHED(); | 87 NOTREACHED(); |
| 87 #endif | 88 #endif |
| 88 } | 89 } |
| 89 | 90 |
| 90 } // anonymous namespace | 91 } // anonymous namespace |
| 91 | 92 |
| 92 // Called from ChildProcessLauncher.java when the ChildProcess was | 93 // Called from ChildProcessLauncher.java when the ChildProcess was |
| 93 // started. | 94 // started. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { | 236 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { |
| 236 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 237 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 237 switches::kSingleProcess); | 238 switches::kSingleProcess); |
| 238 } | 239 } |
| 239 | 240 |
| 240 bool RegisterChildProcessLauncher(JNIEnv* env) { | 241 bool RegisterChildProcessLauncher(JNIEnv* env) { |
| 241 return RegisterNativesImpl(env); | 242 return RegisterNativesImpl(env); |
| 242 } | 243 } |
| 243 | 244 |
| 244 } // namespace content | 245 } // namespace content |
| OLD | NEW |