| Index: content/browser/web_contents/web_contents_impl.h
|
| diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
| index 0aca1de51ce5527f9a235daa110b2674811a9943..4a86a48cd9b1a8f0375666b48e5a716fc0a8aff2 100644
|
| --- a/content/browser/web_contents/web_contents_impl.h
|
| +++ b/content/browser/web_contents/web_contents_impl.h
|
| @@ -22,7 +22,6 @@
|
| #include "content/browser/frame_host/navigator_delegate.h"
|
| #include "content/browser/frame_host/render_frame_host_delegate.h"
|
| #include "content/browser/frame_host/render_frame_host_manager.h"
|
| -#include "content/browser/media/audio_stream_monitor.h"
|
| #include "content/browser/renderer_host/render_view_host_delegate.h"
|
| #include "content/browser/renderer_host/render_widget_host_delegate.h"
|
| #include "content/common/accessibility_mode_enums.h"
|
| @@ -330,7 +329,6 @@ class CONTENT_EXPORT WebContentsImpl
|
| const blink::WebFindOptions& options) OVERRIDE;
|
| virtual void StopFinding(StopFindAction action) OVERRIDE;
|
| virtual void InsertCSS(const std::string& css) OVERRIDE;
|
| - virtual bool WasRecentlyAudible() OVERRIDE;
|
| #if defined(OS_ANDROID)
|
| virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents()
|
| OVERRIDE;
|
| @@ -671,18 +669,6 @@ class CONTENT_EXPORT WebContentsImpl
|
| // Forces overscroll to be disabled (used by touch emulation).
|
| void SetForceDisableOverscrollContent(bool force_disable);
|
|
|
| - AudioStreamMonitor* audio_stream_monitor() {
|
| - return &audio_stream_monitor_;
|
| - }
|
| -
|
| - bool has_audio_power_save_blocker_for_testing() const {
|
| - return audio_power_save_blocker_;
|
| - }
|
| -
|
| - bool has_video_power_save_blocker_for_testing() const {
|
| - return video_power_save_blocker_;
|
| - }
|
| -
|
| private:
|
| friend class TestNavigationObserver;
|
| friend class WebContentsAddedObserver;
|
| @@ -918,22 +904,12 @@ class CONTENT_EXPORT WebContentsImpl
|
| // Removes browser plugin embedder if there is one.
|
| void RemoveBrowserPluginEmbedder();
|
|
|
| - // Clear |render_frame_host|'s tracking entry for its power save blockers.
|
| + // Clear |render_frame_host|'s PowerSaveBlockers.
|
| void ClearPowerSaveBlockers(RenderFrameHost* render_frame_host);
|
|
|
| - // Clear tracking entries for all RenderFrameHosts, clears
|
| - // |audio_power_save_blocker_| and |video_power_save_blocker_|.
|
| + // Clear all PowerSaveBlockers, leave |power_save_blocker_| empty.
|
| void ClearAllPowerSaveBlockers();
|
|
|
| - // Creates an audio or video power save blocker respectively.
|
| - void CreateAudioPowerSaveBlocker();
|
| - void CreateVideoPowerSaveBlocker();
|
| -
|
| - // Releases the audio power save blockers if |active_audio_players_| is empty.
|
| - // Likewise, releases the video power save blockers if |active_video_players_|
|
| - // is empty.
|
| - void MaybeReleasePowerSaveBlockers();
|
| -
|
| // Helper function to invoke WebContentsDelegate::GetSizeForNewRenderView().
|
| gfx::Size GetSizeForNewRenderView();
|
|
|
| @@ -944,18 +920,6 @@ class CONTENT_EXPORT WebContentsImpl
|
| // |delegate_|.
|
| void OnPreferredSizeChanged(const gfx::Size& old_size);
|
|
|
| - // Helper methods for adding or removing player entries in |player_map| under
|
| - // the key |render_frame_message_source_|.
|
| - typedef std::vector<int64> PlayerList;
|
| - typedef std::map<uintptr_t, PlayerList> ActiveMediaPlayerMap;
|
| - void AddMediaPlayerEntry(int64 player_cookie,
|
| - ActiveMediaPlayerMap* player_map);
|
| - void RemoveMediaPlayerEntry(int64 player_cookie,
|
| - ActiveMediaPlayerMap* player_map);
|
| - // Removes all entries from |player_map| for |render_frame_host|.
|
| - void RemoveAllMediaPlayerEntries(RenderFrameHost* render_frame_host,
|
| - ActiveMediaPlayerMap* player_map);
|
| -
|
| // Adds/removes a callback called on creation of each new WebContents.
|
| // Deprecated, about to remove.
|
| static void AddCreatedCallback(const CreatedCallback& callback);
|
| @@ -1010,11 +974,18 @@ class CONTENT_EXPORT WebContentsImpl
|
|
|
| // Helper classes ------------------------------------------------------------
|
|
|
| - // Tracking variables and associated power save blockers for media playback.
|
| - ActiveMediaPlayerMap active_audio_players_;
|
| - ActiveMediaPlayerMap active_video_players_;
|
| - scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_;
|
| - scoped_ptr<PowerSaveBlocker> video_power_save_blocker_;
|
| +#if !defined(OS_CHROMEOS)
|
| + // Maps the RenderFrameHost to its media_player_cookie and PowerSaveBlocker
|
| + // pairs. Key is the RenderFrameHost, value is the map which maps
|
| + // player_cookie on to PowerSaveBlocker.
|
| + //
|
| + // ChromeOS does its own detection of audio and video.
|
| + typedef base::ScopedPtrHashMap<int64, PowerSaveBlocker>
|
| + PowerSaveBlockerMapEntry;
|
| + typedef base::ScopedPtrHashMap<uintptr_t, PowerSaveBlockerMapEntry>
|
| + PowerSaveBlockerMap;
|
| + PowerSaveBlockerMap power_save_blockers_;
|
| +#endif
|
|
|
| // Manages the frame tree of the page and process swaps in each node.
|
| FrameTree frame_tree_;
|
| @@ -1232,9 +1203,6 @@ class CONTENT_EXPORT WebContentsImpl
|
| // is created, and broadcast to all frames when it changes.
|
| AccessibilityMode accessibility_mode_;
|
|
|
| - // Monitors power levels for audio streams associated with this WebContents.
|
| - AudioStreamMonitor audio_stream_monitor_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
|
| };
|
|
|
|
|