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

Side by Side Diff: chromecast/browser/cast_media_blocker.cc

Issue 2411723002: Split MediaSessionStateChanged() and MediaSessionMetadataChanged() (Closed)
Patch Set: rebased 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chromecast/browser/cast_media_blocker.h" 5 #include "chromecast/browser/cast_media_blocker.h"
6 6
7 #include "base/threading/thread_checker.h" 7 #include "base/threading/thread_checker.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 9
10 namespace chromecast { 10 namespace chromecast {
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 if (state_ == BLOCKED && !suspended_) { 42 if (state_ == BLOCKED && !suspended_) {
43 web_contents()->SuspendMediaSession(); 43 web_contents()->SuspendMediaSession();
44 } else if (state_ == UNBLOCKING && suspended_) { 44 } else if (state_ == UNBLOCKING && suspended_) {
45 web_contents()->ResumeMediaSession(); 45 web_contents()->ResumeMediaSession();
46 state_ = UNBLOCKED; 46 state_ = UNBLOCKED;
47 } 47 }
48 } 48 }
49 49
50 void CastMediaBlocker::MediaSessionStateChanged( 50 void CastMediaBlocker::MediaSessionStateChanged(bool is_controllable,
51 bool is_controllable, 51 bool is_suspended) {
52 bool is_suspended,
53 const base::Optional<content::MediaMetadata>& metadata) {
54 controllable_ = is_controllable; 52 controllable_ = is_controllable;
55 suspended_ = is_suspended; 53 suspended_ = is_suspended;
56 UpdateMediaBlockedState(); 54 UpdateMediaBlockedState();
57 } 55 }
58 56
59 } // namespace shell 57 } // namespace shell
60 } // namespace chromecast 58 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_media_blocker.h ('k') | content/browser/android/web_contents_observer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698