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

Side by Side Diff: media/base/android/media_player_android.cc

Issue 1132973002: Revert of Added stub MediaSourcePlayer for developing behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « media/base/android/media_player_android.h ('k') | media/base/media_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/android/media_player_android.h" 5 #include "media/base/android/media_player_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 jobject j_context = base::android::GetApplicationContext(); 74 jobject j_context = base::android::GetApplicationContext();
75 DCHECK(j_context); 75 DCHECK(j_context);
76 76
77 listener_->CreateMediaPlayerListener(j_context, j_media_player); 77 listener_->CreateMediaPlayerListener(j_context, j_media_player);
78 } 78 }
79 79
80 void MediaPlayerAndroid::DetachListener() { 80 void MediaPlayerAndroid::DetachListener() {
81 listener_->ReleaseMediaPlayerListenerResources(); 81 listener_->ReleaseMediaPlayerListenerResources();
82 } 82 }
83 83
84 void MediaPlayerAndroid::DestroyListenerOnUIThread() {
85 weak_factory_.InvalidateWeakPtrs();
86 listener_.reset();
87 }
88
89 void MediaPlayerAndroid::SetAudible(bool is_audible) { 84 void MediaPlayerAndroid::SetAudible(bool is_audible) {
90 if (is_audible_ != is_audible) { 85 if (is_audible_ != is_audible) {
91 is_audible_ = is_audible; 86 is_audible_ = is_audible;
92 manager_->OnAudibleStateChanged(player_id(), is_audible_); 87 manager_->OnAudibleStateChanged(player_id(), is_audible_);
93 } 88 }
94 } 89 }
95 90
96 } // namespace media 91 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_player_android.h ('k') | media/base/media_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698