| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ | 6 #define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 bool HasActiveEffectivelyFullscreenVideo() const; | 50 bool HasActiveEffectivelyFullscreenVideo() const; |
| 51 | 51 |
| 52 // WebContentsObserver implementation. | 52 // WebContentsObserver implementation. |
| 53 void WebContentsDestroyed() override; | 53 void WebContentsDestroyed() override; |
| 54 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | 54 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; |
| 55 bool OnMessageReceived(const IPC::Message& message, | 55 bool OnMessageReceived(const IPC::Message& message, |
| 56 RenderFrameHost* render_frame_host) override; | 56 RenderFrameHost* render_frame_host) override; |
| 57 void WasShown() override; | 57 void WasShown() override; |
| 58 void WasHidden() override; | 58 void WasHidden() override; |
| 59 | 59 |
| 60 // TODO(zqzhang): this method is temporarily in MediaWebContentsObserver as |
| 61 // the effectively fullscreen video code is also here. We need to consider |
| 62 // merging the logic of effectively fullscreen, hiding media controls and |
| 63 // fullscreening video element to the same place. |
| 64 void RequestPersistentVideo(bool value); |
| 65 |
| 60 bool has_audio_power_save_blocker_for_testing() const { | 66 bool has_audio_power_save_blocker_for_testing() const { |
| 61 return !!audio_power_save_blocker_; | 67 return !!audio_power_save_blocker_; |
| 62 } | 68 } |
| 63 | 69 |
| 64 bool has_video_power_save_blocker_for_testing() const { | 70 bool has_video_power_save_blocker_for_testing() const { |
| 65 return !!video_power_save_blocker_; | 71 return !!video_power_save_blocker_; |
| 66 } | 72 } |
| 67 | 73 |
| 68 protected: | 74 protected: |
| 69 MediaSessionControllersManager* session_controllers_manager() { | 75 MediaSessionControllersManager* session_controllers_manager() { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 base::Optional<MediaPlayerId> fullscreen_player_; | 125 base::Optional<MediaPlayerId> fullscreen_player_; |
| 120 | 126 |
| 121 MediaSessionControllersManager session_controllers_manager_; | 127 MediaSessionControllersManager session_controllers_manager_; |
| 122 | 128 |
| 123 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver); | 129 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver); |
| 124 }; | 130 }; |
| 125 | 131 |
| 126 } // namespace content | 132 } // namespace content |
| 127 | 133 |
| 128 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ | 134 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |