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

Unified Diff: content/browser/android/media_players_observer.h

Issue 972973002: Revert of Propagate audible state from player to the containing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/media_players_observer.h
diff --git a/content/browser/android/media_players_observer.h b/content/browser/android/media_players_observer.h
deleted file mode 100644
index b01a3bf916a02555186884fdc6ffccae68edef27..0000000000000000000000000000000000000000
--- a/content/browser/android/media_players_observer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_ANDROID_MEDIA_PLAYERS_OBSERVER_H_
-#define CONTENT_BROWSER_ANDROID_MEDIA_PLAYERS_OBSERVER_H_
-
-#include <map>
-
-#include "base/macros.h"
-#include "content/browser/media/audio_state_provider.h"
-
-namespace content {
-
-class RenderFrameHost;
-
-// On Android the MediaPlayerAndroid objects report
-// the audible state to us.
-class MediaPlayersObserver : public AudioStateProvider {
- public:
- explicit MediaPlayersObserver(WebContents* web_contents);
- ~MediaPlayersObserver() override;
-
- bool IsAudioStateAvailable() const override;
-
- // This audio state provider does not have a monitor,
- // the method returns nullptr.
- AudioStreamMonitor* audio_stream_monitor() override;
-
- // These methods constitute the observer pattern, should
- // be called when corresponding event happens. They will notify
- // WebContents whenever its audible state as a whole changes.
- void OnAudibleStateChanged(RenderFrameHost* rfh, int player_id,
- bool is_audible);
- void RemovePlayer(RenderFrameHost* rfh, int player_id);
- void RenderFrameDeleted(RenderFrameHost* rfh);
-
- private:
- void UpdateStatusAndNotify();
-
- // Audible status per player ID and frame
- typedef std::pair<RenderFrameHost*, int> Key;
- typedef std::map<Key, bool> StatusMap;
- StatusMap audio_status_map_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaPlayersObserver);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYERS_OBSERVER_H_
« no previous file with comments | « chrome/browser/android/chrome_web_contents_delegate_android.cc ('k') | content/browser/android/media_players_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698