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

Side by Side Diff: content/browser/media/session/media_session_browsertest.cc

Issue 2382723006: Revert of Letting Flash join MediaSession (stack implementaion) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session_type
Patch Set: Created 4 years, 2 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 | « content/browser/media/session/media_session.cc ('k') | content/test/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/media/session/media_session.h" 5 #include "content/browser/media/session/media_session.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <list> 9 #include <list>
10 #include <vector> 10 #include <vector>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 void OnPlayerPaused(MockMediaSessionObserver* media_session_observer, 109 void OnPlayerPaused(MockMediaSessionObserver* media_session_observer,
110 int player_id) { 110 int player_id) {
111 media_session_->OnPlayerPaused(media_session_observer, player_id); 111 media_session_->OnPlayerPaused(media_session_observer, player_id);
112 } 112 }
113 113
114 bool HasAudioFocus() { return media_session_->IsActiveForTest(); } 114 bool HasAudioFocus() { return media_session_->IsActiveForTest(); }
115 115
116 content::AudioFocusManager::AudioFocusType GetSessionAudioFocusType() { 116 content::AudioFocusManager::AudioFocusType GetSessionAudioFocusType() {
117 return media_session_->audio_focus_type(); 117 return media_session_->audio_focus_type_for_test();
118 } 118 }
119 119
120 bool IsControllable() { return media_session_->IsControllable(); } 120 bool IsControllable() { return media_session_->IsControllable(); }
121 121
122 bool IsSuspended() { return media_session_->IsSuspended(); } 122 bool IsSuspended() { return media_session_->IsSuspended(); }
123 123
124 void UIResume() { 124 void UIResume() {
125 media_session_->Resume(MediaSession::SuspendType::UI); 125 media_session_->Resume(MediaSession::SuspendType::UI);
126 } 126 }
127 127
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 media::MediaContentType::Persistent); 1338 media::MediaContentType::Persistent);
1339 clock->Advance(base::TimeDelta::FromMilliseconds(1000)); 1339 clock->Advance(base::TimeDelta::FromMilliseconds(1000));
1340 media_session_->Stop(MediaSession::SuspendType::UI); 1340 media_session_->Stop(MediaSession::SuspendType::UI);
1341 1341
1342 std::unique_ptr<base::HistogramSamples> samples( 1342 std::unique_ptr<base::HistogramSamples> samples(
1343 tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime")); 1343 tester.GetHistogramSamplesSinceCreation("Media.Session.ActiveTime"));
1344 EXPECT_EQ(2, samples->TotalCount()); 1344 EXPECT_EQ(2, samples->TotalCount());
1345 EXPECT_EQ(1, samples->GetCount(1000)); 1345 EXPECT_EQ(1, samples->GetCount(1000));
1346 EXPECT_EQ(1, samples->GetCount(10000)); 1346 EXPECT_EQ(1, samples->GetCount(10000));
1347 } 1347 }
OLDNEW
« no previous file with comments | « content/browser/media/session/media_session.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698