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

Side by Side Diff: media/remoting/remoting_renderer_controller.h

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Rebase again. Created 4 years 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 | « media/blink/webmediaplayer_impl.cc ('k') | media/remoting/remoting_renderer_controller.cc » ('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 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 #ifndef MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ 5 #ifndef MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_
6 #define MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ 6 #define MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "media/base/media_observer.h" 10 #include "media/base/media_observer.h"
(...skipping 17 matching lines...) Expand all
28 scoped_refptr<RemotingSourceImpl> remoting_source); 28 scoped_refptr<RemotingSourceImpl> remoting_source);
29 ~RemotingRendererController() override; 29 ~RemotingRendererController() override;
30 30
31 // RemotingSourceImpl::Client implemenations. 31 // RemotingSourceImpl::Client implemenations.
32 void OnStarted(bool success) override; 32 void OnStarted(bool success) override;
33 void OnSessionStateChanged() override; 33 void OnSessionStateChanged() override;
34 34
35 // MediaObserver implementations. 35 // MediaObserver implementations.
36 void OnEnteredFullscreen() override; 36 void OnEnteredFullscreen() override;
37 void OnExitedFullscreen() override; 37 void OnExitedFullscreen() override;
38 void OnBecameDominantVisibleContent(bool is_dominant) override;
38 void OnSetCdm(CdmContext* cdm_context) override; 39 void OnSetCdm(CdmContext* cdm_context) override;
39 void OnMetadataChanged(const PipelineMetadata& metadata) override; 40 void OnMetadataChanged(const PipelineMetadata& metadata) override;
40 void OnRemotePlaybackDisabled(bool disabled) override; 41 void OnRemotePlaybackDisabled(bool disabled) override;
41 42
42 void SetSwitchRendererCallback(const base::Closure& cb); 43 void SetSwitchRendererCallback(const base::Closure& cb);
43 44
44 base::WeakPtr<RemotingRendererController> GetWeakPtr() { 45 base::WeakPtr<RemotingRendererController> GetWeakPtr() {
45 return weak_factory_.GetWeakPtr(); 46 return weak_factory_.GetWeakPtr();
46 } 47 }
47 48
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 107
107 // Indicates whether remote playback is currently disabled. This starts out as 108 // Indicates whether remote playback is currently disabled. This starts out as
108 // true, and should be updated at least once via a call to 109 // true, and should be updated at least once via a call to
109 // OnRemotePlaybackDisabled() at some point in the future. A web page 110 // OnRemotePlaybackDisabled() at some point in the future. A web page
110 // typically sets/removes the disableRemotePlayback attribute on a 111 // typically sets/removes the disableRemotePlayback attribute on a
111 // HTMLMediaElement to disable/enable remoting of its content. Please see the 112 // HTMLMediaElement to disable/enable remoting of its content. Please see the
112 // Remote Playback API spec for more details: 113 // Remote Playback API spec for more details:
113 // https://w3c.github.io/remote-playback 114 // https://w3c.github.io/remote-playback
114 bool is_remote_playback_disabled_ = true; 115 bool is_remote_playback_disabled_ = true;
115 116
117 // Indicates whether video is the dominant visible content in the tab.
118 bool is_dominant_content_ = false;
119
116 // The callback to switch the media renderer. 120 // The callback to switch the media renderer.
117 base::Closure switch_renderer_cb_; 121 base::Closure switch_renderer_cb_;
118 122
119 // This is initially the RemotingSourceImpl passed to the ctor, and might be 123 // This is initially the RemotingSourceImpl passed to the ctor, and might be
120 // replaced with a different instance later if OnSetCdm() is called. 124 // replaced with a different instance later if OnSetCdm() is called.
121 scoped_refptr<RemotingSourceImpl> remoting_source_; 125 scoped_refptr<RemotingSourceImpl> remoting_source_;
122 126
123 // This is used to check all the methods are called on the current thread in 127 // This is used to check all the methods are called on the current thread in
124 // debug builds. 128 // debug builds.
125 base::ThreadChecker thread_checker_; 129 base::ThreadChecker thread_checker_;
126 130
127 PipelineMetadata pipeline_metadata_; 131 PipelineMetadata pipeline_metadata_;
128 132
129 base::WeakPtrFactory<RemotingRendererController> weak_factory_; 133 base::WeakPtrFactory<RemotingRendererController> weak_factory_;
130 134
131 DISALLOW_COPY_AND_ASSIGN(RemotingRendererController); 135 DISALLOW_COPY_AND_ASSIGN(RemotingRendererController);
132 }; 136 };
133 137
134 } // namespace media 138 } // namespace media
135 139
136 #endif // MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ 140 #endif // MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/remoting/remoting_renderer_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698